Class: Google::Cloud::Connectors::V1::Connectors::Client

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

Overview

Client for the Connectors service.

Connectors is the interface for managing Connectors.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#connection_path, #connection_schema_metadata_path, #connector_path, #connector_version_path, #location_path, #provider_path, #runtime_config_path, #settings_path

Constructor Details

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

Create a new Connectors client object.

Examples:


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

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

Yields:

  • (config)

    Configure the Connectors client.

Yield Parameters:



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 192

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/connectors/v1/connectors_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

  @connectors_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Connectors::V1::Connectors::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 = @connectors_stub.endpoint
    config.universe_domain = @connectors_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 = @connectors_stub.endpoint
    config.universe_domain = @connectors_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)


272
273
274
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 272

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)


265
266
267
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 265

def location_client
  @location_client
end

#operations_client::Google::Cloud::Connectors::V1::Connectors::Operations (readonly)

Get the associated client for long-running operations.



258
259
260
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 258

def operations_client
  @operations_client
end

Class Method Details

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

Configure the Connectors Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 64

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Connectors", "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.list_connections.timeout = 60.0
    default_config.rpcs.list_connections.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

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

    default_config.rpcs.create_connection.timeout = 60.0

    default_config.rpcs.update_connection.timeout = 60.0

    default_config.rpcs.delete_connection.timeout = 60.0

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

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

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

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

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

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

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

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

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

    default_config.rpcs.get_runtime_config.timeout = 60.0
    default_config.rpcs.get_runtime_config.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

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

Configure the Connectors 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:



162
163
164
165
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 162

def configure
  yield @config if block_given?
  @config
end

#create_connection(request, options = nil) ⇒ ::Gapic::Operation #create_connection(parent: nil, connection_id: nil, connection: nil) ⇒ ::Gapic::Operation

Creates a new Connection in a given project and location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the create_connection method.
result = client.create_connection 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_connection(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_connection via a request object, either of type Google::Cloud::Connectors::V1::CreateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Connectors::V1::CreateConnectionRequest, ::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_connection(parent: nil, connection_id: nil, connection: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_connection 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. Parent resource of the Connection, of the form: projects/*/locations/*

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

      Required. Identifier to assign to the Connection. Must be unique within scope of the parent resource.

    • connection (::Google::Cloud::Connectors::V1::Connection, ::Hash) (defaults to: nil)

      Required. Connection resource.

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.



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 526

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::CreateConnectionRequest

  # 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_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_connection.retry_policy

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

  @connectors_stub.call_rpc :create_connection, 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_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_connection(name: nil) ⇒ ::Gapic::Operation

Deletes a single Connection.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the delete_connection method.
result = client.delete_connection 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_connection(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::DeleteConnectionRequest, ::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_connection(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_connection 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. Resource name of the form: projects/*/locations/*/connections/*

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.



732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 732

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::DeleteConnectionRequest

  # 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_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_connection.retry_policy

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

  @connectors_stub.call_rpc :delete_connection, 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_connection(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Connection #get_connection(name: nil, view: nil) ⇒ ::Google::Cloud::Connectors::V1::Connection

Gets details of a single Connection.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::Connection.
p result

Overloads:

  • #get_connection(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Connection

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetConnectionRequest, ::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_connection(name: nil, view: nil) ⇒ ::Google::Cloud::Connectors::V1::Connection

    Pass arguments to get_connection 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. Resource name of the form: projects/*/locations/*/connections/*

    • view (::Google::Cloud::Connectors::V1::ConnectionView) (defaults to: nil)

      Specifies which fields of the Connection are returned in the response. Defaults to BASIC view.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 427

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectionRequest

  # 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_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_connection.retry_policy

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

  @connectors_stub.call_rpc :get_connection, 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_connection_schema_metadata(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata #get_connection_schema_metadata(name: nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata

Gets schema metadata of a connection. SchemaMetadata is a singleton resource for each connection.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the get_connection_schema_metadata method.
result = client. request

# The returned object is of type Google::Cloud::Connectors::V1::ConnectionSchemaMetadata.
p result

Overloads:

  • #get_connection_schema_metadata(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest, ::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_connection_schema_metadata(name: nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectionSchemaMetadata

    Pass arguments to get_connection_schema_metadata 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. Connection name Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1383

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectionSchemaMetadataRequest

  # 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...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

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

  @connectors_stub.call_rpc :get_connection_schema_metadata, 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_connector(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Connector #get_connector(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Connector

Gets details of a single Connector.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::Connector.
p result

Overloads:

  • #get_connector(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Connector

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetConnectorRequest, ::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_connector(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Connector

    Pass arguments to get_connector 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. Resource name of the form: projects/*/locations/*/providers/*/connectors/* Only global location is supported for Connector resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1103

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectorRequest

  # 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_connector..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connector.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_connector.retry_policy

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

  @connectors_stub.call_rpc :get_connector, 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_connector_version(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectorVersion #get_connector_version(name: nil, view: nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectorVersion

Gets details of a single connector version.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::ConnectorVersion.
p result

Overloads:

  • #get_connector_version(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectorVersion

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetConnectorVersionRequest, ::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_connector_version(name: nil, view: nil) ⇒ ::Google::Cloud::Connectors::V1::ConnectorVersion

    Pass arguments to get_connector_version 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. Resource name of the form: projects/*/locations/*/providers/*/connectors/*/versions/* Only global location is supported for ConnectorVersion resource.

    • view (::Google::Cloud::Connectors::V1::ConnectorVersionView) (defaults to: nil)

      Specifies which fields of the ConnectorVersion are returned in the response. Defaults to CUSTOMER view.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1294

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetConnectorVersionRequest

  # 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_connector_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connector_version.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_connector_version.retry_policy

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

  @connectors_stub.call_rpc :get_connector_version, 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_global_settings(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Settings #get_global_settings(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Settings

GetGlobalSettings gets settings of a project. GlobalSettings is a singleton resource.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::Settings.
p result

Overloads:

  • #get_global_settings(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Settings

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetGlobalSettingsRequest, ::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_global_settings(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Settings

    Pass arguments to get_global_settings 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 Settings.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1862
1863
1864
1865
1866
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
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1862

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetGlobalSettingsRequest

  # 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_global_settings..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_global_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_global_settings.retry_policy

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

  @connectors_stub.call_rpc :get_global_settings, 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_provider(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Provider #get_provider(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Provider

Gets details of a provider.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::Provider.
p result

Overloads:

  • #get_provider(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::Provider

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetProviderRequest, ::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_provider(name: nil) ⇒ ::Google::Cloud::Connectors::V1::Provider

    Pass arguments to get_provider 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. Resource name of the form: projects/*/locations/*/providers/* Only global location is supported for Provider resource.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 918

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetProviderRequest

  # 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_provider..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_provider.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_provider.retry_policy

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

  @connectors_stub.call_rpc :get_provider, 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_runtime_config(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::RuntimeConfig #get_runtime_config(name: nil) ⇒ ::Google::Cloud::Connectors::V1::RuntimeConfig

Gets the runtimeConfig of a location. RuntimeConfig is a singleton resource for each location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

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

# The returned object is of type Google::Cloud::Connectors::V1::RuntimeConfig.
p result

Overloads:

  • #get_runtime_config(request, options = nil) ⇒ ::Google::Cloud::Connectors::V1::RuntimeConfig

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::GetRuntimeConfigRequest, ::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_runtime_config(name: nil) ⇒ ::Google::Cloud::Connectors::V1::RuntimeConfig

    Pass arguments to get_runtime_config 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. Resource name of the form: projects/*/locations/*/runtimeConfig

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1775

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::GetRuntimeConfigRequest

  # 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_runtime_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_runtime_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_runtime_config.retry_policy

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

  @connectors_stub.call_rpc :get_runtime_config, 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_connections(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection> #list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection>

Lists Connections in a given project and location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_connections method.
result = client.list_connections 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::Connectors::V1::Connection.
  p item
end

Overloads:

  • #list_connections(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListConnectionsRequest, ::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_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connection>

    Pass arguments to list_connections 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. Parent resource of the Connection, of the form: projects/*/locations/*

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

      Page size.

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

      Page token.

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

      Filter.

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

      Order by parameters.

    • view (::Google::Cloud::Connectors::V1::ConnectionView) (defaults to: nil)

      Specifies which fields of the Connection are returned in the response. Defaults to BASIC view.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 336

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectionsRequest

  # 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_connections..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connections.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connections.retry_policy

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

  @connectors_stub.call_rpc :list_connections, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connections, 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_connector_versions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion> #list_connector_versions(parent: nil, page_size: nil, page_token: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion>

Lists Connector Versions in a given project and location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_connector_versions method.
result = client.list_connector_versions 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::Connectors::V1::ConnectorVersion.
  p item
end

Overloads:

  • #list_connector_versions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListConnectorVersionsRequest, ::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_connector_versions(parent: nil, page_size: nil, page_token: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::ConnectorVersion>

    Pass arguments to list_connector_versions 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. Parent resource of the connectors, of the form: projects/*/locations/*/providers/*/connectors/* Only global location is supported for ConnectorVersion resource.

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

      Page size.

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

      Page token.

    • view (::Google::Cloud::Connectors::V1::ConnectorVersionView) (defaults to: nil)

      Specifies which fields of the ConnectorVersion are returned in the response. Defaults to BASIC view.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1202

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectorVersionsRequest

  # 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_connector_versions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connector_versions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connector_versions.retry_policy

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

  @connectors_stub.call_rpc :list_connector_versions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connector_versions, 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_connectors(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector> #list_connectors(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector>

Lists Connectors in a given project and location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_connectors method.
result = client.list_connectors 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::Connectors::V1::Connector.
  p item
end

Overloads:

  • #list_connectors(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListConnectorsRequest, ::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_connectors(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Connector>

    Pass arguments to list_connectors 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. Parent resource of the connectors, of the form: projects/*/locations/*/providers/* Only global location is supported for Connector resource.

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

      Page size.

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

      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.



1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1014

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListConnectorsRequest

  # 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_connectors..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_connectors.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connectors.retry_policy

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

  @connectors_stub.call_rpc :list_connectors, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_connectors, 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_providers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider> #list_providers(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider>

Lists Providers in a given project and location.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_providers method.
result = client.list_providers 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::Connectors::V1::Provider.
  p item
end

Overloads:

  • #list_providers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListProvidersRequest, ::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_providers(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::Provider>

    Pass arguments to list_providers 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. Parent resource of the API, of the form: projects/*/locations/* Only global location is supported for Provider resource.

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

      Page size.

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

      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.



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 829

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListProvidersRequest

  # 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_providers..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_providers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_providers.retry_policy

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

  @connectors_stub.call_rpc :list_providers, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_providers, 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_runtime_action_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema> #list_runtime_action_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema>

List schema of a runtime actions filtered by action name.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_runtime_action_schemas method.
result = client.list_runtime_action_schemas 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::Connectors::V1::RuntimeActionSchema.
  p item
end

Overloads:

  • #list_runtime_action_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest, ::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_runtime_action_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeActionSchema>

    Pass arguments to list_runtime_action_schemas 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. Parent resource of RuntimeActionSchema Format: projects/{project}/locations/{location}/connections/{connection}

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

      Page size.

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

      Page token.

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

      Required. Filter Format: action="{actionId}" Only action field is supported with literal equality operator. Accepted filter example: action="CancelOrder" Wildcards are not supported in the filter currently.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1686

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListRuntimeActionSchemasRequest

  # 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_runtime_action_schemas..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_runtime_action_schemas.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_runtime_action_schemas.retry_policy

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

  @connectors_stub.call_rpc :list_runtime_action_schemas, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_action_schemas, 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_runtime_entity_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema> #list_runtime_entity_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema>

List schema of a runtime entities filtered by entity name.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the list_runtime_entity_schemas method.
result = client.list_runtime_entity_schemas 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::Connectors::V1::RuntimeEntitySchema.
  p item
end

Overloads:

  • #list_runtime_entity_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema>

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest, ::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_runtime_entity_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Connectors::V1::RuntimeEntitySchema>

    Pass arguments to list_runtime_entity_schemas 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. Parent resource of RuntimeEntitySchema Format: projects/{project}/locations/{location}/connections/{connection}

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

      Page size.

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

      Page token.

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

      Required. Filter Format: entity="{entityId}" Only entity field is supported with literal equality operator. Accepted filter example: entity="Order" Wildcards are not supported in the filter currently.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1582

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::ListRuntimeEntitySchemasRequest

  # 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_runtime_entity_schemas..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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_runtime_entity_schemas.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_runtime_entity_schemas.retry_policy

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

  @connectors_stub.call_rpc :list_runtime_entity_schemas, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @connectors_stub, :list_runtime_entity_schemas, 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

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

Refresh runtime schema of a connection.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the refresh_connection_schema_metadata method.
result = client. 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:

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

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest, ::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.

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

    Pass arguments to refresh_connection_schema_metadata 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. Resource name. Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata

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.



1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 1478

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::RefreshConnectionSchemaMetadataRequest

  # 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...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

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

  @connectors_stub.call_rpc :refresh_connection_schema_metadata, 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

#universe_domainString

The effective universe domain

Returns:

  • (String)


172
173
174
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 172

def universe_domain
  @connectors_stub.universe_domain
end

#update_connection(request, options = nil) ⇒ ::Gapic::Operation #update_connection(connection: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Connection.

Examples:

Basic example

require "google/cloud/connectors/v1"

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

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

# Call the update_connection method.
result = client.update_connection 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_connection(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::Connectors::V1::UpdateConnectionRequest, ::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_connection(connection: nil, update_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_connection 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:

    • connection (::Google::Cloud::Connectors::V1::Connection, ::Hash) (defaults to: nil)

      Required. Connection resource.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. You can modify only the fields listed below.

      To lock/unlock a connection:

      • lock_config

      To suspend/resume a connection:

      • suspended

      To update the connection details:

      • description
      • labels
      • connector_version
      • config_variables
      • auth_config
      • destination_configs
      • node_config

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.



637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
# File 'lib/google/cloud/connectors/v1/connectors/client.rb', line 637

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Connectors::V1::UpdateConnectionRequest

  # 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_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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::Connectors::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.connection&.name
    header_params["connection.name"] = request.connection.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_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_connection.retry_policy

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

  @connectors_stub.call_rpc :update_connection, 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