Class ClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.msk.alpha.ClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterProps>
- Enclosing interface:
ClusterProps
@Stability(Experimental)
public static final class ClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterProps>
A builder for
ClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.clientAuthentication
(ClientAuthentication clientAuthentication) Sets the value ofClusterProps.getClientAuthentication()
clusterName
(String clusterName) Sets the value ofClusterProps.getClusterName()
configurationInfo
(ClusterConfigurationInfo configurationInfo) Sets the value ofClusterProps.getConfigurationInfo()
ebsStorageInfo
(EbsStorageInfo ebsStorageInfo) Sets the value ofClusterProps.getEbsStorageInfo()
encryptionInTransit
(EncryptionInTransitConfig encryptionInTransit) Sets the value ofClusterProps.getEncryptionInTransit()
instanceType
(InstanceType instanceType) Sets the value ofClusterProps.getInstanceType()
kafkaVersion
(KafkaVersion kafkaVersion) Sets the value ofClusterProps.getKafkaVersion()
logging
(BrokerLogging logging) Sets the value ofClusterProps.getLogging()
monitoring
(MonitoringConfiguration monitoring) Sets the value ofClusterProps.getMonitoring()
numberOfBrokerNodes
(Number numberOfBrokerNodes) Sets the value ofClusterProps.getNumberOfBrokerNodes()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofClusterProps.getRemovalPolicy()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterProps.getSecurityGroups()
storageMode
(StorageMode storageMode) Sets the value ofClusterProps.getStorageMode()
Sets the value ofClusterProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofClusterProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterName
Sets the value ofClusterProps.getClusterName()
- Parameters:
clusterName
- The physical name of the cluster. This parameter is required.- Returns:
this
-
kafkaVersion
Sets the value ofClusterProps.getKafkaVersion()
- Parameters:
kafkaVersion
- The version of Apache Kafka. This parameter is required.- Returns:
this
-
vpc
Sets the value ofClusterProps.getVpc()
- Parameters:
vpc
- Defines the virtual networking environment for this cluster. This parameter is required. Must have at least 2 subnets in two different AZs.- Returns:
this
-
clientAuthentication
@Stability(Experimental) public ClusterProps.Builder clientAuthentication(ClientAuthentication clientAuthentication) Sets the value ofClusterProps.getClientAuthentication()
- Parameters:
clientAuthentication
- Configuration properties for client authentication. MSK supports using private TLS certificates or SASL/SCRAM to authenticate the identity of clients.- Returns:
this
-
configurationInfo
@Stability(Experimental) public ClusterProps.Builder configurationInfo(ClusterConfigurationInfo configurationInfo) Sets the value ofClusterProps.getConfigurationInfo()
- Parameters:
configurationInfo
- The Amazon MSK configuration to use for the cluster.- Returns:
this
-
ebsStorageInfo
Sets the value ofClusterProps.getEbsStorageInfo()
- Parameters:
ebsStorageInfo
- Information about storage volumes attached to MSK broker nodes.- Returns:
this
-
encryptionInTransit
@Stability(Experimental) public ClusterProps.Builder encryptionInTransit(EncryptionInTransitConfig encryptionInTransit) Sets the value ofClusterProps.getEncryptionInTransit()
- Parameters:
encryptionInTransit
- Config details for encryption in transit.- Returns:
this
-
instanceType
Sets the value ofClusterProps.getInstanceType()
- Parameters:
instanceType
- The EC2 instance type that you want Amazon MSK to use when it creates your brokers.- Returns:
this
-
logging
Sets the value ofClusterProps.getLogging()
- Parameters:
logging
- Configure your MSK cluster to send broker logs to different destination types.- Returns:
this
-
monitoring
Sets the value ofClusterProps.getMonitoring()
- Parameters:
monitoring
- Cluster monitoring configuration.- Returns:
this
-
numberOfBrokerNodes
@Stability(Experimental) public ClusterProps.Builder numberOfBrokerNodes(Number numberOfBrokerNodes) Sets the value ofClusterProps.getNumberOfBrokerNodes()
- Parameters:
numberOfBrokerNodes
- Number of Apache Kafka brokers deployed in each Availability Zone.- Returns:
this
-
removalPolicy
Sets the value ofClusterProps.getRemovalPolicy()
- Parameters:
removalPolicy
- What to do when this resource is deleted from a stack.- Returns:
this
-
securityGroups
@Stability(Experimental) public ClusterProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterProps.getSecurityGroups()
- Parameters:
securityGroups
- 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.- Returns:
this
-
storageMode
Sets the value ofClusterProps.getStorageMode()
- Parameters:
storageMode
- This controls storage mode for supported storage tiers.- Returns:
this
-
vpcSubnets
Sets the value ofClusterProps.getVpcSubnets()
- Parameters:
vpcSubnets
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ClusterProps>
- Returns:
- a new instance of
ClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-