Skip to content

KafkaClient#

Index > Kafka > KafkaClient

Auto-generated documentation for Kafka type annotations stubs module types-boto3-kafka.

KafkaClient#

Type annotations and code completion for boto3.client("kafka"). boto3 documentation

# KafkaClient usage example

from boto3.session import Session
from types_boto3_kafka.client import KafkaClient

def get_kafka_client() -> KafkaClient:
    return Session().client("kafka")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("kafka").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("kafka")

try:
    do_something(client)
except (
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.ForbiddenException,
    client.exceptions.InternalServerErrorException,
    client.exceptions.NotFoundException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.UnauthorizedException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from types_boto3_kafka.client import Exceptions

def handle_error(exc: Exceptions.BadRequestException) -> None:
    ...

Methods#

can_paginate#

Type annotations and code completion for boto3.client("kafka").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

generate_presigned_url#

Type annotations and code completion for boto3.client("kafka").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

batch_associate_scram_secret#

Associates one or more Scram Secrets with an Amazon MSK cluster.

Type annotations and code completion for boto3.client("kafka").batch_associate_scram_secret method. boto3 documentation

# batch_associate_scram_secret method definition

def batch_associate_scram_secret(
    self,
    *,
    ClusterArn: str,
    SecretArnList: Sequence[str],
) -> BatchAssociateScramSecretResponseTypeDef:  # (1)
    ...
  1. See BatchAssociateScramSecretResponseTypeDef
# batch_associate_scram_secret method usage example with argument unpacking

kwargs: BatchAssociateScramSecretRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "SecretArnList": ...,
}

parent.batch_associate_scram_secret(**kwargs)
  1. See BatchAssociateScramSecretRequestRequestTypeDef

create_cluster#

Creates a new MSK cluster.

Type annotations and code completion for boto3.client("kafka").create_cluster method. boto3 documentation

# create_cluster method definition

def create_cluster(
    self,
    *,
    BrokerNodeGroupInfo: BrokerNodeGroupInfoTypeDef,  # (1)
    ClusterName: str,
    KafkaVersion: str,
    NumberOfBrokerNodes: int,
    ClientAuthentication: ClientAuthenticationTypeDef = ...,  # (2)
    ConfigurationInfo: ConfigurationInfoTypeDef = ...,  # (3)
    EncryptionInfo: EncryptionInfoTypeDef = ...,  # (4)
    EnhancedMonitoring: EnhancedMonitoringType = ...,  # (5)
    OpenMonitoring: OpenMonitoringInfoTypeDef = ...,  # (6)
    LoggingInfo: LoggingInfoTypeDef = ...,  # (7)
    Tags: Mapping[str, str] = ...,
    StorageMode: StorageModeType = ...,  # (8)
) -> CreateClusterResponseTypeDef:  # (9)
    ...
  1. See BrokerNodeGroupInfoTypeDef
  2. See ClientAuthenticationTypeDef
  3. See ConfigurationInfoTypeDef
  4. See EncryptionInfoTypeDef
  5. See EnhancedMonitoringType
  6. See OpenMonitoringInfoTypeDef
  7. See LoggingInfoTypeDef
  8. See StorageModeType
  9. See CreateClusterResponseTypeDef
# create_cluster method usage example with argument unpacking

kwargs: CreateClusterRequestRequestTypeDef = {  # (1)
    "BrokerNodeGroupInfo": ...,
    "ClusterName": ...,
    "KafkaVersion": ...,
    "NumberOfBrokerNodes": ...,
}

parent.create_cluster(**kwargs)
  1. See CreateClusterRequestRequestTypeDef

create_cluster_v2#

Creates a new MSK cluster.

Type annotations and code completion for boto3.client("kafka").create_cluster_v2 method. boto3 documentation

# create_cluster_v2 method definition

def create_cluster_v2(
    self,
    *,
    ClusterName: str,
    Tags: Mapping[str, str] = ...,
    Provisioned: ProvisionedRequestTypeDef = ...,  # (1)
    Serverless: ServerlessRequestTypeDef = ...,  # (2)
) -> CreateClusterV2ResponseTypeDef:  # (3)
    ...
  1. See ProvisionedRequestTypeDef
  2. See ServerlessRequestTypeDef
  3. See CreateClusterV2ResponseTypeDef
# create_cluster_v2 method usage example with argument unpacking

kwargs: CreateClusterV2RequestRequestTypeDef = {  # (1)
    "ClusterName": ...,
}

parent.create_cluster_v2(**kwargs)
  1. See CreateClusterV2RequestRequestTypeDef

create_configuration#

Creates a new MSK configuration.

Type annotations and code completion for boto3.client("kafka").create_configuration method. boto3 documentation

# create_configuration method definition

def create_configuration(
    self,
    *,
    Name: str,
    ServerProperties: BlobTypeDef,
    Description: str = ...,
    KafkaVersions: Sequence[str] = ...,
) -> CreateConfigurationResponseTypeDef:  # (1)
    ...
  1. See CreateConfigurationResponseTypeDef
# create_configuration method usage example with argument unpacking

kwargs: CreateConfigurationRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ServerProperties": ...,
}

parent.create_configuration(**kwargs)
  1. See CreateConfigurationRequestRequestTypeDef

create_replicator#

Creates the replicator.

Type annotations and code completion for boto3.client("kafka").create_replicator method. boto3 documentation

# create_replicator method definition

def create_replicator(
    self,
    *,
    KafkaClusters: Sequence[KafkaClusterTypeDef],  # (1)
    ReplicationInfoList: Sequence[ReplicationInfoTypeDef],  # (2)
    ReplicatorName: str,
    ServiceExecutionRoleArn: str,
    Description: str = ...,
    Tags: Mapping[str, str] = ...,
) -> CreateReplicatorResponseTypeDef:  # (3)
    ...
  1. See KafkaClusterTypeDef
  2. See ReplicationInfoTypeDef
  3. See CreateReplicatorResponseTypeDef
# create_replicator method usage example with argument unpacking

kwargs: CreateReplicatorRequestRequestTypeDef = {  # (1)
    "KafkaClusters": ...,
    "ReplicationInfoList": ...,
    "ReplicatorName": ...,
    "ServiceExecutionRoleArn": ...,
}

parent.create_replicator(**kwargs)
  1. See CreateReplicatorRequestRequestTypeDef

create_vpc_connection#

Creates a new MSK VPC connection.

Type annotations and code completion for boto3.client("kafka").create_vpc_connection method. boto3 documentation

# create_vpc_connection method definition

def create_vpc_connection(
    self,
    *,
    TargetClusterArn: str,
    Authentication: str,
    VpcId: str,
    ClientSubnets: Sequence[str],
    SecurityGroups: Sequence[str],
    Tags: Mapping[str, str] = ...,
) -> CreateVpcConnectionResponseTypeDef:  # (1)
    ...
  1. See CreateVpcConnectionResponseTypeDef
# create_vpc_connection method usage example with argument unpacking

kwargs: CreateVpcConnectionRequestRequestTypeDef = {  # (1)
    "TargetClusterArn": ...,
    "Authentication": ...,
    "VpcId": ...,
    "ClientSubnets": ...,
    "SecurityGroups": ...,
}

parent.create_vpc_connection(**kwargs)
  1. See CreateVpcConnectionRequestRequestTypeDef

delete_cluster#

Deletes the MSK cluster specified by the Amazon Resource Name (ARN) in the request.

Type annotations and code completion for boto3.client("kafka").delete_cluster method. boto3 documentation

# delete_cluster method definition

def delete_cluster(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str = ...,
) -> DeleteClusterResponseTypeDef:  # (1)
    ...
  1. See DeleteClusterResponseTypeDef
# delete_cluster method usage example with argument unpacking

kwargs: DeleteClusterRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.delete_cluster(**kwargs)
  1. See DeleteClusterRequestRequestTypeDef

delete_cluster_policy#

Deletes the MSK cluster policy specified by the Amazon Resource Name (ARN) in the request.

Type annotations and code completion for boto3.client("kafka").delete_cluster_policy method. boto3 documentation

# delete_cluster_policy method definition

def delete_cluster_policy(
    self,
    *,
    ClusterArn: str,
) -> dict[str, Any]:
    ...
# delete_cluster_policy method usage example with argument unpacking

kwargs: DeleteClusterPolicyRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.delete_cluster_policy(**kwargs)
  1. See DeleteClusterPolicyRequestRequestTypeDef

delete_configuration#

Deletes an MSK Configuration.

Type annotations and code completion for boto3.client("kafka").delete_configuration method. boto3 documentation

# delete_configuration method definition

def delete_configuration(
    self,
    *,
    Arn: str,
) -> DeleteConfigurationResponseTypeDef:  # (1)
    ...
  1. See DeleteConfigurationResponseTypeDef
# delete_configuration method usage example with argument unpacking

kwargs: DeleteConfigurationRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.delete_configuration(**kwargs)
  1. See DeleteConfigurationRequestRequestTypeDef

delete_replicator#

Deletes a replicator.

Type annotations and code completion for boto3.client("kafka").delete_replicator method. boto3 documentation

# delete_replicator method definition

def delete_replicator(
    self,
    *,
    ReplicatorArn: str,
    CurrentVersion: str = ...,
) -> DeleteReplicatorResponseTypeDef:  # (1)
    ...
  1. See DeleteReplicatorResponseTypeDef
# delete_replicator method usage example with argument unpacking

kwargs: DeleteReplicatorRequestRequestTypeDef = {  # (1)
    "ReplicatorArn": ...,
}

parent.delete_replicator(**kwargs)
  1. See DeleteReplicatorRequestRequestTypeDef

delete_vpc_connection#

Deletes a MSK VPC connection.

Type annotations and code completion for boto3.client("kafka").delete_vpc_connection method. boto3 documentation

# delete_vpc_connection method definition

def delete_vpc_connection(
    self,
    *,
    Arn: str,
) -> DeleteVpcConnectionResponseTypeDef:  # (1)
    ...
  1. See DeleteVpcConnectionResponseTypeDef
# delete_vpc_connection method usage example with argument unpacking

kwargs: DeleteVpcConnectionRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.delete_vpc_connection(**kwargs)
  1. See DeleteVpcConnectionRequestRequestTypeDef

describe_cluster#

Returns a description of the MSK cluster whose Amazon Resource Name (ARN) is specified in the request.

Type annotations and code completion for boto3.client("kafka").describe_cluster method. boto3 documentation

# describe_cluster method definition

def describe_cluster(
    self,
    *,
    ClusterArn: str,
) -> DescribeClusterResponseTypeDef:  # (1)
    ...
  1. See DescribeClusterResponseTypeDef
# describe_cluster method usage example with argument unpacking

kwargs: DescribeClusterRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.describe_cluster(**kwargs)
  1. See DescribeClusterRequestRequestTypeDef

describe_cluster_v2#

Returns a description of the MSK cluster whose Amazon Resource Name (ARN) is specified in the request.

Type annotations and code completion for boto3.client("kafka").describe_cluster_v2 method. boto3 documentation

# describe_cluster_v2 method definition

def describe_cluster_v2(
    self,
    *,
    ClusterArn: str,
) -> DescribeClusterV2ResponseTypeDef:  # (1)
    ...
  1. See DescribeClusterV2ResponseTypeDef
# describe_cluster_v2 method usage example with argument unpacking

kwargs: DescribeClusterV2RequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.describe_cluster_v2(**kwargs)
  1. See DescribeClusterV2RequestRequestTypeDef

describe_cluster_operation#

Returns a description of the cluster operation specified by the ARN.

Type annotations and code completion for boto3.client("kafka").describe_cluster_operation method. boto3 documentation

# describe_cluster_operation method definition

def describe_cluster_operation(
    self,
    *,
    ClusterOperationArn: str,
) -> DescribeClusterOperationResponseTypeDef:  # (1)
    ...
  1. See DescribeClusterOperationResponseTypeDef
# describe_cluster_operation method usage example with argument unpacking

kwargs: DescribeClusterOperationRequestRequestTypeDef = {  # (1)
    "ClusterOperationArn": ...,
}

parent.describe_cluster_operation(**kwargs)
  1. See DescribeClusterOperationRequestRequestTypeDef

describe_cluster_operation_v2#

Returns a description of the cluster operation specified by the ARN.

Type annotations and code completion for boto3.client("kafka").describe_cluster_operation_v2 method. boto3 documentation

# describe_cluster_operation_v2 method definition

def describe_cluster_operation_v2(
    self,
    *,
    ClusterOperationArn: str,
) -> DescribeClusterOperationV2ResponseTypeDef:  # (1)
    ...
  1. See DescribeClusterOperationV2ResponseTypeDef
# describe_cluster_operation_v2 method usage example with argument unpacking

kwargs: DescribeClusterOperationV2RequestRequestTypeDef = {  # (1)
    "ClusterOperationArn": ...,
}

parent.describe_cluster_operation_v2(**kwargs)
  1. See DescribeClusterOperationV2RequestRequestTypeDef

describe_configuration#

Returns a description of this MSK configuration.

Type annotations and code completion for boto3.client("kafka").describe_configuration method. boto3 documentation

# describe_configuration method definition

def describe_configuration(
    self,
    *,
    Arn: str,
) -> DescribeConfigurationResponseTypeDef:  # (1)
    ...
  1. See DescribeConfigurationResponseTypeDef
# describe_configuration method usage example with argument unpacking

kwargs: DescribeConfigurationRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.describe_configuration(**kwargs)
  1. See DescribeConfigurationRequestRequestTypeDef

describe_configuration_revision#

Returns a description of this revision of the configuration.

Type annotations and code completion for boto3.client("kafka").describe_configuration_revision method. boto3 documentation

# describe_configuration_revision method definition

def describe_configuration_revision(
    self,
    *,
    Arn: str,
    Revision: int,
) -> DescribeConfigurationRevisionResponseTypeDef:  # (1)
    ...
  1. See DescribeConfigurationRevisionResponseTypeDef
# describe_configuration_revision method usage example with argument unpacking

kwargs: DescribeConfigurationRevisionRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "Revision": ...,
}

parent.describe_configuration_revision(**kwargs)
  1. See DescribeConfigurationRevisionRequestRequestTypeDef

describe_replicator#

Describes a replicator.

Type annotations and code completion for boto3.client("kafka").describe_replicator method. boto3 documentation

# describe_replicator method definition

def describe_replicator(
    self,
    *,
    ReplicatorArn: str,
) -> DescribeReplicatorResponseTypeDef:  # (1)
    ...
  1. See DescribeReplicatorResponseTypeDef
# describe_replicator method usage example with argument unpacking

kwargs: DescribeReplicatorRequestRequestTypeDef = {  # (1)
    "ReplicatorArn": ...,
}

parent.describe_replicator(**kwargs)
  1. See DescribeReplicatorRequestRequestTypeDef

describe_vpc_connection#

Returns a description of this MSK VPC connection.

Type annotations and code completion for boto3.client("kafka").describe_vpc_connection method. boto3 documentation

# describe_vpc_connection method definition

def describe_vpc_connection(
    self,
    *,
    Arn: str,
) -> DescribeVpcConnectionResponseTypeDef:  # (1)
    ...
  1. See DescribeVpcConnectionResponseTypeDef
# describe_vpc_connection method usage example with argument unpacking

kwargs: DescribeVpcConnectionRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.describe_vpc_connection(**kwargs)
  1. See DescribeVpcConnectionRequestRequestTypeDef

batch_disassociate_scram_secret#

Disassociates one or more Scram Secrets from an Amazon MSK cluster.

Type annotations and code completion for boto3.client("kafka").batch_disassociate_scram_secret method. boto3 documentation

# batch_disassociate_scram_secret method definition

def batch_disassociate_scram_secret(
    self,
    *,
    ClusterArn: str,
    SecretArnList: Sequence[str],
) -> BatchDisassociateScramSecretResponseTypeDef:  # (1)
    ...
  1. See BatchDisassociateScramSecretResponseTypeDef
# batch_disassociate_scram_secret method usage example with argument unpacking

kwargs: BatchDisassociateScramSecretRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "SecretArnList": ...,
}

parent.batch_disassociate_scram_secret(**kwargs)
  1. See BatchDisassociateScramSecretRequestRequestTypeDef

get_bootstrap_brokers#

A list of brokers that a client application can use to bootstrap.

Type annotations and code completion for boto3.client("kafka").get_bootstrap_brokers method. boto3 documentation

# get_bootstrap_brokers method definition

def get_bootstrap_brokers(
    self,
    *,
    ClusterArn: str,
) -> GetBootstrapBrokersResponseTypeDef:  # (1)
    ...
  1. See GetBootstrapBrokersResponseTypeDef
# get_bootstrap_brokers method usage example with argument unpacking

kwargs: GetBootstrapBrokersRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.get_bootstrap_brokers(**kwargs)
  1. See GetBootstrapBrokersRequestRequestTypeDef

get_compatible_kafka_versions#

Gets the Apache Kafka versions to which you can update the MSK cluster.

Type annotations and code completion for boto3.client("kafka").get_compatible_kafka_versions method. boto3 documentation

# get_compatible_kafka_versions method definition

def get_compatible_kafka_versions(
    self,
    *,
    ClusterArn: str = ...,
) -> GetCompatibleKafkaVersionsResponseTypeDef:  # (1)
    ...
  1. See GetCompatibleKafkaVersionsResponseTypeDef
# get_compatible_kafka_versions method usage example with argument unpacking

kwargs: GetCompatibleKafkaVersionsRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.get_compatible_kafka_versions(**kwargs)
  1. See GetCompatibleKafkaVersionsRequestRequestTypeDef

get_cluster_policy#

Get the MSK cluster policy specified by the Amazon Resource Name (ARN) in the request.

Type annotations and code completion for boto3.client("kafka").get_cluster_policy method. boto3 documentation

# get_cluster_policy method definition

def get_cluster_policy(
    self,
    *,
    ClusterArn: str,
) -> GetClusterPolicyResponseTypeDef:  # (1)
    ...
  1. See GetClusterPolicyResponseTypeDef
# get_cluster_policy method usage example with argument unpacking

kwargs: GetClusterPolicyRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.get_cluster_policy(**kwargs)
  1. See GetClusterPolicyRequestRequestTypeDef

list_cluster_operations#

Returns a list of all the operations that have been performed on the specified MSK cluster.

Type annotations and code completion for boto3.client("kafka").list_cluster_operations method. boto3 documentation

# list_cluster_operations method definition

def list_cluster_operations(
    self,
    *,
    ClusterArn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListClusterOperationsResponseTypeDef:  # (1)
    ...
  1. See ListClusterOperationsResponseTypeDef
# list_cluster_operations method usage example with argument unpacking

kwargs: ListClusterOperationsRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.list_cluster_operations(**kwargs)
  1. See ListClusterOperationsRequestRequestTypeDef

list_cluster_operations_v2#

Returns a list of all the operations that have been performed on the specified MSK cluster.

Type annotations and code completion for boto3.client("kafka").list_cluster_operations_v2 method. boto3 documentation

# list_cluster_operations_v2 method definition

def list_cluster_operations_v2(
    self,
    *,
    ClusterArn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListClusterOperationsV2ResponseTypeDef:  # (1)
    ...
  1. See ListClusterOperationsV2ResponseTypeDef
# list_cluster_operations_v2 method usage example with argument unpacking

kwargs: ListClusterOperationsV2RequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.list_cluster_operations_v2(**kwargs)
  1. See ListClusterOperationsV2RequestRequestTypeDef

list_clusters#

Returns a list of all the MSK clusters in the current Region.

Type annotations and code completion for boto3.client("kafka").list_clusters method. boto3 documentation

# list_clusters method definition

def list_clusters(
    self,
    *,
    ClusterNameFilter: str = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListClustersResponseTypeDef:  # (1)
    ...
  1. See ListClustersResponseTypeDef
# list_clusters method usage example with argument unpacking

kwargs: ListClustersRequestRequestTypeDef = {  # (1)
    "ClusterNameFilter": ...,
}

parent.list_clusters(**kwargs)
  1. See ListClustersRequestRequestTypeDef

list_clusters_v2#

Returns a list of all the MSK clusters in the current Region.

Type annotations and code completion for boto3.client("kafka").list_clusters_v2 method. boto3 documentation

# list_clusters_v2 method definition

def list_clusters_v2(
    self,
    *,
    ClusterNameFilter: str = ...,
    ClusterTypeFilter: str = ...,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListClustersV2ResponseTypeDef:  # (1)
    ...
  1. See ListClustersV2ResponseTypeDef
# list_clusters_v2 method usage example with argument unpacking

kwargs: ListClustersV2RequestRequestTypeDef = {  # (1)
    "ClusterNameFilter": ...,
}

parent.list_clusters_v2(**kwargs)
  1. See ListClustersV2RequestRequestTypeDef

list_configuration_revisions#

Returns a list of all the MSK configurations in this Region.

Type annotations and code completion for boto3.client("kafka").list_configuration_revisions method. boto3 documentation

# list_configuration_revisions method definition

def list_configuration_revisions(
    self,
    *,
    Arn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListConfigurationRevisionsResponseTypeDef:  # (1)
    ...
  1. See ListConfigurationRevisionsResponseTypeDef
# list_configuration_revisions method usage example with argument unpacking

kwargs: ListConfigurationRevisionsRequestRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.list_configuration_revisions(**kwargs)
  1. See ListConfigurationRevisionsRequestRequestTypeDef

list_configurations#

Returns a list of all the MSK configurations in this Region.

Type annotations and code completion for boto3.client("kafka").list_configurations method. boto3 documentation

# list_configurations method definition

def list_configurations(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListConfigurationsResponseTypeDef:  # (1)
    ...
  1. See ListConfigurationsResponseTypeDef
# list_configurations method usage example with argument unpacking

kwargs: ListConfigurationsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_configurations(**kwargs)
  1. See ListConfigurationsRequestRequestTypeDef

list_kafka_versions#

Returns a list of Apache Kafka versions.

Type annotations and code completion for boto3.client("kafka").list_kafka_versions method. boto3 documentation

# list_kafka_versions method definition

def list_kafka_versions(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListKafkaVersionsResponseTypeDef:  # (1)
    ...
  1. See ListKafkaVersionsResponseTypeDef
# list_kafka_versions method usage example with argument unpacking

kwargs: ListKafkaVersionsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_kafka_versions(**kwargs)
  1. See ListKafkaVersionsRequestRequestTypeDef

list_nodes#

Returns a list of the broker nodes in the cluster.

Type annotations and code completion for boto3.client("kafka").list_nodes method. boto3 documentation

# list_nodes method definition

def list_nodes(
    self,
    *,
    ClusterArn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListNodesResponseTypeDef:  # (1)
    ...
  1. See ListNodesResponseTypeDef
# list_nodes method usage example with argument unpacking

kwargs: ListNodesRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.list_nodes(**kwargs)
  1. See ListNodesRequestRequestTypeDef

list_replicators#

Lists the replicators.

Type annotations and code completion for boto3.client("kafka").list_replicators method. boto3 documentation

# list_replicators method definition

def list_replicators(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
    ReplicatorNameFilter: str = ...,
) -> ListReplicatorsResponseTypeDef:  # (1)
    ...
  1. See ListReplicatorsResponseTypeDef
# list_replicators method usage example with argument unpacking

kwargs: ListReplicatorsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_replicators(**kwargs)
  1. See ListReplicatorsRequestRequestTypeDef

list_scram_secrets#

Returns a list of the Scram Secrets associated with an Amazon MSK cluster.

Type annotations and code completion for boto3.client("kafka").list_scram_secrets method. boto3 documentation

# list_scram_secrets method definition

def list_scram_secrets(
    self,
    *,
    ClusterArn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListScramSecretsResponseTypeDef:  # (1)
    ...
  1. See ListScramSecretsResponseTypeDef
# list_scram_secrets method usage example with argument unpacking

kwargs: ListScramSecretsRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.list_scram_secrets(**kwargs)
  1. See ListScramSecretsRequestRequestTypeDef

list_tags_for_resource#

Returns a list of the tags associated with the specified resource.

Type annotations and code completion for boto3.client("kafka").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_client_vpc_connections#

Returns a list of all the VPC connections in this Region.

Type annotations and code completion for boto3.client("kafka").list_client_vpc_connections method. boto3 documentation

# list_client_vpc_connections method definition

def list_client_vpc_connections(
    self,
    *,
    ClusterArn: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListClientVpcConnectionsResponseTypeDef:  # (1)
    ...
  1. See ListClientVpcConnectionsResponseTypeDef
# list_client_vpc_connections method usage example with argument unpacking

kwargs: ListClientVpcConnectionsRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
}

parent.list_client_vpc_connections(**kwargs)
  1. See ListClientVpcConnectionsRequestRequestTypeDef

list_vpc_connections#

Returns a list of all the VPC connections in this Region.

Type annotations and code completion for boto3.client("kafka").list_vpc_connections method. boto3 documentation

# list_vpc_connections method definition

def list_vpc_connections(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListVpcConnectionsResponseTypeDef:  # (1)
    ...
  1. See ListVpcConnectionsResponseTypeDef
# list_vpc_connections method usage example with argument unpacking

kwargs: ListVpcConnectionsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_vpc_connections(**kwargs)
  1. See ListVpcConnectionsRequestRequestTypeDef

reject_client_vpc_connection#

Returns empty response.

Type annotations and code completion for boto3.client("kafka").reject_client_vpc_connection method. boto3 documentation

# reject_client_vpc_connection method definition

def reject_client_vpc_connection(
    self,
    *,
    ClusterArn: str,
    VpcConnectionArn: str,
) -> dict[str, Any]:
    ...
# reject_client_vpc_connection method usage example with argument unpacking

kwargs: RejectClientVpcConnectionRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "VpcConnectionArn": ...,
}

parent.reject_client_vpc_connection(**kwargs)
  1. See RejectClientVpcConnectionRequestRequestTypeDef

put_cluster_policy#

Creates or updates the MSK cluster policy specified by the cluster Amazon Resource Name (ARN) in the request.

Type annotations and code completion for boto3.client("kafka").put_cluster_policy method. boto3 documentation

# put_cluster_policy method definition

def put_cluster_policy(
    self,
    *,
    ClusterArn: str,
    Policy: str,
    CurrentVersion: str = ...,
) -> PutClusterPolicyResponseTypeDef:  # (1)
    ...
  1. See PutClusterPolicyResponseTypeDef
# put_cluster_policy method usage example with argument unpacking

kwargs: PutClusterPolicyRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "Policy": ...,
}

parent.put_cluster_policy(**kwargs)
  1. See PutClusterPolicyRequestRequestTypeDef

reboot_broker#

Reboots brokers.

Type annotations and code completion for boto3.client("kafka").reboot_broker method. boto3 documentation

# reboot_broker method definition

def reboot_broker(
    self,
    *,
    BrokerIds: Sequence[str],
    ClusterArn: str,
) -> RebootBrokerResponseTypeDef:  # (1)
    ...
  1. See RebootBrokerResponseTypeDef
# reboot_broker method usage example with argument unpacking

kwargs: RebootBrokerRequestRequestTypeDef = {  # (1)
    "BrokerIds": ...,
    "ClusterArn": ...,
}

parent.reboot_broker(**kwargs)
  1. See RebootBrokerRequestRequestTypeDef

tag_resource#

Adds tags to the specified MSK resource.

Type annotations and code completion for boto3.client("kafka").tag_resource method. boto3 documentation

# tag_resource method definition

def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Mapping[str, str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes the tags associated with the keys that are provided in the query.

Type annotations and code completion for boto3.client("kafka").untag_resource method. boto3 documentation

# untag_resource method definition

def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_broker_count#

Updates the number of broker nodes in the cluster.

Type annotations and code completion for boto3.client("kafka").update_broker_count method. boto3 documentation

# update_broker_count method definition

def update_broker_count(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    TargetNumberOfBrokerNodes: int,
) -> UpdateBrokerCountResponseTypeDef:  # (1)
    ...
  1. See UpdateBrokerCountResponseTypeDef
# update_broker_count method usage example with argument unpacking

kwargs: UpdateBrokerCountRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
    "TargetNumberOfBrokerNodes": ...,
}

parent.update_broker_count(**kwargs)
  1. See UpdateBrokerCountRequestRequestTypeDef

update_broker_type#

Updates EC2 instance type.

Type annotations and code completion for boto3.client("kafka").update_broker_type method. boto3 documentation

# update_broker_type method definition

def update_broker_type(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    TargetInstanceType: str,
) -> UpdateBrokerTypeResponseTypeDef:  # (1)
    ...
  1. See UpdateBrokerTypeResponseTypeDef
# update_broker_type method usage example with argument unpacking

kwargs: UpdateBrokerTypeRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
    "TargetInstanceType": ...,
}

parent.update_broker_type(**kwargs)
  1. See UpdateBrokerTypeRequestRequestTypeDef

update_broker_storage#

Updates the EBS storage associated with MSK brokers.

Type annotations and code completion for boto3.client("kafka").update_broker_storage method. boto3 documentation

# update_broker_storage method definition

def update_broker_storage(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    TargetBrokerEBSVolumeInfo: Sequence[BrokerEBSVolumeInfoTypeDef],  # (1)
) -> UpdateBrokerStorageResponseTypeDef:  # (2)
    ...
  1. See BrokerEBSVolumeInfoTypeDef
  2. See UpdateBrokerStorageResponseTypeDef
# update_broker_storage method usage example with argument unpacking

kwargs: UpdateBrokerStorageRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
    "TargetBrokerEBSVolumeInfo": ...,
}

parent.update_broker_storage(**kwargs)
  1. See UpdateBrokerStorageRequestRequestTypeDef

update_configuration#

Updates an MSK configuration.

Type annotations and code completion for boto3.client("kafka").update_configuration method. boto3 documentation

# update_configuration method definition

def update_configuration(
    self,
    *,
    Arn: str,
    ServerProperties: BlobTypeDef,
    Description: str = ...,
) -> UpdateConfigurationResponseTypeDef:  # (1)
    ...
  1. See UpdateConfigurationResponseTypeDef
# update_configuration method usage example with argument unpacking

kwargs: UpdateConfigurationRequestRequestTypeDef = {  # (1)
    "Arn": ...,
    "ServerProperties": ...,
}

parent.update_configuration(**kwargs)
  1. See UpdateConfigurationRequestRequestTypeDef

update_connectivity#

Updates the cluster's connectivity configuration.

Type annotations and code completion for boto3.client("kafka").update_connectivity method. boto3 documentation

# update_connectivity method definition

def update_connectivity(
    self,
    *,
    ClusterArn: str,
    ConnectivityInfo: ConnectivityInfoTypeDef,  # (1)
    CurrentVersion: str,
) -> UpdateConnectivityResponseTypeDef:  # (2)
    ...
  1. See ConnectivityInfoTypeDef
  2. See UpdateConnectivityResponseTypeDef
# update_connectivity method usage example with argument unpacking

kwargs: UpdateConnectivityRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "ConnectivityInfo": ...,
    "CurrentVersion": ...,
}

parent.update_connectivity(**kwargs)
  1. See UpdateConnectivityRequestRequestTypeDef

update_cluster_configuration#

Updates the cluster with the configuration that is specified in the request body.

Type annotations and code completion for boto3.client("kafka").update_cluster_configuration method. boto3 documentation

# update_cluster_configuration method definition

def update_cluster_configuration(
    self,
    *,
    ClusterArn: str,
    ConfigurationInfo: ConfigurationInfoTypeDef,  # (1)
    CurrentVersion: str,
) -> UpdateClusterConfigurationResponseTypeDef:  # (2)
    ...
  1. See ConfigurationInfoTypeDef
  2. See UpdateClusterConfigurationResponseTypeDef
# update_cluster_configuration method usage example with argument unpacking

kwargs: UpdateClusterConfigurationRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "ConfigurationInfo": ...,
    "CurrentVersion": ...,
}

parent.update_cluster_configuration(**kwargs)
  1. See UpdateClusterConfigurationRequestRequestTypeDef

update_cluster_kafka_version#

Updates the Apache Kafka version for the cluster.

Type annotations and code completion for boto3.client("kafka").update_cluster_kafka_version method. boto3 documentation

# update_cluster_kafka_version method definition

def update_cluster_kafka_version(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    TargetKafkaVersion: str,
    ConfigurationInfo: ConfigurationInfoTypeDef = ...,  # (1)
) -> UpdateClusterKafkaVersionResponseTypeDef:  # (2)
    ...
  1. See ConfigurationInfoTypeDef
  2. See UpdateClusterKafkaVersionResponseTypeDef
# update_cluster_kafka_version method usage example with argument unpacking

kwargs: UpdateClusterKafkaVersionRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
    "TargetKafkaVersion": ...,
}

parent.update_cluster_kafka_version(**kwargs)
  1. See UpdateClusterKafkaVersionRequestRequestTypeDef

update_monitoring#

Updates the monitoring settings for the cluster.

Type annotations and code completion for boto3.client("kafka").update_monitoring method. boto3 documentation

# update_monitoring method definition

def update_monitoring(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    EnhancedMonitoring: EnhancedMonitoringType = ...,  # (1)
    OpenMonitoring: OpenMonitoringInfoTypeDef = ...,  # (2)
    LoggingInfo: LoggingInfoTypeDef = ...,  # (3)
) -> UpdateMonitoringResponseTypeDef:  # (4)
    ...
  1. See EnhancedMonitoringType
  2. See OpenMonitoringInfoTypeDef
  3. See LoggingInfoTypeDef
  4. See UpdateMonitoringResponseTypeDef
# update_monitoring method usage example with argument unpacking

kwargs: UpdateMonitoringRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
}

parent.update_monitoring(**kwargs)
  1. See UpdateMonitoringRequestRequestTypeDef

update_replication_info#

Updates replication info of a replicator.

Type annotations and code completion for boto3.client("kafka").update_replication_info method. boto3 documentation

# update_replication_info method definition

def update_replication_info(
    self,
    *,
    CurrentVersion: str,
    ReplicatorArn: str,
    SourceKafkaClusterArn: str,
    TargetKafkaClusterArn: str,
    ConsumerGroupReplication: ConsumerGroupReplicationUpdateTypeDef = ...,  # (1)
    TopicReplication: TopicReplicationUpdateTypeDef = ...,  # (2)
) -> UpdateReplicationInfoResponseTypeDef:  # (3)
    ...
  1. See ConsumerGroupReplicationUpdateTypeDef
  2. See TopicReplicationUpdateTypeDef
  3. See UpdateReplicationInfoResponseTypeDef
# update_replication_info method usage example with argument unpacking

kwargs: UpdateReplicationInfoRequestRequestTypeDef = {  # (1)
    "CurrentVersion": ...,
    "ReplicatorArn": ...,
    "SourceKafkaClusterArn": ...,
    "TargetKafkaClusterArn": ...,
}

parent.update_replication_info(**kwargs)
  1. See UpdateReplicationInfoRequestRequestTypeDef

update_security#

Updates the security settings for the cluster.

Type annotations and code completion for boto3.client("kafka").update_security method. boto3 documentation

# update_security method definition

def update_security(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    ClientAuthentication: ClientAuthenticationTypeDef = ...,  # (1)
    EncryptionInfo: EncryptionInfoTypeDef = ...,  # (2)
) -> UpdateSecurityResponseTypeDef:  # (3)
    ...
  1. See ClientAuthenticationTypeDef
  2. See EncryptionInfoTypeDef
  3. See UpdateSecurityResponseTypeDef
# update_security method usage example with argument unpacking

kwargs: UpdateSecurityRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
}

parent.update_security(**kwargs)
  1. See UpdateSecurityRequestRequestTypeDef

update_storage#

Updates cluster broker volume size (or) sets cluster storage mode to TIERED.

Type annotations and code completion for boto3.client("kafka").update_storage method. boto3 documentation

# update_storage method definition

def update_storage(
    self,
    *,
    ClusterArn: str,
    CurrentVersion: str,
    ProvisionedThroughput: ProvisionedThroughputTypeDef = ...,  # (1)
    StorageMode: StorageModeType = ...,  # (2)
    VolumeSizeGB: int = ...,
) -> UpdateStorageResponseTypeDef:  # (3)
    ...
  1. See ProvisionedThroughputTypeDef
  2. See StorageModeType
  3. See UpdateStorageResponseTypeDef
# update_storage method usage example with argument unpacking

kwargs: UpdateStorageRequestRequestTypeDef = {  # (1)
    "ClusterArn": ...,
    "CurrentVersion": ...,
}

parent.update_storage(**kwargs)
  1. See UpdateStorageRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("kafka").get_paginator method with overloads.