Class Cluster
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.msk.Cluster
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IConnectable
,ICluster
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:42.702Z")
@Stability(Experimental)
public class Cluster
extends Resource
implements ICluster
(experimental) Create a MSK Cluster.
Example:
Vpc vpc; Cluster cluster = Cluster.Builder.create(this, "cluster") .clusterName("myCluster") .kafkaVersion(KafkaVersion.V2_8_1) .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.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.msk.ICluster
ICluster.Jsii$Default, ICluster.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Cluster
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Cluster
(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 ICluster
fromClusterArn
(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/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) Manages connections for 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.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
getBootstrapBrokers
using the Javascript SDK- Returns:
- A string containing one or more hostname: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
getBootstrapBrokers
using 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
getBootstrapBrokers
using 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:
getClusterArn
in interfaceICluster
-
getClusterName
(experimental) The physical name of the cluster.- Specified by:
getClusterName
in interfaceICluster
-
getConnections
(experimental) Manages connections for the cluster.- Specified by:
getConnections
in interfaceIConnectable
-
getZookeeperConnectionString
(experimental) Get the ZooKeeper Connection string.Uses a Custom Resource to make an API call to
describeCluster
using 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
describeCluster
using 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.
-