KafkaClient#
Auto-generated documentation for Kafka type annotations stubs module mypy-boto3-kafka.
KafkaClient#
Type annotations and code completion for boto3.client("kafka")
.
boto3 documentation
# KafkaClient usage example
from boto3.session import Session
from mypy_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 mypy_boto3_kafka.client import Exceptions
def handle_error(exc: Exceptions.BadRequestException) -> None:
...
Methods#
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)
...
# batch_associate_scram_secret method usage example with argument unpacking
kwargs: BatchAssociateScramSecretRequestRequestTypeDef = { # (1)
"ClusterArn": ...,
"SecretArnList": ...,
}
parent.batch_associate_scram_secret(**kwargs)
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)
...
# batch_disassociate_scram_secret method usage example with argument unpacking
kwargs: BatchDisassociateScramSecretRequestRequestTypeDef = { # (1)
"ClusterArn": ...,
"SecretArnList": ...,
}
parent.batch_disassociate_scram_secret(**kwargs)
can_paginate#
Check if an operation can be paginated.
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:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("kafka").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
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: Union[BrokerNodeGroupInfoTypeDef, BrokerNodeGroupInfoExtraOutputTypeDef], # (1)
ClusterName: str,
KafkaVersion: str,
NumberOfBrokerNodes: int,
ClientAuthentication: Union[ClientAuthenticationTypeDef, ClientAuthenticationExtraOutputTypeDef] = ..., # (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)
...