Skip to content
v2.277.0

Experimental

@aws-cdk/aws-msk-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ServerlessClusterProps Struct ​

Properties for a MSK Serverless Cluster.

Example ​

ts
declare const vpc: ec2.Vpc;

const serverlessCluster = new msk.ServerlessCluster(this, 'ServerlessCluster', {
  clusterName: 'MyServerlessCluster',
  vpcConfigs: [
    { vpc },
  ],
});
python
# vpc: ec2.Vpc


serverless_cluster = msk.ServerlessCluster(self, "ServerlessCluster",
    cluster_name="MyServerlessCluster",
    vpc_configs=[msk.VpcConfig(vpc=vpc)
    ]
)
java
Vpc vpc;


ServerlessCluster serverlessCluster = ServerlessCluster.Builder.create(this, "ServerlessCluster")
        .clusterName("MyServerlessCluster")
        .vpcConfigs(List.of(VpcConfig.builder().vpc(vpc).build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MSK.Alpha
Vpc vpc;


var serverlessCluster = new ServerlessCluster(this, "ServerlessCluster", new ServerlessClusterProps {
    ClusterName = "MyServerlessCluster",
    VpcConfigs = new [] { new VpcConfig { Vpc = vpc } }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkmskalpha/v2
var vpc Vpc


serverlessCluster := msk.NewServerlessCluster(this, jsii.String("ServerlessCluster"), &ServerlessClusterProps{
	ClusterName: jsii.String("MyServerlessCluster"),
	VpcConfigs: []VpcConfig{
		&VpcConfig{
			Vpc: *Vpc,
		},
	},
})

Properties ​

clusterNameoptionalstringcluster_nameoptionalstrclusterNameoptionalStringClusterNameoptionalstringClusterNameoptional*string #
The physical name of the cluster.

Default: auto generate

vpcConfigsVpcConfig[]vpc_configstyping.List[VpcConfig]vpcConfigsList<VpcConfig>VpcConfigsVpcConfig[]VpcConfigs*[]VpcConfig required #
The configuration of the Amazon VPCs for the cluster.

You can specify up to 5 VPC configurations.