ClusterProps

class aws_cdk.aws_msk.ClusterProps(*, cluster_name, kafka_version, vpc, client_authentication=None, configuration_info=None, ebs_storage_info=None, encryption_in_transit=None, instance_type=None, logging=None, monitoring=None, number_of_broker_nodes=None, removal_policy=None, security_groups=None, vpc_subnets=None)

Bases: object

(experimental) Properties for a MSK Cluster.

Parameters:
  • cluster_name (str) – (experimental) The physical name of the cluster.

  • kafka_version (KafkaVersion) – (experimental) The version of Apache Kafka.

  • vpc (IVpc) – (experimental) Defines the virtual networking environment for this cluster. Must have at least 2 subnets in two different AZs.

  • client_authentication (Optional[ClientAuthentication]) – (experimental) Configuration properties for client authentication. MSK supports using private TLS certificates or SASL/SCRAM to authenticate the identity of clients. Default: - disabled

  • configuration_info (Union[ClusterConfigurationInfo, Dict[str, Any], None]) – (experimental) The Amazon MSK configuration to use for the cluster. Default: - none

  • ebs_storage_info (Union[EbsStorageInfo, Dict[str, Any], None]) – (experimental) Information about storage volumes attached to MSK broker nodes. Default: - 1000 GiB EBS volume

  • encryption_in_transit (Union[EncryptionInTransitConfig, Dict[str, Any], None]) – (experimental) Config details for encryption in transit. Default: - enabled

  • instance_type (Optional[InstanceType]) – (experimental) The EC2 instance type that you want Amazon MSK to use when it creates your brokers. Default: kafka.m5.large

  • logging (Union[BrokerLogging, Dict[str, Any], None]) – (experimental) Configure your MSK cluster to send broker logs to different destination types. Default: - disabled

  • monitoring (Union[MonitoringConfiguration, Dict[str, Any], None]) – (experimental) Cluster monitoring configuration. Default: - DEFAULT monitoring level

  • number_of_broker_nodes (Union[int, float, None]) – (experimental) Number of Apache Kafka brokers deployed in each Availability Zone. Default: 1

  • removal_policy (Optional[RemovalPolicy]) – (experimental) What to do when this resource is deleted from a stack. Default: RemovalPolicy.RETAIN

  • security_groups (Optional[Sequence[ISecurityGroup]]) – (experimental) 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. Default: - create new security group

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – (experimental) Where to place the nodes within the VPC. Amazon MSK distributes the broker nodes evenly across the subnets that you specify. The subnets that you specify must be in distinct Availability Zones. Client subnets can’t be in Availability Zone us-east-1e. Default: - the Vpc default strategy if not specified.

Stability:

experimental

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc

cluster = msk.Cluster(self, "cluster",
    cluster_name="myCluster",
    kafka_version=msk.KafkaVersion.V2_8_1,
    vpc=vpc,
    encryption_in_transit=msk.EncryptionInTransitConfig(
        client_broker=msk.ClientBrokerEncryption.TLS
    ),
    client_authentication=msk.ClientAuthentication.sasl(
        scram=True
    )
)

Attributes

client_authentication

(experimental) Configuration properties for client authentication.

MSK supports using private TLS certificates or SASL/SCRAM to authenticate the identity of clients.

Default:
  • disabled

Stability:

experimental

cluster_name

(experimental) The physical name of the cluster.

Stability:

experimental

configuration_info

(experimental) The Amazon MSK configuration to use for the cluster.

Default:
  • none

Stability:

experimental

ebs_storage_info

(experimental) Information about storage volumes attached to MSK broker nodes.

Default:
  • 1000 GiB EBS volume

Stability:

experimental

encryption_in_transit

(experimental) Config details for encryption in transit.

Default:
  • enabled

Stability:

experimental

instance_type

(experimental) The EC2 instance type that you want Amazon MSK to use when it creates your brokers.

Default:

kafka.m5.large

See:

https://docs.aws.amazon.com/msk/latest/developerguide/msk-create-cluster.html#broker-instance-types

Stability:

experimental

kafka_version

(experimental) The version of Apache Kafka.

Stability:

experimental

logging

(experimental) Configure your MSK cluster to send broker logs to different destination types.

Default:
  • disabled

Stability:

experimental

monitoring

(experimental) Cluster monitoring configuration.

Default:
  • DEFAULT monitoring level

Stability:

experimental

number_of_broker_nodes

(experimental) Number of Apache Kafka brokers deployed in each Availability Zone.

Default:

1

Stability:

experimental

removal_policy

(experimental) What to do when this resource is deleted from a stack.

Default:

RemovalPolicy.RETAIN

Stability:

experimental

security_groups

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

Default:
  • create new security group

Stability:

experimental

vpc

(experimental) Defines the virtual networking environment for this cluster.

Must have at least 2 subnets in two different AZs.

Stability:

experimental

vpc_subnets

(experimental) Where to place the nodes within the VPC.

Amazon MSK distributes the broker nodes evenly across the subnets that you specify. The subnets that you specify must be in distinct Availability Zones. Client subnets can’t be in Availability Zone us-east-1e.

Default:
  • the Vpc default strategy if not specified.

Stability:

experimental