Reference documentation and code samples for the Managed Service for Apache Kafka V1 API class Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.
REST client for the ManagedKafka service.
The service that a client application uses to manage Apache Kafka clusters, topics and consumer groups.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ManagedKafka Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ManagedKafka clients ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ManagedKafka 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_cluster
def create_cluster(request, options = nil) -> ::Gapic::Operation
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
Creates a new cluster in a given project and location.
def create_cluster(request, options = nil) -> ::Gapic::Operation
create_cluster
via a request object, either of type
CreateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::CreateClusterRequest, ::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_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
create_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).
-
parent (::String) — Required. The parent region in which to create the cluster. Structured like
projects/{project}/locations/{location}
. -
cluster_id (::String) — Required. The ID to use for the 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
. -
cluster (::Google::Cloud::ManagedKafka::V1::Cluster, ::Hash) — Required. Configuration of the 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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::CreateClusterRequest.new # Call the create_cluster method. result = client.create_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_topic
def create_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
def create_topic(parent: nil, topic_id: nil, topic: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
Creates a new topic in a given project and location.
def create_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
create_topic
via a request object, either of type
CreateTopicRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::CreateTopicRequest, ::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_topic(parent: nil, topic_id: nil, topic: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
create_topic
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).
-
parent (::String) — Required. The parent cluster in which to create the topic.
Structured like
projects/{project}/locations/{location}/clusters/{cluster}
. -
topic_id (::String) — Required. The ID to use for the topic, which will become the final
component of the topic's name.
This value is structured like:
my-topic-name
. -
topic (::Google::Cloud::ManagedKafka::V1::Topic, ::Hash) — Required. Configuration of the topic to create. Its
name
field is ignored.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::Topic)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::CreateTopicRequest.new # Call the create_topic method. result = client.create_topic request # The returned object is of type Google::Cloud::ManagedKafka::V1::Topic. p result
#delete_cluster
def delete_cluster(request, options = nil) -> ::Gapic::Operation
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single cluster.
def delete_cluster(request, options = nil) -> ::Gapic::Operation
delete_cluster
via a request object, either of type
DeleteClusterRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::DeleteClusterRequest, ::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_cluster(name: nil, request_id: nil) -> ::Gapic::Operation
delete_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).
- name (::String) — Required. The name of the cluster to delete.
-
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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::DeleteClusterRequest.new # Call the delete_cluster method. result = client.delete_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_consumer_group
def delete_consumer_group(request, options = nil) -> ::Google::Protobuf::Empty
def delete_consumer_group(name: nil) -> ::Google::Protobuf::Empty
Deletes a single consumer group.
def delete_consumer_group(request, options = nil) -> ::Google::Protobuf::Empty
delete_consumer_group
via a request object, either of type
DeleteConsumerGroupRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::DeleteConsumerGroupRequest, ::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_consumer_group(name: nil) -> ::Google::Protobuf::Empty
delete_consumer_group
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).
-
name (::String) — Required. The name of the consumer group to delete.
projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::DeleteConsumerGroupRequest.new # Call the delete_consumer_group method. result = client.delete_consumer_group request # The returned object is of type Google::Protobuf::Empty. p result
#delete_topic
def delete_topic(request, options = nil) -> ::Google::Protobuf::Empty
def delete_topic(name: nil) -> ::Google::Protobuf::Empty
Deletes a single topic.
def delete_topic(request, options = nil) -> ::Google::Protobuf::Empty
delete_topic
via a request object, either of type
DeleteTopicRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::DeleteTopicRequest, ::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_topic(name: nil) -> ::Google::Protobuf::Empty
delete_topic
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).
-
name (::String) — Required. The name of the topic to delete.
projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::DeleteTopicRequest.new # Call the delete_topic method. result = client.delete_topic request # The returned object is of type Google::Protobuf::Empty. p result
#get_cluster
def get_cluster(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Cluster
def get_cluster(name: nil) -> ::Google::Cloud::ManagedKafka::V1::Cluster
Returns the properties of a single cluster.
def get_cluster(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Cluster
get_cluster
via a request object, either of type
GetClusterRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::GetClusterRequest, ::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_cluster(name: nil) -> ::Google::Cloud::ManagedKafka::V1::Cluster
get_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).
- name (::String) — Required. The name of the cluster whose configuration to return.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::Cluster)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::GetClusterRequest.new # Call the get_cluster method. result = client.get_cluster request # The returned object is of type Google::Cloud::ManagedKafka::V1::Cluster. p result
#get_consumer_group
def get_consumer_group(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
def get_consumer_group(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
Returns the properties of a single consumer group.
def get_consumer_group(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
get_consumer_group
via a request object, either of type
GetConsumerGroupRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::GetConsumerGroupRequest, ::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_consumer_group(name: nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
get_consumer_group
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).
-
name (::String) — Required. The name of the consumer group whose configuration to return.
projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::ConsumerGroup)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::GetConsumerGroupRequest.new # Call the get_consumer_group method. result = client.get_consumer_group request # The returned object is of type Google::Cloud::ManagedKafka::V1::ConsumerGroup. p result
#get_topic
def get_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
def get_topic(name: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
Returns the properties of a single topic.
def get_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
get_topic
via a request object, either of type
GetTopicRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::GetTopicRequest, ::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_topic(name: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
get_topic
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).
- name (::String) — Required. The name of the topic whose configuration to return. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::Topic)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::GetTopicRequest.new # Call the get_topic method. result = client.get_topic request # The returned object is of type Google::Cloud::ManagedKafka::V1::Topic. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ManagedKafka REST client object.
- (config) — Configure the ManagedKafka client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Client.new do |config| config.timeout = 10.0 end
#list_clusters
def list_clusters(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ListClustersResponse
def list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::ManagedKafka::V1::ListClustersResponse
Lists the clusters in a given project and location.
def list_clusters(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ListClustersResponse
list_clusters
via a request object, either of type
ListClustersRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::ListClustersRequest, ::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_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::ManagedKafka::V1::ListClustersResponse
list_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).
-
parent (::String) — Required. The parent location whose clusters are to be listed. Structured
like
projects/{project}/locations/{location}
. - page_size (::Integer) — Optional. The maximum number of 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
ListClusters
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListClusters
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::ListClustersResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::ListClustersRequest.new # Call the list_clusters method. result = client.list_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::Cluster. p item end
#list_consumer_groups
def list_consumer_groups(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>
def list_consumer_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>
Lists the consumer groups in a given cluster.
def list_consumer_groups(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>
list_consumer_groups
via a request object, either of type
ListConsumerGroupsRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::ListConsumerGroupsRequest, ::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_consumer_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>
list_consumer_groups
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).
-
parent (::String) — Required. The parent cluster whose consumer groups are to be listed.
Structured like
projects/{project}/locations/{location}/clusters/{cluster}
. - page_size (::Integer) — Optional. The maximum number of consumer groups to return. The service may return fewer than this value. If unset or zero, all consumer groups for the parent is returned.
-
page_token (::String) — Optional. A page token, received from a previous
ListConsumerGroups
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListConsumerGroups
must match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::ConsumerGroup>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::ListConsumerGroupsRequest.new # Call the list_consumer_groups method. result = client.list_consumer_groups 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::ConsumerGroup. p item end
#list_topics
def list_topics(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>
def list_topics(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>
Lists the topics in a given cluster.
def list_topics(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>
list_topics
via a request object, either of type
ListTopicsRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::ListTopicsRequest, ::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_topics(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>
list_topics
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).
-
parent (::String) — Required. The parent cluster whose topics are to be listed. Structured like
projects/{project}/locations/{location}/clusters/{cluster}
. - page_size (::Integer) — Optional. The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the parent is returned.
-
page_token (::String) — Optional. A page token, received from a previous
ListTopics
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListTopics
must match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ManagedKafka::V1::Topic>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::ListTopicsRequest.new # Call the list_topics method. result = client.list_topics 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::Topic. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_cluster
def update_cluster(request, options = nil) -> ::Gapic::Operation
def update_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
Updates the properties of a single cluster.
def update_cluster(request, options = nil) -> ::Gapic::Operation
update_cluster
via a request object, either of type
UpdateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::UpdateClusterRequest, ::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_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
update_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).
- 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.
-
cluster (::Google::Cloud::ManagedKafka::V1::Cluster, ::Hash) — Required. The 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).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::UpdateClusterRequest.new # Call the update_cluster method. result = client.update_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_consumer_group
def update_consumer_group(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
def update_consumer_group(update_mask: nil, consumer_group: nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
Updates the properties of a single consumer group.
def update_consumer_group(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
update_consumer_group
via a request object, either of type
UpdateConsumerGroupRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::UpdateConsumerGroupRequest, ::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_consumer_group(update_mask: nil, consumer_group: nil) -> ::Google::Cloud::ManagedKafka::V1::ConsumerGroup
update_consumer_group
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the ConsumerGroup 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.
-
consumer_group (::Google::Cloud::ManagedKafka::V1::ConsumerGroup, ::Hash) — Required. The consumer group to update. Its
name
field must be populated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::ConsumerGroup)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::UpdateConsumerGroupRequest.new # Call the update_consumer_group method. result = client.update_consumer_group request # The returned object is of type Google::Cloud::ManagedKafka::V1::ConsumerGroup. p result
#update_topic
def update_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
def update_topic(update_mask: nil, topic: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
Updates the properties of a single topic.
def update_topic(request, options = nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
update_topic
via a request object, either of type
UpdateTopicRequest or an equivalent Hash.
- request (::Google::Cloud::ManagedKafka::V1::UpdateTopicRequest, ::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_topic(update_mask: nil, topic: nil) -> ::Google::Cloud::ManagedKafka::V1::Topic
update_topic
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the Topic 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.
-
topic (::Google::Cloud::ManagedKafka::V1::Topic, ::Hash) — Required. The topic to update. Its
name
field must be populated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ManagedKafka::V1::Topic)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ManagedKafka::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ManagedKafka::V1::UpdateTopicRequest.new # Call the update_topic method. result = client.update_topic request # The returned object is of type Google::Cloud::ManagedKafka::V1::Topic. p result