@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:40.324Z") public class Cluster extends Resource implements ICluster
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();
Modifier and Type | Class and Description |
---|---|
static class |
Cluster.Builder
(experimental) A fluent builder for
Cluster . |
ICluster.Jsii$Default, ICluster.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Cluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Cluster(software.amazon.jsii.JsiiObjectRef objRef) |
|
Cluster(software.constructs.Construct scope,
java.lang.String id,
ClusterProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addUser(java.lang.String... usernames)
(experimental) A list of usersnames to register with the cluster.
|
static ICluster |
fromClusterArn(software.constructs.Construct scope,
java.lang.String id,
java.lang.String clusterArn)
(experimental) Reference an existing cluster, defined outside of the CDK code, by name.
|
java.lang.String |
getBootstrapBrokers()
(experimental) Get the list of brokers that a client application can use to bootstrap.
|
java.lang.String |
getBootstrapBrokersSaslScram()
(experimental) Get the list of brokers that a SASL/SCRAM authenticated client application can use to bootstrap.
|
java.lang.String |
getBootstrapBrokersTls()
(experimental) Get the list of brokers that a TLS authenticated client application can use to bootstrap.
|
java.lang.String |
getClusterArn()
(experimental) The ARN of cluster.
|
java.lang.String |
getClusterName()
(experimental) The physical name of the cluster.
|
Connections |
getConnections()
(experimental) Manages connections for the cluster.
|
IKey |
getSaslScramAuthenticationKey()
(experimental) Key used to encrypt SASL/SCRAM users.
|
java.lang.String |
getZookeeperConnectionString()
(experimental) Get the ZooKeeper Connection string.
|
java.lang.String |
getZookeeperConnectionStringTls()
(experimental) Get the ZooKeeper Connection string for a TLS enabled cluster.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected Cluster(software.amazon.jsii.JsiiObjectRef objRef)
protected Cluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Cluster(software.constructs.Construct scope, java.lang.String id, ClusterProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static ICluster fromClusterArn(software.constructs.Construct scope, java.lang.String id, java.lang.String clusterArn)
scope
- This parameter is required.id
- This parameter is required.clusterArn
- This parameter is required.public void addUser(java.lang.String... usernames)
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.
usernames
- - username(s) to register with the cluster. This parameter is required.public java.lang.String getBootstrapBrokers()
Uses a Custom Resource to make an API call to getBootstrapBrokers
using the Javascript SDK
public java.lang.String getBootstrapBrokersSaslScram()
Uses a Custom Resource to make an API call to getBootstrapBrokers
using the Javascript SDK
public java.lang.String getBootstrapBrokersTls()
Uses a Custom Resource to make an API call to getBootstrapBrokers
using the Javascript SDK
public java.lang.String getClusterArn()
getClusterArn
in interface ICluster
public java.lang.String getClusterName()
getClusterName
in interface ICluster
public Connections getConnections()
getConnections
in interface IConnectable
public java.lang.String getZookeeperConnectionString()
Uses a Custom Resource to make an API call to describeCluster
using the Javascript SDK
public java.lang.String getZookeeperConnectionStringTls()
Uses a Custom Resource to make an API call to describeCluster
using the Javascript SDK
public IKey getSaslScramAuthenticationKey()