Package google.cloud.managedkafka.v1

Index

ManagedKafka

The service that a client application uses to manage Apache Kafka clusters, topics and consumer groups.

CreateCluster

rpc CreateCluster(CreateClusterRequest) returns (Operation)

Creates a new cluster in a given project and location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateTopic

rpc CreateTopic(CreateTopicRequest) returns (Topic)

Creates a new topic in a given project and location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteCluster

rpc DeleteCluster(DeleteClusterRequest) returns (Operation)

Deletes a single cluster.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteConsumerGroup

rpc DeleteConsumerGroup(DeleteConsumerGroupRequest) returns (Empty)

Deletes a single consumer group.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteTopic

rpc DeleteTopic(DeleteTopicRequest) returns (Empty)

Deletes a single topic.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetCluster

rpc GetCluster(GetClusterRequest) returns (Cluster)

Returns the properties of a single cluster.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetConsumerGroup

rpc GetConsumerGroup(GetConsumerGroupRequest) returns (ConsumerGroup)

Returns the properties of a single consumer group.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetTopic

rpc GetTopic(GetTopicRequest) returns (Topic)

Returns the properties of a single topic.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListClusters

rpc ListClusters(ListClustersRequest) returns (ListClustersResponse)

Lists the clusters in a given project and location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListConsumerGroups

rpc ListConsumerGroups(ListConsumerGroupsRequest) returns (ListConsumerGroupsResponse)

Lists the consumer groups in a given cluster.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListTopics

rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse)

Lists the topics in a given cluster.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateCluster

rpc UpdateCluster(UpdateClusterRequest) returns (Operation)

Updates the properties of a single cluster.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateConsumerGroup

rpc UpdateConsumerGroup(UpdateConsumerGroupRequest) returns (ConsumerGroup)

Updates the properties of a single consumer group.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateTopic

rpc UpdateTopic(UpdateTopicRequest) returns (Topic)

Updates the properties of a single topic.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AccessConfig

The configuration of access to the Kafka cluster.

Fields
network_configs[]

NetworkConfig

Required. Virtual Private Cloud (VPC) networks that must be granted direct access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 networks can be specified.

Cluster

An Apache Kafka cluster deployed in a location.

Fields
name

string

Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}

create_time

Timestamp

Output only. The time when the cluster was created.

update_time

Timestamp

Output only. The time when the cluster was last updated.

labels

map<string, string>

Optional. Labels as key value pairs.

capacity_config

CapacityConfig

Required. Capacity configuration for the Kafka cluster.

rebalance_config

RebalanceConfig

Optional. Rebalance configuration for the Kafka cluster.

state

State

Output only. The current state of the cluster.

Union field platform_config. Platform specific configuration properties for a Kafka cluster. platform_config can be only one of the following:
gcp_config

GcpConfig

Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

State

The state of the cluster.

Enums
STATE_UNSPECIFIED A state was not specified.
CREATING The cluster is being created.
ACTIVE The cluster is active.
DELETING The cluster is being deleted.

ConsumerGroup

A Kafka consumer group in a given cluster.

Fields
name

string

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

topics

map<string, ConsumerTopicMetadata>

Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

ConsumerPartitionMetadata

Metadata for a consumer group corresponding to a specific partition.

Fields
offset

int64

Required. The offset for this partition, or 0 if no offset has been committed.

metadata

string

Optional. The associated metadata for this partition, or empty if it does not exist.

ConsumerTopicMetadata

Metadata for a consumer group corresponding to a specific topic.

Fields
partitions

map<int32, ConsumerPartitionMetadata>

Optional. Metadata for this consumer group and topic for all partition indexes it has metadata for.

CreateClusterRequest

Request for CreateCluster.

Fields
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

Cluster

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

CreateTopicRequest

Request for CreateTopic.

Fields
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

Topic

Required. Configuration of the topic to create. Its name field is ignored.

DeleteClusterRequest

Request for DeleteCluster.

Fields
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).

DeleteConsumerGroupRequest

Request for DeleteConsumerGroup.

Fields
name

string

Required. The name of the consumer group to delete. projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}.

DeleteTopicRequest

Request for DeleteTopic.

Fields
name

string

Required. The name of the topic to delete. projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}.

GcpConfig

Configuration properties for a Kafka cluster deployed to Google Cloud Platform.

Fields
access_config

AccessConfig

Required. Access configuration for the Kafka cluster.

kms_key

string

Optional. Immutable. The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Structured like: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. Note that the project component only accepts a project ID, and not a project number.

GetClusterRequest

Request for GetCluster.

Fields
name

string

Required. The name of the cluster whose configuration to return.

GetConsumerGroupRequest

Request for GetConsumerGroup.

Fields
name

string

Required. The name of the consumer group whose configuration to return. projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}.

GetTopicRequest

Request for GetTopic.

Fields
name

string

Required. The name of the topic whose configuration to return. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}.

ListClustersRequest

Request for ListClusters.

Fields
parent

string

Required. The parent location whose clusters are to be listed. Structured like projects/{project}/locations/{location}.

page_size

int32

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.

ListClustersResponse

Response for ListClusters.

Fields
clusters[]

Cluster

The list of Clusters in the requested parent.

next_page_token

string

A token that can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no more results.

unreachable[]

string

Locations that could not be reached.

ListConsumerGroupsRequest

Request for ListConsumerGroups.

Fields
parent

string

Required. The parent cluster whose consumer groups are to be listed. Structured like projects/{project}/locations/{location}/clusters/{cluster}.

page_size

int32

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.

ListConsumerGroupsResponse

Response for ListConsumerGroups.

Fields
consumer_groups[]

ConsumerGroup

The list of consumer group in the requested parent. The order of the consumer groups is unspecified.

next_page_token

string

A token that can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no more results.

ListTopicsRequest

Request for ListTopics.

Fields
parent

string

Required. The parent cluster whose topics are to be listed. Structured like projects/{project}/locations/{location}/clusters/{cluster}.

page_size

int32

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.

ListTopicsResponse

Response for ListTopics.

Fields
topics[]

Topic

The list of topics in the requested parent. The order of the topics is unspecified.

next_page_token

string

A token that can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no more results.

NetworkConfig

The configuration of a Virtual Private Cloud (VPC) network that can access the Kafka cluster.

Fields
subnet

string

Required. Name of the VPC subnet in which to create Private Service Connect (PSC) endpoints for the Kafka brokers and bootstrap address. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}

The subnet must be located in the same region as the Kafka cluster. The project may differ. Multiple subnets from the same parent network must not be specified.

The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918.

OperationMetadata

Represents the metadata of the long-running operation.

Fields
create_time

Timestamp

Output only. The time the operation was created.

end_time

Timestamp

Output only. The time the operation finished running.

target

string

Output only. Server-defined resource path for the target of the operation.

verb

string

Output only. Name of the verb executed by the operation.

status_message

string

Output only. Human-readable status of the operation, if any.

requested_cancellation

bool

Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have [Operation.error][] value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

api_version

string

Output only. API version used to start the operation.

RebalanceConfig

Defines rebalancing behavior of a Kafka cluster.

Fields
mode

Mode

Optional. The rebalance behavior for the cluster. When not specified, defaults to NO_REBALANCE.

Mode

The partition rebalance mode for the cluster.

Enums
MODE_UNSPECIFIED A mode was not specified. Do not use.
NO_REBALANCE Do not rebalance automatically.
AUTO_REBALANCE_ON_SCALE_UP Automatically rebalance topic partitions among brokers when the cluster is scaled up.

Topic

A Kafka topic in a given cluster.

Fields
name

string

Identifier. The name of the topic. The topic segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

partition_count

int32

Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.

replication_factor

int32

Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.

configs

map<string, string>

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

UpdateClusterRequest

Request for UpdateCluster.

Fields
update_mask

FieldMask

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

Cluster

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

UpdateConsumerGroupRequest

Request for UpdateConsumerGroup.

Fields
update_mask

FieldMask

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

ConsumerGroup

Required. The consumer group to update. Its name field must be populated.

UpdateTopicRequest

Request for UpdateTopic.

Fields
update_mask

FieldMask

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

Topic

Required. The topic to update. Its name field must be populated.