Class ClusterAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.eks_v2.ClusterAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterAttributes>
- Enclosing interface:
ClusterAttributes
@Stability(Stable)
public static final class ClusterAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterAttributes>
A builder for
ClusterAttributes-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.clusterCertificateAuthorityData(String clusterCertificateAuthorityData) Sets the value ofClusterAttributes.getClusterCertificateAuthorityData()clusterEncryptionConfigKeyArn(String clusterEncryptionConfigKeyArn) Sets the value ofClusterAttributes.getClusterEncryptionConfigKeyArn()clusterEndpoint(String clusterEndpoint) Sets the value ofClusterAttributes.getClusterEndpoint()clusterName(String clusterName) Sets the value ofClusterAttributes.getClusterName()clusterSecurityGroupId(String clusterSecurityGroupId) Sets the value ofClusterAttributes.getClusterSecurityGroupId()Sets the value ofClusterAttributes.getIpFamily()kubectlProvider(IKubectlProvider kubectlProvider) Sets the value ofClusterAttributes.getKubectlProvider()kubectlProviderOptions(KubectlProviderOptions kubectlProviderOptions) Sets the value ofClusterAttributes.getKubectlProviderOptions()openIdConnectProvider(IOpenIdConnectProvider openIdConnectProvider) Sets the value ofClusterAttributes.getOpenIdConnectProvider()Sets the value ofClusterAttributes.getPrune()securityGroupIds(List<String> securityGroupIds) Sets the value ofClusterAttributes.getSecurityGroupIds()Sets the value ofClusterAttributes.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterName
Sets the value ofClusterAttributes.getClusterName()- Parameters:
clusterName- The physical name of the Cluster. This parameter is required.- Returns:
this
-
clusterCertificateAuthorityData
@Stability(Stable) public ClusterAttributes.Builder clusterCertificateAuthorityData(String clusterCertificateAuthorityData) Sets the value ofClusterAttributes.getClusterCertificateAuthorityData()- Parameters:
clusterCertificateAuthorityData- The certificate-authority-data for your cluster.- Returns:
this
-
clusterEncryptionConfigKeyArn
@Stability(Stable) public ClusterAttributes.Builder clusterEncryptionConfigKeyArn(String clusterEncryptionConfigKeyArn) Sets the value ofClusterAttributes.getClusterEncryptionConfigKeyArn()- Parameters:
clusterEncryptionConfigKeyArn- Amazon Resource Name (ARN) or alias of the customer master key (CMK).- Returns:
this
-
clusterEndpoint
Sets the value ofClusterAttributes.getClusterEndpoint()- Parameters:
clusterEndpoint- The API Server endpoint URL.- Returns:
this
-
clusterSecurityGroupId
@Stability(Stable) public ClusterAttributes.Builder clusterSecurityGroupId(String clusterSecurityGroupId) Sets the value ofClusterAttributes.getClusterSecurityGroupId()- Parameters:
clusterSecurityGroupId- The cluster security group that was created by Amazon EKS for the cluster.- Returns:
this
-
ipFamily
Sets the value ofClusterAttributes.getIpFamily()- Parameters:
ipFamily- Specify which IP family is used to assign Kubernetes pod and service IP addresses.- Returns:
this
-
kubectlProvider
@Stability(Stable) public ClusterAttributes.Builder kubectlProvider(IKubectlProvider kubectlProvider) Sets the value ofClusterAttributes.getKubectlProvider()- Parameters:
kubectlProvider- KubectlProvider for issuing kubectl commands.- Returns:
this
-
kubectlProviderOptions
@Stability(Stable) public ClusterAttributes.Builder kubectlProviderOptions(KubectlProviderOptions kubectlProviderOptions) Sets the value ofClusterAttributes.getKubectlProviderOptions()- Parameters:
kubectlProviderOptions- Options for creating the kubectl provider - a lambda function that executeskubectlandhelmagainst the cluster. If defined,kubectlLayeris a required property.- Returns:
this
-
openIdConnectProvider
@Stability(Stable) public ClusterAttributes.Builder openIdConnectProvider(IOpenIdConnectProvider openIdConnectProvider) Sets the value ofClusterAttributes.getOpenIdConnectProvider()- Parameters:
openIdConnectProvider- An Open ID Connect provider for this cluster that can be used to configure service accounts. You can either import an existing provider usingiam.OpenIdConnectProvider.fromProviderArn, or create a new provider usingnew eks.OpenIdConnectProvider- Returns:
this
-
prune
Sets the value ofClusterAttributes.getPrune()- Parameters:
prune- Indicates whether Kubernetes resources added throughaddManifest()can be automatically pruned. When this is enabled (default), prune labels will be allocated and injected to each resource. These labels will then be used when issuing thekubectl applyoperation with the--pruneswitch.- Returns:
this
-
securityGroupIds
Sets the value ofClusterAttributes.getSecurityGroupIds()- Parameters:
securityGroupIds- Additional security groups associated with this cluster.- Returns:
this
-
vpc
Sets the value ofClusterAttributes.getVpc()- Parameters:
vpc- The VPC in which this Cluster was created.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ClusterAttributes>- Returns:
- a new instance of
ClusterAttributes - Throws:
NullPointerException- if any required attribute was not provided
-