Kafka / Client / create_cluster_v2
create_cluster_v2#
- Kafka.Client.create_cluster_v2(**kwargs)#
Creates a new MSK cluster.
See also: AWS API Documentation
Request Syntax
response = client.create_cluster_v2( ClusterName='string', Tags={ 'string': 'string' }, Provisioned={ 'BrokerNodeGroupInfo': { 'BrokerAZDistribution': 'DEFAULT', 'ClientSubnets': [ 'string', ], 'InstanceType': 'string', 'SecurityGroups': [ 'string', ], 'StorageInfo': { 'EbsStorageInfo': { 'ProvisionedThroughput': { 'Enabled': True|False, 'VolumeThroughput': 123 }, 'VolumeSize': 123 } }, 'ConnectivityInfo': { 'PublicAccess': { 'Type': 'string' } } }, 'ClientAuthentication': { 'Sasl': { 'Scram': { 'Enabled': True|False }, 'Iam': { 'Enabled': True|False } }, 'Tls': { 'CertificateAuthorityArnList': [ 'string', ], 'Enabled': True|False }, 'Unauthenticated': { 'Enabled': True|False } }, 'ConfigurationInfo': { 'Arn': 'string', 'Revision': 123 }, 'EncryptionInfo': { 'EncryptionAtRest': { 'DataVolumeKMSKeyId': 'string' }, 'EncryptionInTransit': { 'ClientBroker': 'TLS'|'TLS_PLAINTEXT'|'PLAINTEXT', 'InCluster': True|False } }, 'EnhancedMonitoring': 'DEFAULT'|'PER_BROKER'|'PER_TOPIC_PER_BROKER'|'PER_TOPIC_PER_PARTITION', 'OpenMonitoring': { 'Prometheus': { 'JmxExporter': { 'EnabledInBroker': True|False }, 'NodeExporter': { 'EnabledInBroker': True|False } } }, 'KafkaVersion': 'string', 'LoggingInfo': { 'BrokerLogs': { 'CloudWatchLogs': { 'Enabled': True|False, 'LogGroup': 'string' }, 'Firehose': { 'DeliveryStream': 'string', 'Enabled': True|False }, 'S3': { 'Bucket': 'string', 'Enabled': True|False, 'Prefix': 'string' } } }, 'NumberOfBrokerNodes': 123, 'StorageMode': 'LOCAL'|'TIERED' }, Serverless={ 'VpcConfigs': [ { 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ] }, ], 'ClientAuthentication': { 'Sasl': { 'Iam': { 'Enabled': True|False } } } } )
- Parameters:
ClusterName (string) –
[REQUIRED]
The name of the cluster.
Tags (dict) –
A map of tags that you want the cluster to have.
(string) –
(string) –
Provisioned (dict) –
Information about the provisioned cluster.
BrokerNodeGroupInfo (dict) – [REQUIRED]
Information about the brokers.
BrokerAZDistribution (string) –
The distribution of broker nodes across Availability Zones. This is an optional parameter. If you don’t specify it, Amazon MSK gives it the value DEFAULT. You can also explicitly set this parameter to the value DEFAULT. No other values are currently allowed.
Amazon MSK distributes the broker nodes evenly across the Availability Zones that correspond to the subnets you provide when you create the cluster.
ClientSubnets (list) – [REQUIRED]
The list of subnets to connect to in the client virtual private cloud (VPC). AWS creates elastic network interfaces inside these subnets. Client applications use elastic network interfaces to produce and consume data. Client subnets can’t occupy the Availability Zone with ID use use1-az3.
(string) –
InstanceType (string) – [REQUIRED]
The type of Amazon EC2 instances to use for Apache Kafka brokers. The following instance types are allowed: kafka.m5.large, kafka.m5.xlarge, kafka.m5.2xlarge, kafka.m5.4xlarge, kafka.m5.12xlarge, and kafka.m5.24xlarge.
SecurityGroups (list) –
The AWS security groups to associate with the elastic network interfaces in order to specify who can connect to and communicate with the Amazon MSK cluster. If you don’t specify a security group, Amazon MSK uses the default security group associated with the VPC.
(string) –
StorageInfo (dict) –
Contains information about storage volumes attached to MSK broker nodes.
EbsStorageInfo (dict) –
EBS volume information.
ProvisionedThroughput (dict) –
EBS volume provisioned throughput information.
Enabled (boolean) –
Provisioned throughput is enabled or not.
VolumeThroughput (integer) –
Throughput value of the EBS volumes for the data drive on each kafka broker node in MiB per second.
VolumeSize (integer) –
The size in GiB of the EBS volume for the data drive on each broker node.
ConnectivityInfo (dict) –
Information about the broker access configuration.
PublicAccess (dict) –
Public access control for brokers.
Type (string) –
The value DISABLED indicates that public access is turned off. SERVICE_PROVIDED_EIPS indicates that public access is turned on.
ClientAuthentication (dict) –
Includes all client authentication information.
Sasl (dict) –
Details for ClientAuthentication using SASL.
Scram (dict) –
Details for SASL/SCRAM client authentication.
Enabled (boolean) –
SASL/SCRAM authentication is enabled or not.
Iam (dict) –
Indicates whether IAM access control is enabled.
Enabled (boolean) –
Indicates whether IAM access control is enabled.
Tls (dict) –
Details for ClientAuthentication using TLS.
CertificateAuthorityArnList (list) –
List of ACM Certificate Authority ARNs.
(string) –
Enabled (boolean) –
Specifies whether you want to turn on or turn off TLS authentication.
Unauthenticated (dict) –
Contains information about unauthenticated traffic to the cluster.
Enabled (boolean) –
Specifies whether you want to turn on or turn off unauthenticated traffic to your cluster.
ConfigurationInfo (dict) –
Represents the configuration that you want Amazon MSK to use for the brokers in a cluster.
Arn (string) – [REQUIRED]
ARN of the configuration to use.
Revision (integer) – [REQUIRED]
The revision of the configuration to use.
EncryptionInfo (dict) –
Includes all encryption-related information.
EncryptionAtRest (dict) –
The data-volume encryption details.
DataVolumeKMSKeyId (string) – [REQUIRED]
The ARN of the AWS KMS key for encrypting data at rest. If you don’t specify a KMS key, MSK creates one for you and uses it.
EncryptionInTransit (dict) –
The details for encryption in transit.
ClientBroker (string) –
Indicates the encryption setting for data in transit between clients and brokers. The following are the possible values.
TLS means that client-broker communication is enabled with TLS only.
TLS_PLAINTEXT means that client-broker communication is enabled for both TLS-encrypted, as well as plaintext data.
PLAINTEXT means that client-broker communication is enabled in plaintext only.
The default value is TLS_PLAINTEXT.
InCluster (boolean) –
When set to true, it indicates that data communication among the broker nodes of the cluster is encrypted. When set to false, the communication happens in plaintext.
The default value is true.
EnhancedMonitoring (string) –
Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION.
OpenMonitoring (dict) –
The settings for open monitoring.
Prometheus (dict) – [REQUIRED]
Prometheus settings.
JmxExporter (dict) –
Indicates whether you want to turn on or turn off the JMX Exporter.
EnabledInBroker (boolean) – [REQUIRED]
Indicates whether you want to turn on or turn off the JMX Exporter.
NodeExporter (dict) –
Indicates whether you want to turn on or turn off the Node Exporter.
EnabledInBroker (boolean) – [REQUIRED]
Indicates whether you want to turn on or turn off the Node Exporter.
KafkaVersion (string) – [REQUIRED]
The Apache Kafka version that you want for the cluster.
LoggingInfo (dict) –
Log delivery information for the cluster.
BrokerLogs (dict) – [REQUIRED]
CloudWatchLogs (dict) –
Enabled (boolean) – [REQUIRED]
LogGroup (string) –
Firehose (dict) –
DeliveryStream (string) –
Enabled (boolean) – [REQUIRED]
S3 (dict) –
Bucket (string) –
Enabled (boolean) – [REQUIRED]
Prefix (string) –
NumberOfBrokerNodes (integer) – [REQUIRED]
The number of broker nodes in the cluster.
StorageMode (string) –
This controls storage mode for supported storage tiers.
Serverless (dict) –
Information about the serverless cluster.
VpcConfigs (list) – [REQUIRED]
The configuration of the Amazon VPCs for the cluster.
(dict) –
The configuration of the Amazon VPCs for the cluster.
SubnetIds (list) – [REQUIRED]
The IDs of the subnets associated with the cluster.
(string) –
SecurityGroupIds (list) –
The IDs of the security groups associated with the cluster.
(string) –
ClientAuthentication (dict) –
Includes all client authentication information.
Sasl (dict) –
Details for ClientAuthentication using SASL.
Iam (dict) –
Indicates whether IAM access control is enabled.
Enabled (boolean) –
Indicates whether IAM access control is enabled.
- Return type:
dict
- Returns:
Response Syntax
{ 'ClusterArn': 'string', 'ClusterName': 'string', 'State': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'HEALING'|'MAINTENANCE'|'REBOOTING_BROKER'|'UPDATING', 'ClusterType': 'PROVISIONED'|'SERVERLESS' }
Response Structure
(dict) –
ClusterArn (string) –
The Amazon Resource Name (ARN) of the cluster.
ClusterName (string) –
The name of the MSK cluster.
State (string) –
The state of the cluster. The possible states are ACTIVE, CREATING, DELETING, FAILED, HEALING, MAINTENANCE, REBOOTING_BROKER, and UPDATING.
ClusterType (string) –
The type of the cluster. The possible states are PROVISIONED or SERVERLESS.
Exceptions
Kafka.Client.exceptions.BadRequestException
Kafka.Client.exceptions.InternalServerErrorException
Kafka.Client.exceptions.UnauthorizedException
Kafka.Client.exceptions.ForbiddenException
Kafka.Client.exceptions.ServiceUnavailableException
Kafka.Client.exceptions.TooManyRequestsException
Kafka.Client.exceptions.ConflictException