Class: Google::Cloud::Dataplex::V1::DataplexService::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb

Overview

REST client for the DataplexService service.

Dataplex service provides data lakes as a service. The primary resources offered by this service are Lakes, Zones and Assets which collectively allow a data administrator to organize, manage, secure and catalog data across their organization located across cloud projects in a variety of storage systems including Cloud Storage and BigQuery.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#asset_path, #environment_path, #job_path, #lake_path, #location_path, #task_path, #zone_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new DataplexService REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the DataplexService client.

Yield Parameters:



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 224

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-")
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
  end

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.bindings_override = @config.bindings_override
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.bindings_override = @config.bindings_override
  end

  @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Rest::Client)


288
289
290
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 288

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


281
282
283
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 281

def location_client
  @location_client
end

#operations_client::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations (readonly)

Get the associated client for long-running operations.



274
275
276
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 274

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the DataplexService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all DataplexService clients
::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 64

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Dataplex", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.create_lake.timeout = 60.0

    default_config.rpcs.update_lake.timeout = 60.0

    default_config.rpcs.delete_lake.timeout = 60.0

    default_config.rpcs.list_lakes.timeout = 60.0
    default_config.rpcs.list_lakes.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_lake.timeout = 60.0
    default_config.rpcs.get_lake.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_lake_actions.timeout = 60.0
    default_config.rpcs.list_lake_actions.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_zone.timeout = 60.0

    default_config.rpcs.update_zone.timeout = 60.0

    default_config.rpcs.delete_zone.timeout = 60.0

    default_config.rpcs.list_zones.timeout = 60.0
    default_config.rpcs.list_zones.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_zone.timeout = 60.0
    default_config.rpcs.get_zone.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_zone_actions.timeout = 60.0
    default_config.rpcs.list_zone_actions.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_asset.timeout = 60.0

    default_config.rpcs.update_asset.timeout = 60.0

    default_config.rpcs.delete_asset.timeout = 60.0

    default_config.rpcs.list_assets.timeout = 60.0
    default_config.rpcs.list_assets.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_asset.timeout = 60.0
    default_config.rpcs.get_asset.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_asset_actions.timeout = 60.0
    default_config.rpcs.list_asset_actions.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.create_task.timeout = 60.0

    default_config.rpcs.update_task.timeout = 60.0

    default_config.rpcs.delete_task.timeout = 60.0

    default_config.rpcs.list_tasks.timeout = 60.0
    default_config.rpcs.list_tasks.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_task.timeout = 60.0
    default_config.rpcs.get_task.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_jobs.timeout = 60.0
    default_config.rpcs.list_jobs.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_job.timeout = 60.0
    default_config.rpcs.get_job.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.cancel_job.timeout = 60.0

    default_config.rpcs.create_environment.timeout = 60.0

    default_config.rpcs.update_environment.timeout = 60.0

    default_config.rpcs.delete_environment.timeout = 60.0

    default_config.rpcs.list_environments.timeout = 60.0
    default_config.rpcs.list_environments.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_environment.timeout = 60.0
    default_config.rpcs.get_environment.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#cancel_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancel jobs running for the task resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CancelJobRequest.new

# Call the cancel_job method.
result = client.cancel_job request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #cancel_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_job via a request object, either of type CancelJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #cancel_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2700

def cancel_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_job..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.cancel_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the DataplexService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



203
204
205
206
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 203

def configure
  yield @config if block_given?
  @config
end

#create_asset(request, options = nil) ⇒ ::Gapic::Operation #create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates an asset resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new

# Call the create_asset method.
result = client.create_asset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_asset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_asset via a request object, either of type CreateAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.

    • asset_id (::String) (defaults to: nil)

      Required. Asset identifier. This ID will be used to generate names such as table names when publishing metadata to Hive Metastore and BigQuery.

      • Must contain only lowercase letters, numbers and hyphens.
      • Must start with a letter.
      • Must end with a number or a letter.
      • Must be between 1-63 characters.
      • Must be unique within the zone.
    • asset (::Google::Cloud::Dataplex::V1::Asset, ::Hash) (defaults to: nil)

      Required. Asset resource.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1457

def create_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_asset..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.create_asset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_environment(request, options = nil) ⇒ ::Gapic::Operation #create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) ⇒ ::Gapic::Operation

Create an environment resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new

# Call the create_environment method.
result = client.create_environment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_environment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_environment via a request object, either of type CreateEnvironmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_environment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.

    • environment_id (::String) (defaults to: nil)

      Required. Environment identifier.

      • Must contain only lowercase letters, numbers and hyphens.
      • Must start with a letter.
      • Must be between 1-63 characters.
      • Must end with a number or a letter.
      • Must be unique within the lake.
    • environment (::Google::Cloud::Dataplex::V1::Environment, ::Hash) (defaults to: nil)

      Required. Environment resource.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2798

def create_environment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_environment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_environment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_environment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.create_environment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_lake(request, options = nil) ⇒ ::Gapic::Operation #create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a lake resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new

# Call the create_lake method.
result = client.create_lake request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_lake(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_lake via a request object, either of type CreateLakeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_lake via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.

    • lake_id (::String) (defaults to: nil)

      Required. Lake identifier. This ID will be used to generate names such as database and dataset names when publishing metadata to Hive Metastore and BigQuery.

      • Must contain only lowercase letters, numbers and hyphens.
      • Must start with a letter.
      • Must end with a number or a letter.
      • Must be between 1-63 characters.
      • Must be unique within the customer project / location.
    • lake (::Google::Cloud::Dataplex::V1::Lake, ::Hash) (defaults to: nil)

      Required. Lake resource

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 358

def create_lake request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_lake..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_lake.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_lake.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.create_lake request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_task(request, options = nil) ⇒ ::Gapic::Operation #create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a task resource within a lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new

# Call the create_task method.
result = client.create_task request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_task(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_task via a request object, either of type CreateTaskRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_task via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

    • task_id (::String) (defaults to: nil)

      Required. Task identifier.

    • task (::Google::Cloud::Dataplex::V1::Task, ::Hash) (defaults to: nil)

      Required. Task resource.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2000

def create_task request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_task..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_task.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_task.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.create_task request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_zone(request, options = nil) ⇒ ::Gapic::Operation #create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a zone resource within a lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new

# Call the create_zone method.
result = client.create_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_zone via a request object, either of type CreateZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

    • zone_id (::String) (defaults to: nil)

      Required. Zone identifier. This ID will be used to generate names such as database and dataset names when publishing metadata to Hive Metastore and BigQuery.

      • Must contain only lowercase letters, numbers and hyphens.
      • Must start with a letter.
      • Must end with a number or a letter.
      • Must be between 1-63 characters.
      • Must be unique across all lakes from all locations in a project.
      • Must not be one of the reserved IDs (i.e. "default", "global-temp")
    • zone (::Google::Cloud::Dataplex::V1::Zone, ::Hash) (defaults to: nil)

      Required. Zone resource.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 908

def create_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.create_zone request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_asset(request, options = nil) ⇒ ::Gapic::Operation #delete_asset(name: nil) ⇒ ::Gapic::Operation

Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new

# Call the delete_asset method.
result = client.delete_asset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_asset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_asset via a request object, either of type Google::Cloud::Dataplex::V1::DeleteAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_asset(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1637

def delete_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_asset..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.delete_asset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_environment(request, options = nil) ⇒ ::Gapic::Operation #delete_environment(name: nil) ⇒ ::Gapic::Operation

Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new

# Call the delete_environment method.
result = client.delete_environment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_environment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_environment via a request object, either of type Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_environment(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_environment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2978

def delete_environment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_environment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_environment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_environment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.delete_environment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_lake(request, options = nil) ⇒ ::Gapic::Operation #delete_lake(name: nil) ⇒ ::Gapic::Operation

Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new

# Call the delete_lake method.
result = client.delete_lake request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_lake(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_lake via a request object, either of type Google::Cloud::Dataplex::V1::DeleteLakeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_lake(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_lake via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 538

def delete_lake request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_lake..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_lake.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_lake.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.delete_lake request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_task(request, options = nil) ⇒ ::Gapic::Operation #delete_task(name: nil) ⇒ ::Gapic::Operation

Delete the task resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new

# Call the delete_task method.
result = client.delete_task request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_task(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_task via a request object, either of type Google::Cloud::Dataplex::V1::DeleteTaskRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_task(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_task via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2179

def delete_task request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_task..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_task.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_task.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.delete_task request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_zone(request, options = nil) ⇒ ::Gapic::Operation #delete_zone(name: nil) ⇒ ::Gapic::Operation

Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new

# Call the delete_zone method.
result = client.delete_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_zone via a request object, either of type Google::Cloud::Dataplex::V1::DeleteZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_zone(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1088

def delete_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.delete_zone request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_asset(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Asset #get_asset(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Asset

Retrieves an asset resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetAssetRequest.new

# Call the get_asset method.
result = client.get_asset request

# The returned object is of type Google::Cloud::Dataplex::V1::Asset.
p result

Overloads:

  • #get_asset(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Asset

    Pass arguments to get_asset via a request object, either of type GetAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_asset(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Asset

    Pass arguments to get_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1814

def get_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_asset..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_asset request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_environment(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Environment #get_environment(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Environment

Get environment resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new

# Call the get_environment method.
result = client.get_environment request

# The returned object is of type Google::Cloud::Dataplex::V1::Environment.
p result

Overloads:

  • #get_environment(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Environment

    Pass arguments to get_environment via a request object, either of type GetEnvironmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_environment(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Environment

    Pass arguments to get_environment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 3156

def get_environment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_environment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_environment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_environment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_environment request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_job(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Job #get_job(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Job

Get job resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetJobRequest.new

# Call the get_job method.
result = client.get_job request

# The returned object is of type Google::Cloud::Dataplex::V1::Job.
p result

Overloads:

  • #get_job(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Job

    Pass arguments to get_job via a request object, either of type GetJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_job(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Job

    Pass arguments to get_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2621

def get_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_job..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_lake(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Lake #get_lake(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Lake

Retrieves a lake resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetLakeRequest.new

# Call the get_lake method.
result = client.get_lake request

# The returned object is of type Google::Cloud::Dataplex::V1::Lake.
p result

Overloads:

  • #get_lake(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Lake

    Pass arguments to get_lake via a request object, either of type GetLakeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_lake(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Lake

    Pass arguments to get_lake via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 714

def get_lake request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_lake..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_lake.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_lake.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_lake request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_task(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Task #get_task(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Task

Get task resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetTaskRequest.new

# Call the get_task method.
result = client.get_task request

# The returned object is of type Google::Cloud::Dataplex::V1::Task.
p result

Overloads:

  • #get_task(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Task

    Pass arguments to get_task via a request object, either of type GetTaskRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_task(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Task

    Pass arguments to get_task via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2354

def get_task request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_task..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_task.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_task.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_task request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_zone(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Zone #get_zone(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Zone

Retrieves a zone resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetZoneRequest.new

# Call the get_zone method.
result = client.get_zone request

# The returned object is of type Google::Cloud::Dataplex::V1::Zone.
p result

Overloads:

  • #get_zone(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Zone

    Pass arguments to get_zone via a request object, either of type GetZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_zone(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Zone

    Pass arguments to get_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1264

def get_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.get_zone request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_asset_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_asset_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

Lists action resources in an asset.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new

# Call the list_asset_actions method.
result = client.list_asset_actions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
  p item
end

Overloads:

  • #list_asset_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_asset_actions via a request object, either of type ListAssetActionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_asset_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_asset_actions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of actions to return. The service may return fewer than this value. If unspecified, at most 10 actions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListAssetActions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAssetActions must match the call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1906

def list_asset_actions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_asset_actions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_asset_actions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_asset_actions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_asset_actions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_assets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset> #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>

Lists asset resources in a zone.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new

# Call the list_assets method.
result = client.list_assets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Asset.
  p item
end

Overloads:

  • #list_assets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>

    Pass arguments to list_assets via a request object, either of type ListAssetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>

    Pass arguments to list_assets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of asset to return. The service may return fewer than this value. If unspecified, at most 10 assets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListAssets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAssets must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request.

    • order_by (::String) (defaults to: nil)

      Optional. Order by fields for the result.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1734

def list_assets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_assets..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_assets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_assets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_assets request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_environments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment> #list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>

Lists environments under the given lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new

# Call the list_environments method.
result = client.list_environments request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Environment.
  p item
end

Overloads:

  • #list_environments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>

    Pass arguments to list_environments via a request object, either of type ListEnvironmentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>

    Pass arguments to list_environments via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of environments to return. The service may return fewer than this value. If unspecified, at most 10 environments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListEnvironments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEnvironments must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request.

    • order_by (::String) (defaults to: nil)

      Optional. Order by fields for the result.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 3076

def list_environments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_environments..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_environments.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_environments.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_environments request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job> #list_jobs(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>

Lists Jobs under the given task.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListJobsRequest.new

# Call the list_jobs method.
result = client.list_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Job.
  p item
end

Overloads:

  • #list_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>

    Pass arguments to list_jobs via a request object, either of type ListJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_jobs(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>

    Pass arguments to list_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 10 jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListJobs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListJobs must match the call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2446

def list_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_jobs..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_lake_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_lake_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

Lists action resources in a lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new

# Call the list_lake_actions method.
result = client.list_lake_actions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
  p item
end

Overloads:

  • #list_lake_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_lake_actions via a request object, either of type ListLakeActionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_lake_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_lake_actions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of actions to return. The service may return fewer than this value. If unspecified, at most 10 actions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListLakeActions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListLakeActions must match the call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 806

def list_lake_actions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_lake_actions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_lake_actions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_lake_actions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_lake_actions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_lakes(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::ListLakesResponse #list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Dataplex::V1::ListLakesResponse

Lists lake resources in a project and location.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListLakesRequest.new

# Call the list_lakes method.
result = client.list_lakes request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Lake.
  p item
end

Overloads:

  • #list_lakes(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::ListLakesResponse

    Pass arguments to list_lakes via a request object, either of type ListLakesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Dataplex::V1::ListLakesResponse

    Pass arguments to list_lakes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of Lakes to return. The service may return fewer than this value. If unspecified, at most 10 lakes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListLakes call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListLakes must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request.

    • order_by (::String) (defaults to: nil)

      Optional. Order by fields for the result.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 635

def list_lakes request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_lakes..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_lakes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_lakes.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_lakes request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_sessions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session> #list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>

Lists session resources in an environment.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new

# Call the list_sessions method.
result = client.list_sessions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Session.
  p item
end

Overloads:

  • #list_sessions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>

    Pass arguments to list_sessions via a request object, either of type ListSessionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>

    Pass arguments to list_sessions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of sessions to return. The service may return fewer than this value. If unspecified, at most 10 sessions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListSessions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListSessions must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request. The following mode filter is supported to return only the sessions belonging to the requester when the mode is USER and return sessions of all the users when the mode is ADMIN. When no filter is sent default to USER mode. NOTE: When the mode is ADMIN, the requester should have dataplex.environments.listAllSessions permission to list all sessions, in absence of the permission, the request fails.

      mode = ADMIN | USER

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 3258

def list_sessions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_sessions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_sessions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_sessions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_sessions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_tasks(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::ListTasksResponse #list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Dataplex::V1::ListTasksResponse

Lists tasks under the given lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListTasksRequest.new

# Call the list_tasks method.
result = client.list_tasks request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Task.
  p item
end

Overloads:

  • #list_tasks(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::ListTasksResponse

    Pass arguments to list_tasks via a request object, either of type ListTasksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::Dataplex::V1::ListTasksResponse

    Pass arguments to list_tasks via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of tasks to return. The service may return fewer than this value. If unspecified, at most 10 tasks will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListZones call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListZones must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request.

    • order_by (::String) (defaults to: nil)

      Optional. Order by fields for the result.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2275

def list_tasks request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_tasks..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_tasks.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tasks.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_tasks request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zone_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_zone_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

Lists action resources in a zone.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new

# Call the list_zone_actions method.
result = client.list_zone_actions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
  p item
end

Overloads:

  • #list_zone_actions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_zone_actions via a request object, either of type ListZoneActionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_zone_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>

    Pass arguments to list_zone_actions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of actions to return. The service may return fewer than this value. If unspecified, at most 10 actions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListZoneActions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListZoneActions must match the call that provided the page token.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1356

def list_zone_actions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_zone_actions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_zone_actions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_zone_actions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_zone_actions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zones(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone> #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>

Lists zone resources in a lake.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListZonesRequest.new

# Call the list_zones method.
result = client.list_zones request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Zone.
  p item
end

Overloads:

  • #list_zones(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>

    Pass arguments to list_zones via a request object, either of type ListZonesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>

    Pass arguments to list_zones via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.

    • page_size (::Integer) (defaults to: nil)

      Optional. Maximum number of zones to return. The service may return fewer than this value. If unspecified, at most 10 zones will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Page token received from a previous ListZones call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListZones must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter request.

    • order_by (::String) (defaults to: nil)

      Optional. Order by fields for the result.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1184

def list_zones request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_zones..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_zones.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_zones.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.list_zones request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#run_task(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::RunTaskResponse #run_task(name: nil, labels: nil, args: nil) ⇒ ::Google::Cloud::Dataplex::V1::RunTaskResponse

Run an on demand execution of a Task.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::RunTaskRequest.new

# Call the run_task method.
result = client.run_task request

# The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse.
p result

Overloads:

  • #run_task(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::RunTaskResponse

    Pass arguments to run_task via a request object, either of type RunTaskRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #run_task(name: nil, labels: nil, args: nil) ⇒ ::Google::Cloud::Dataplex::V1::RunTaskResponse

    Pass arguments to run_task via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.

    • labels (::Hash{::String => ::String}) (defaults to: nil)

      Optional. User-defined labels for the task. If the map is left empty, the task will run with existing labels from task definition. If the map contains an entry with a new key, the same will be added to existing set of labels. If the map contains an entry with an existing label key in task definition, the task will run with new label value for that entry. Clearing an existing label will require label value to be explicitly set to a hyphen "-". The label value cannot be empty.

    • args (::Hash{::String => ::String}) (defaults to: nil)

      Optional. Execution spec arguments. If the map is left empty, the task will run with existing execution spec args from task definition. If the map contains an entry with a new key, the same will be added to existing set of args. If the map contains an entry with an existing arg key in task definition, the task will run with new arg value for that entry. Clearing an existing arg will require arg value to be explicitly set to a hyphen "-". The arg value cannot be empty.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2542

def run_task request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.run_task..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.run_task.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.run_task.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.run_task request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_asset(request, options = nil) ⇒ ::Gapic::Operation #update_asset(update_mask: nil, asset: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates an asset resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new

# Call the update_asset method.
result = client.update_asset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_asset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_asset via a request object, either of type UpdateAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_asset(update_mask: nil, asset: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update.

    • asset (::Google::Cloud::Dataplex::V1::Asset, ::Hash) (defaults to: nil)

      Required. Update description. Only fields specified in update_mask are updated.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1549

def update_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_asset..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.update_asset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_environment(request, options = nil) ⇒ ::Gapic::Operation #update_environment(update_mask: nil, environment: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update the environment resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new

# Call the update_environment method.
result = client.update_environment request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_environment(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_environment via a request object, either of type UpdateEnvironmentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_environment(update_mask: nil, environment: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_environment via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update.

    • environment (::Google::Cloud::Dataplex::V1::Environment, ::Hash) (defaults to: nil)

      Required. Update description. Only fields specified in update_mask are updated.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2890

def update_environment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_environment..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_environment.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_environment.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.update_environment request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_lake(request, options = nil) ⇒ ::Gapic::Operation #update_lake(update_mask: nil, lake: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates a lake resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new

# Call the update_lake method.
result = client.update_lake request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_lake(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_lake via a request object, either of type UpdateLakeRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_lake(update_mask: nil, lake: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_lake via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update.

    • lake (::Google::Cloud::Dataplex::V1::Lake, ::Hash) (defaults to: nil)

      Required. Update description. Only fields specified in update_mask are updated.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 450

def update_lake request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_lake..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_lake.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_lake.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.update_lake request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_task(request, options = nil) ⇒ ::Gapic::Operation #update_task(update_mask: nil, task: nil, validate_only: nil) ⇒ ::Gapic::Operation

Update the task resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new

# Call the update_task method.
result = client.update_task request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_task(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_task via a request object, either of type UpdateTaskRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_task(update_mask: nil, task: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_task via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update.

    • task (::Google::Cloud::Dataplex::V1::Task, ::Hash) (defaults to: nil)

      Required. Update description. Only fields specified in update_mask are updated.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 2092

def update_task request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_task..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_task.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_task.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.update_task request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_zone(request, options = nil) ⇒ ::Gapic::Operation #update_zone(update_mask: nil, zone: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates a zone resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new

# Call the update_zone method.
result = client.update_zone request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_zone(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_zone via a request object, either of type UpdateZoneRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_zone(update_mask: nil, zone: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_zone via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Mask of fields to update.

    • zone (::Google::Cloud::Dataplex::V1::Zone, ::Hash) (defaults to: nil)

      Required. Update description. Only fields specified in update_mask are updated.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the request, but do not perform mutations. The default is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb', line 1000

def update_zone request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_zone..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_zone.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_zone.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @dataplex_service_stub.update_zone request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end