Managed Service for Apache Kafka V1 API - Class Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Client (v1.1.0)

Reference documentation and code samples for the Managed Service for Apache Kafka V1 API class Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Client.

Client for the ManagedKafkaConnect service.

The service that a client application uses to manage Apache Kafka Connect clusters and connectors.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the ManagedKafkaConnect Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all ManagedKafkaConnect clients
::Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the ManagedKafkaConnect 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 Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_connect_cluster

def create_connect_cluster(request, options = nil) -> ::Gapic::Operation
def create_connect_cluster(parent: nil, connect_cluster_id: nil, connect_cluster: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Kafka Connect cluster in a given project and location.

Overloads
def create_connect_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_connect_cluster via a request object, either of type CreateConnectClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::CreateConnectClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_connect_cluster(parent: nil, connect_cluster_id: nil, connect_cluster: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_connect_cluster 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) — Required. The parent project/location in which to create the Kafka Connect cluster. Structured like projects/{project}/locations/{location}/.
  • connect_cluster_id (::String) — Required. The ID to use for the Connect cluster, which will become the final component of the cluster's name. The ID must be 1-63 characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? to comply with RFC 1035.

    This value is structured like: my-cluster-id.

  • connect_cluster (::Google::Cloud::ManagedKafka::V1::ConnectCluster, ::Hash) — Required. Configuration of the Kafka Connect cluster to create. Its name field is ignored.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID to avoid duplication of requests. If a request times out or fails, retrying with the same ID allows the server to recognize the previous attempt. For at least 60 minutes, the server ignores duplicate requests bearing the same ID.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID within 60 minutes of the last request, the server checks if an original operation with the same request ID was received. If so, the server ignores the second request.

    The request ID must be a valid UUID. A zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

#create_connector

def create_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
def create_connector(parent: nil, connector_id: nil, connector: nil) -> ::Google::Cloud::ManagedKafka::V1::Connector

Creates a new connector in a given Connect cluster.

Overloads
def create_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
Pass arguments to create_connector via a request object, either of type CreateConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::CreateConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_connector(parent: nil, connector_id: nil, connector: nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
Pass arguments to create_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
  • parent (::String) — Required. The parent Connect cluster in which to create the connector. Structured like projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}.
  • connector_id (::String) — Required. The ID to use for the connector, which will become the final component of the connector's name. The ID must be 1-63 characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? to comply with RFC 1035.

    This value is structured like: my-connector-id.

  • connector (::Google::Cloud::ManagedKafka::V1::Connector, ::Hash) — Required. The connector to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

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

#delete_connect_cluster

def delete_connect_cluster(request, options = nil) -> ::Gapic::Operation
def delete_connect_cluster(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Connect cluster.

Overloads
def delete_connect_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_connect_cluster via a request object, either of type DeleteConnectClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::DeleteConnectClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_connect_cluster(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_connect_cluster 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) — Required. The name of the Kafka Connect cluster to delete. Structured like projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID to avoid duplication of requests. If a request times out or fails, retrying with the same ID allows the server to recognize the previous attempt. For at least 60 minutes, the server ignores duplicate requests bearing the same ID.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID within 60 minutes of the last request, the server checks if an original operation with the same request ID was received. If so, the server ignores the second request.

    The request ID must be a valid UUID. A zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

#delete_connector

def delete_connector(request, options = nil) -> ::Google::Protobuf::Empty
def delete_connector(name: nil) -> ::Google::Protobuf::Empty

Deletes a connector.

Overloads
def delete_connector(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_connector via a request object, either of type DeleteConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::DeleteConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_connector(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_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).
Parameter
  • name (::String) — Required. The name of the connector to delete. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

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

#get_connect_cluster

def get_connect_cluster(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConnectCluster
def get_connect_cluster(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ConnectCluster

Returns the properties of a single Kafka Connect cluster.

Overloads
def get_connect_cluster(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConnectCluster
Pass arguments to get_connect_cluster via a request object, either of type GetConnectClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::GetConnectClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_connect_cluster(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ConnectCluster
Pass arguments to get_connect_cluster 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).
Parameter
  • name (::String) — Required. The name of the Kafka Connect cluster whose configuration to return. Structured like projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedKafka::V1::ConnectCluster.
p result

#get_connector

def get_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
def get_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::Connector

Returns the properties of a single connector.

Overloads
def get_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
Pass arguments to get_connector via a request object, either of type GetConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_connector(name: nil) -> ::Google::Cloud::ManagedKafka::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).
Parameter
  • name (::String) — Required. The name of the connector whose configuration to return. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

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

#initialize

def initialize() { |config| ... } -> Client

Create a new ManagedKafkaConnect client object.

Yields
  • (config) — Configure the ManagedKafkaConnect client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Client.new

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

#list_connect_clusters

def list_connect_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConnectCluster>
def list_connect_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConnectCluster>

Lists the Kafka Connect clusters in a given project and location.

Overloads
def list_connect_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConnectCluster>
Pass arguments to list_connect_clusters via a request object, either of type ListConnectClustersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::ListConnectClustersRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_connect_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConnectCluster>
Pass arguments to list_connect_clusters 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) — Required. The parent project/location whose Connect clusters are to be listed. Structured like projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. The maximum number of Connect clusters to return. The service may return fewer than this value. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A page token, received from a previous ListConnectClusters call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListConnectClusters must match the call that provided the page token.

  • filter (::String) — Optional. Filter expression for the result.
  • order_by (::String) — 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.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

# Call the list_connect_clusters method.
result = client.list_connect_clusters 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::ManagedKafka::V1::ConnectCluster.
  p item
end

#list_connectors

def list_connectors(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Connector>
def list_connectors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Connector>

Lists the connectors in a given Connect cluster.

Overloads
def list_connectors(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Connector>
Pass arguments to list_connectors via a request object, either of type ListConnectorsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_connectors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ManagedKafka::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) — Required. The parent Connect cluster whose connectors are to be listed. Structured like projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}.
  • page_size (::Integer) — Optional. The maximum number of connectors to return. The service may return fewer than this value. If unspecified, server will pick an appropriate default.
  • page_token (::String) — Optional. A page token, received from a previous ListConnectors call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListConnectors 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.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ManagedKafka::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::ManagedKafka::V1::Connector.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::ManagedKafka::V1::ManagedKafkaConnect::Operations

Get the associated client for long-running operations.

#pause_connector

def pause_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::PauseConnectorResponse
def pause_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::PauseConnectorResponse

Pauses the connector and its tasks.

Overloads
def pause_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::PauseConnectorResponse
Pass arguments to pause_connector via a request object, either of type PauseConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::PauseConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def pause_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::PauseConnectorResponse
Pass arguments to pause_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).
Parameter
  • name (::String) — Required. The name of the connector to pause. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedKafka::V1::PauseConnectorResponse.
p result

#restart_connector

def restart_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::RestartConnectorResponse
def restart_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::RestartConnectorResponse

Restarts the connector.

Overloads
def restart_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::RestartConnectorResponse
Pass arguments to restart_connector via a request object, either of type RestartConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::RestartConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def restart_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::RestartConnectorResponse
Pass arguments to restart_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).
Parameter
  • name (::String) — Required. The name of the connector to restart. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedKafka::V1::RestartConnectorResponse.
p result

#resume_connector

def resume_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ResumeConnectorResponse
def resume_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ResumeConnectorResponse

Resumes the connector and its tasks.

Overloads
def resume_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ResumeConnectorResponse
Pass arguments to resume_connector via a request object, either of type ResumeConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::ResumeConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def resume_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ResumeConnectorResponse
Pass arguments to resume_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).
Parameter
  • name (::String) — Required. The name of the connector to pause. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedKafka::V1::ResumeConnectorResponse.
p result

#stop_connector

def stop_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::StopConnectorResponse
def stop_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::StopConnectorResponse

Stops the connector.

Overloads
def stop_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::StopConnectorResponse
Pass arguments to stop_connector via a request object, either of type StopConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::StopConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop_connector(name: nil) -> ::Google::Cloud::ManagedKafka::V1::StopConnectorResponse
Pass arguments to stop_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).
Parameter
  • name (::String) — Required. The name of the connector to stop. Structured like: projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

# The returned object is of type Google::Cloud::ManagedKafka::V1::StopConnectorResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_connect_cluster

def update_connect_cluster(request, options = nil) -> ::Gapic::Operation
def update_connect_cluster(update_mask: nil, connect_cluster: nil, request_id: nil) -> ::Gapic::Operation

Updates the properties of a single Kafka Connect cluster.

Overloads
def update_connect_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_connect_cluster via a request object, either of type UpdateConnectClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::UpdateConnectClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_connect_cluster(update_mask: nil, connect_cluster: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_connect_cluster 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) — Required. Field mask is used to specify the fields to be overwritten in the cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The mask is required and a value of * will update all fields.
  • connect_cluster (::Google::Cloud::ManagedKafka::V1::ConnectCluster, ::Hash) — Required. The Kafka Connect cluster to update. Its name field must be populated.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID to avoid duplication of requests. If a request times out or fails, retrying with the same ID allows the server to recognize the previous attempt. For at least 60 minutes, the server ignores duplicate requests bearing the same ID.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID within 60 minutes of the last request, the server checks if an original operation with the same request ID was received. If so, the server ignores the second request.

    The request ID must be a valid UUID. A zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

#update_connector

def update_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
def update_connector(update_mask: nil, connector: nil) -> ::Google::Cloud::ManagedKafka::V1::Connector

Updates the properties of a connector.

Overloads
def update_connector(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
Pass arguments to update_connector via a request object, either of type UpdateConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ManagedKafka::V1::UpdateConnectorRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_connector(update_mask: nil, connector: nil) -> ::Google::Cloud::ManagedKafka::V1::Connector
Pass arguments to update_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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The mask is required and a value of * will update all fields.
  • connector (::Google::Cloud::ManagedKafka::V1::Connector, ::Hash) — Required. The connector to update. Its name field must be populated.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/managed_kafka/v1"

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

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

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

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