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: - disabledconfiguration_info (
Optional
[ClusterConfigurationInfo
]) – (experimental) The Amazon MSK configuration to use for the cluster. Default: - noneebs_storage_info (
Optional
[EbsStorageInfo
]) – (experimental) Information about storage volumes attached to MSK broker nodes. Default: - 1000 GiB EBS volumeencryption_in_transit (
Optional
[EncryptionInTransitConfig
]) – (experimental) Config details for encryption in transit. Default: - enabledinstance_type (
Optional
[InstanceType
]) – (experimental) The EC2 instance type that you want Amazon MSK to use when it creates your brokers. Default: kafka.m5.largelogging (
Optional
[BrokerLogging
]) – (experimental) Configure your MSK cluster to send broker logs to different destination types. Default: - disabledmonitoring (
Optional
[MonitoringConfiguration
]) – (experimental) Cluster monitoring configuration. Default: - DEFAULT monitoring levelnumber_of_broker_nodes (
Union
[int
,float
,None
]) – (experimental) Number of Apache Kafka brokers deployed in each Availability Zone. Default: 1removal_policy (
Optional
[RemovalPolicy
]) – (experimental) What to do when this resource is deleted from a stack. Default: RemovalPolicy.RETAINsecurity_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 groupvpc_subnets (
Optional
[SubnetSelection
]) – (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
- Return type
Optional
[ClientAuthentication
]
-
cluster_name
¶ (experimental) The physical name of the cluster.
- Stability
experimental
- Return type
str
-
configuration_info
¶ (experimental) The Amazon MSK configuration to use for the cluster.
- Default
none
- Stability
experimental
- Return type
Optional
[ClusterConfigurationInfo
]
-
ebs_storage_info
¶ (experimental) Information about storage volumes attached to MSK broker nodes.
- Default
1000 GiB EBS volume
- Stability
experimental
- Return type
Optional
[EbsStorageInfo
]
-
encryption_in_transit
¶ (experimental) Config details for encryption in transit.
- Default
enabled
- Stability
experimental
- Return type
Optional
[EncryptionInTransitConfig
]
-
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
- Return type
Optional
[InstanceType
]
-
kafka_version
¶ (experimental) The version of Apache Kafka.
- Stability
experimental
- Return type
-
logging
¶ (experimental) Configure your MSK cluster to send broker logs to different destination types.
- Default
disabled
- Stability
experimental
- Return type
Optional
[BrokerLogging
]
-
monitoring
¶ (experimental) Cluster monitoring configuration.
- Default
DEFAULT monitoring level
- Stability
experimental
- Return type
Optional
[MonitoringConfiguration
]
-
number_of_broker_nodes
¶ (experimental) Number of Apache Kafka brokers deployed in each Availability Zone.
- Default
1
- Stability
experimental
- Return type
Union
[int
,float
,None
]
-
removal_policy
¶ (experimental) What to do when this resource is deleted from a stack.
- Default
RemovalPolicy.RETAIN
- Stability
experimental
- Return type
Optional
[RemovalPolicy
]
-
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
- Return type
Optional
[List
[ISecurityGroup
]]
-
vpc
¶ (experimental) Defines the virtual networking environment for this cluster.
Must have at least 2 subnets in two different AZs.
- Stability
experimental
- Return type
-
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
- Return type
Optional
[SubnetSelection
]