Class CommonClusterOptions.Builder
java.lang.Object
software.amazon.awscdk.services.eks.CommonClusterOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CommonClusterOptions>
- Enclosing interface:
CommonClusterOptions
@Stability(Stable)
public static final class CommonClusterOptions.Builder
extends Object
implements software.amazon.jsii.Builder<CommonClusterOptions>
A builder for
CommonClusterOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.clusterName(String clusterName) Sets the value ofCommonClusterOptions.getClusterName()outputClusterName(Boolean outputClusterName) Sets the value ofCommonClusterOptions.getOutputClusterName()outputConfigCommand(Boolean outputConfigCommand) Sets the value ofCommonClusterOptions.getOutputConfigCommand()Sets the value ofCommonClusterOptions.getRole()securityGroup(ISecurityGroup securityGroup) Sets the value ofCommonClusterOptions.getSecurityGroup()version(KubernetesVersion version) Sets the value ofCommonClusterOptions.getVersion()Sets the value ofCommonClusterOptions.getVpc()vpcSubnets(List<? extends SubnetSelection> vpcSubnets) Sets the value ofCommonClusterOptions.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
version
Sets the value ofCommonClusterOptions.getVersion()- Parameters:
version- The Kubernetes version to run in the cluster. This parameter is required.- Returns:
this
-
clusterName
Sets the value ofCommonClusterOptions.getClusterName()- Parameters:
clusterName- Name for the cluster.- Returns:
this
-
outputClusterName
Sets the value ofCommonClusterOptions.getOutputClusterName()- Parameters:
outputClusterName- Determines whether a CloudFormation output with the name of the cluster will be synthesized.- Returns:
this
-
outputConfigCommand
@Stability(Stable) public CommonClusterOptions.Builder outputConfigCommand(Boolean outputConfigCommand) Sets the value ofCommonClusterOptions.getOutputConfigCommand()- Parameters:
outputConfigCommand- Determines whether a CloudFormation output with theaws eks update-kubeconfigcommand will be synthesized. This command will include the cluster name and the ARN of the masters IAM role.Note: If mastersRole is not specified, this property will be ignored and no config command will be emitted.
- Returns:
this
-
role
Sets the value ofCommonClusterOptions.getRole()- Parameters:
role- Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.- Returns:
this
-
securityGroup
Sets the value ofCommonClusterOptions.getSecurityGroup()- Parameters:
securityGroup- Security Group to use for Control Plane ENIs.- Returns:
this
-
vpc
Sets the value ofCommonClusterOptions.getVpc()- Parameters:
vpc- The VPC in which to create the Cluster.- Returns:
this
-
vpcSubnets
@Stability(Stable) public CommonClusterOptions.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets) Sets the value ofCommonClusterOptions.getVpcSubnets()- Parameters:
vpcSubnets- Where to place EKS Control Plane ENIs. For example, to only select private subnets, supply the following:vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }]- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CommonClusterOptions>- Returns:
- a new instance of
CommonClusterOptions - Throws:
NullPointerException- if any required attribute was not provided
-