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

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

Overview

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 client object.

Examples:


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

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

Yields:

  • (config)

    Configure the DataplexService client.

Yield Parameters:



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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 234

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/dataplex/v1/service_services_pb"

  # 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.nil? ||
                           (@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 = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @dataplex_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool
  )

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

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

Instance Attribute Details

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

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

Returns:

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


314
315
316
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 314

def iam_policy_client
  @iam_policy_client
end

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

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

Returns:

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


307
308
309
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 307

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



300
301
302
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 300

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::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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
187
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 65

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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2911

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :cancel_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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:



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

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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1569

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_asset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3016

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_environment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 385

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_lake, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2154

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_task, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 978

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :create_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1763

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_asset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3210

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_environment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 579

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_lake, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



2347
2348
2349
2350
2351
2352
2353
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/client.rb', line 2347

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_task, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
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
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1172

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :delete_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1954

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_asset, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3402

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_environment, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2825

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_job, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 770

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_lake, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2537
2538
2539
2540
2541
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
2576
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2537

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_task, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1362

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :get_zone, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_asset_actions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_asset_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2053

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_asset_actions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_assets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset> #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1867

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_assets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_environments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment> #list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3315

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_environments, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job> #list_jobs(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2636

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_lake_actions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_lake_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 869

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_lake_actions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 683

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_lakes, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_sessions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session> #list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3511

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_sessions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

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::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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>

    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) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>

    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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2450

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_tasks, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zone_actions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action> #list_zone_actions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1461

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_zone_actions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_zones(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone> #list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::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::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::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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1275

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :list_zones, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2739

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :run_task, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


214
215
216
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 214

def universe_domain
  @dataplex_service_stub.universe_domain
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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1668

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.asset&.name
    header_params["asset.name"] = request.asset.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_asset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 3115

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.environment&.name
    header_params["environment.name"] = request.environment.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_environment, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 484

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.lake&.name
    header_params["lake.name"] = request.lake.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_lake, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 2253

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.task&.name
    header_params["task.name"] = request.task.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_task, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => 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::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:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the RPC is aborted.



1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
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
# File 'lib/google/cloud/dataplex/v1/dataplex_service/client.rb', line 1077

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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.zone&.name
    header_params["zone.name"] = request.zone.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  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.call_rpc :update_zone, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end