Class Cluster
- All Implemented Interfaces:
IEnvironmentAware,IResource,IConnectable,ICluster,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
Example:
Vpc vpc;
Cluster cluster = Cluster.Builder.create(this, "cluster")
.clusterName("myCluster")
.kafkaVersion(KafkaVersion.V4_1_X_KRAFT)
.vpc(vpc)
.encryptionInTransit(EncryptionInTransitConfig.builder()
.clientBroker(ClientBrokerEncryption.TLS)
.build())
.clientAuthentication(ClientAuthentication.sasl(SaslAuthProps.builder()
.scram(true)
.build()))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.msk.alpha.ICluster
ICluster.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCluster(software.amazon.jsii.JsiiObjectRef objRef) Cluster(software.constructs.Construct scope, String id, ClusterProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid(experimental) A list of usersnames to register with the cluster.static IClusterfromClusterArn(software.constructs.Construct scope, String id, String clusterArn) (experimental) Reference an existing cluster, defined outside of the CDK code, by name.(experimental) Get the list of brokers that a client application can use to bootstrap.(experimental) Get the list of brokers that a SASL/IAM authenticated client application can use to bootstrap.(experimental) Get the list of brokers that a SASL/SCRAM authenticated client application can use to bootstrap.(experimental) Get the list of brokers that a TLS authenticated client application can use to bootstrap.(experimental) The ARN of cluster.(experimental) The physical name of the cluster.(experimental) Key used to encrypt SASL/SCRAM users.(experimental) Get the ZooKeeper Connection string.(experimental) Get the ZooKeeper Connection string for a TLS enabled cluster.Methods inherited from class software.amazon.awscdk.services.msk.alpha.ClusterBase
getConnectionsMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
Cluster
protected Cluster(software.amazon.jsii.JsiiObjectRef objRef) -
Cluster
protected Cluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Cluster
@Stability(Experimental) public Cluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ClusterProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromClusterArn
@Stability(Experimental) @NotNull public static ICluster fromClusterArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String clusterArn) (experimental) Reference an existing cluster, defined outside of the CDK code, by name.- Parameters:
scope- This parameter is required.id- This parameter is required.clusterArn- This parameter is required.
-
addUser
(experimental) A list of usersnames to register with the cluster.The password will automatically be generated using Secrets Manager and the { username, password } JSON object stored in Secrets Manager as
AmazonMSK_username.Must be using the SASL/SCRAM authentication mechanism.
- Parameters:
usernames-- username(s) to register with the cluster.
-
getBootstrapBrokers
(experimental) Get the list of brokers that a client application can use to bootstrap.Uses a Custom Resource to make an API call to
getBootstrapBrokersusing the Javascript SDK- Returns:
- A string containing one or more hostname:port pairs.
-
getBootstrapBrokersSaslIam
(experimental) Get the list of brokers that a SASL/IAM authenticated client application can use to bootstrap.Uses a Custom Resource to make an API call to
getBootstrapBrokersusing the Javascript SDK- Returns:
- A string containing one or more DNS names (or IP) and TLS port pairs.
-
getBootstrapBrokersSaslScram
(experimental) Get the list of brokers that a SASL/SCRAM authenticated client application can use to bootstrap.Uses a Custom Resource to make an API call to
getBootstrapBrokersusing the Javascript SDK- Returns:
- A string containing one or more dns name (or IP) and SASL SCRAM port pairs.
-
getBootstrapBrokersTls
(experimental) Get the list of brokers that a TLS authenticated client application can use to bootstrap.Uses a Custom Resource to make an API call to
getBootstrapBrokersusing the Javascript SDK- Returns:
- A string containing one or more DNS names (or IP) and TLS port pairs.
-
getClusterArn
(experimental) The ARN of cluster.- Specified by:
getClusterArnin interfaceICluster- Specified by:
getClusterArnin classClusterBase
-
getClusterName
(experimental) The physical name of the cluster.- Specified by:
getClusterNamein interfaceICluster- Specified by:
getClusterNamein classClusterBase
-
getZookeeperConnectionString
(experimental) Get the ZooKeeper Connection string.Uses a Custom Resource to make an API call to
describeClusterusing the Javascript SDK- Returns:
- The connection string to use to connect to the Apache ZooKeeper cluster.
-
getZookeeperConnectionStringTls
(experimental) Get the ZooKeeper Connection string for a TLS enabled cluster.Uses a Custom Resource to make an API call to
describeClusterusing the Javascript SDK- Returns:
- The connection string to use to connect to zookeeper cluster on TLS port.
-
getSaslScramAuthenticationKey
(experimental) Key used to encrypt SASL/SCRAM users.
-