software.amazon.awscdk.services.eks.ClusterProps Maven / Gradle / Ivy
Show all versions of eks Show documentation
package software.amazon.awscdk.services.eks;
/**
* Common configuration props for EKS clusters.
*
* Example:
*
*
* Vpc vpc;
* Cluster.Builder.create(this, "HelloEKS")
* .version(KubernetesVersion.V1_21)
* .vpc(vpc)
* .vpcSubnets(List.of(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_WITH_NAT).build()))
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.74.0 (build 6d08790)", date = "2023-03-22T19:35:49.034Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.eks.$Module.class, fqn = "@aws-cdk/aws-eks.ClusterProps")
@software.amazon.jsii.Jsii.Proxy(ClusterProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ClusterProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.eks.ClusterOptions {
/**
* The cluster log types which you want to enable.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getClusterLogging() {
return null;
}
/**
* Number of instances to allocate as an initial capacity for this cluster.
*
* Instance type can be configured through defaultCapacityInstanceType
,
* which defaults to m5.large
.
*
* Use cluster.addAutoScalingGroupCapacity
to add additional customized capacity. Set this
* to 0
is you wish to avoid the initial capacity allocation.
*
* Default: 2
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getDefaultCapacity() {
return null;
}
/**
* The instance type to use for the default capacity.
*
* This will only be taken
* into account if defaultCapacity
is > 0.
*
* Default: m5.large
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.InstanceType getDefaultCapacityInstance() {
return null;
}
/**
* The default capacity type for the cluster.
*
* Default: NODEGROUP
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.eks.DefaultCapacityType getDefaultCapacityType() {
return null;
}
/**
* The IAM role to pass to the Kubectl Lambda Handler.
*
* Default: - Default Lambda IAM Execution Role
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.IRole getKubectlLambdaRole() {
return null;
}
/**
* The tags assigned to the EKS cluster.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.Map getTags() {
return null;
}
/**
* @return a {@link Builder} of {@link ClusterProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ClusterProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List clusterLogging;
java.lang.Number defaultCapacity;
software.amazon.awscdk.services.ec2.InstanceType defaultCapacityInstance;
software.amazon.awscdk.services.eks.DefaultCapacityType defaultCapacityType;
software.amazon.awscdk.services.iam.IRole kubectlLambdaRole;
java.util.Map tags;
software.amazon.awscdk.services.eks.AlbControllerOptions albController;
java.util.Map clusterHandlerEnvironment;
software.amazon.awscdk.services.ec2.ISecurityGroup clusterHandlerSecurityGroup;
software.amazon.awscdk.services.eks.CoreDnsComputeType coreDnsComputeType;
software.amazon.awscdk.services.eks.EndpointAccess endpointAccess;
java.util.Map kubectlEnvironment;
software.amazon.awscdk.services.lambda.ILayerVersion kubectlLayer;
software.amazon.awscdk.core.Size kubectlMemory;
software.amazon.awscdk.services.iam.IRole mastersRole;
software.amazon.awscdk.services.lambda.ILayerVersion onEventLayer;
java.lang.Boolean outputMastersRoleArn;
java.lang.Boolean placeClusterHandlerInVpc;
java.lang.Boolean prune;
software.amazon.awscdk.services.kms.IKey secretsEncryptionKey;
java.lang.String serviceIpv4Cidr;
software.amazon.awscdk.services.eks.KubernetesVersion version;
java.lang.String clusterName;
java.lang.Boolean outputClusterName;
java.lang.Boolean outputConfigCommand;
software.amazon.awscdk.services.iam.IRole role;
software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup;
software.amazon.awscdk.services.ec2.IVpc vpc;
java.util.List vpcSubnets;
/**
* Sets the value of {@link ClusterProps#getClusterLogging}
* @param clusterLogging The cluster log types which you want to enable.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder clusterLogging(java.util.List extends software.amazon.awscdk.services.eks.ClusterLoggingTypes> clusterLogging) {
this.clusterLogging = (java.util.List)clusterLogging;
return this;
}
/**
* Sets the value of {@link ClusterProps#getDefaultCapacity}
* @param defaultCapacity Number of instances to allocate as an initial capacity for this cluster.
* Instance type can be configured through defaultCapacityInstanceType
,
* which defaults to m5.large
.
*
* Use cluster.addAutoScalingGroupCapacity
to add additional customized capacity. Set this
* to 0
is you wish to avoid the initial capacity allocation.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultCapacity(java.lang.Number defaultCapacity) {
this.defaultCapacity = defaultCapacity;
return this;
}
/**
* Sets the value of {@link ClusterProps#getDefaultCapacityInstance}
* @param defaultCapacityInstance The instance type to use for the default capacity.
* This will only be taken
* into account if defaultCapacity
is > 0.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultCapacityInstance(software.amazon.awscdk.services.ec2.InstanceType defaultCapacityInstance) {
this.defaultCapacityInstance = defaultCapacityInstance;
return this;
}
/**
* Sets the value of {@link ClusterProps#getDefaultCapacityType}
* @param defaultCapacityType The default capacity type for the cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultCapacityType(software.amazon.awscdk.services.eks.DefaultCapacityType defaultCapacityType) {
this.defaultCapacityType = defaultCapacityType;
return this;
}
/**
* Sets the value of {@link ClusterProps#getKubectlLambdaRole}
* @param kubectlLambdaRole The IAM role to pass to the Kubectl Lambda Handler.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder kubectlLambdaRole(software.amazon.awscdk.services.iam.IRole kubectlLambdaRole) {
this.kubectlLambdaRole = kubectlLambdaRole;
return this;
}
/**
* Sets the value of {@link ClusterProps#getTags}
* @param tags The tags assigned to the EKS cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(java.util.Map tags) {
this.tags = tags;
return this;
}
/**
* Sets the value of {@link ClusterProps#getAlbController}
* @param albController Install the AWS Load Balancer Controller onto the cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder albController(software.amazon.awscdk.services.eks.AlbControllerOptions albController) {
this.albController = albController;
return this;
}
/**
* Sets the value of {@link ClusterProps#getClusterHandlerEnvironment}
* @param clusterHandlerEnvironment Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterHandlerEnvironment(java.util.Map clusterHandlerEnvironment) {
this.clusterHandlerEnvironment = clusterHandlerEnvironment;
return this;
}
/**
* Sets the value of {@link ClusterProps#getClusterHandlerSecurityGroup}
* @param clusterHandlerSecurityGroup A security group to associate with the Cluster Handler's Lambdas.
* The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
*
* Requires placeClusterHandlerInVpc
to be set to true.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterHandlerSecurityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup clusterHandlerSecurityGroup) {
this.clusterHandlerSecurityGroup = clusterHandlerSecurityGroup;
return this;
}
/**
* Sets the value of {@link ClusterProps#getCoreDnsComputeType}
* @param coreDnsComputeType Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder coreDnsComputeType(software.amazon.awscdk.services.eks.CoreDnsComputeType coreDnsComputeType) {
this.coreDnsComputeType = coreDnsComputeType;
return this;
}
/**
* Sets the value of {@link ClusterProps#getEndpointAccess}
* @param endpointAccess Configure access to the Kubernetes API server endpoint..
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder endpointAccess(software.amazon.awscdk.services.eks.EndpointAccess endpointAccess) {
this.endpointAccess = endpointAccess;
return this;
}
/**
* Sets the value of {@link ClusterProps#getKubectlEnvironment}
* @param kubectlEnvironment Environment variables for the kubectl execution.
* Only relevant for kubectl enabled clusters.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder kubectlEnvironment(java.util.Map kubectlEnvironment) {
this.kubectlEnvironment = kubectlEnvironment;
return this;
}
/**
* Sets the value of {@link ClusterProps#getKubectlLayer}
* @param kubectlLayer An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI.
* By default, the provider will use the layer included in the
* "aws-lambda-layer-kubectl" SAR application which is available in all
* commercial regions.
*
* To deploy the layer locally, visit
* https://github.com/aws-samples/aws-lambda-layer-kubectl/blob/master/cdk/README.md
* for instructions on how to prepare the .zip file and then define it in your
* app as follows:
*
*
* LayerVersion layer = LayerVersion.Builder.create(this, "kubectl-layer")
* .code(Code.fromAsset(String.format("%s/layer.zip", __dirname)))
* .compatibleRuntimes(List.of(Runtime.PROVIDED))
* .build();
*
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder kubectlLayer(software.amazon.awscdk.services.lambda.ILayerVersion kubectlLayer) {
this.kubectlLayer = kubectlLayer;
return this;
}
/**
* Sets the value of {@link ClusterProps#getKubectlMemory}
* @param kubectlMemory Amount of memory to allocate to the provider's lambda function.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder kubectlMemory(software.amazon.awscdk.core.Size kubectlMemory) {
this.kubectlMemory = kubectlMemory;
return this;
}
/**
* Sets the value of {@link ClusterProps#getMastersRole}
* @param mastersRole An IAM role that will be added to the `system:masters` Kubernetes RBAC group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder mastersRole(software.amazon.awscdk.services.iam.IRole mastersRole) {
this.mastersRole = mastersRole;
return this;
}
/**
* Sets the value of {@link ClusterProps#getOnEventLayer}
* @param onEventLayer An AWS Lambda Layer which includes the NPM dependency `proxy-agent`.
* This layer
* is used by the onEvent handler to route AWS SDK requests through a proxy.
*
* By default, the provider will use the layer included in the
* "aws-lambda-layer-node-proxy-agent" SAR application which is available in all
* commercial regions.
*
* To deploy the layer locally define it in your app as follows:
*
*
* LayerVersion layer = LayerVersion.Builder.create(this, "proxy-agent-layer")
* .code(Code.fromAsset(String.format("%s/layer.zip", __dirname)))
* .compatibleRuntimes(List.of(Runtime.NODEJS_14_X))
* .build();
*
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onEventLayer(software.amazon.awscdk.services.lambda.ILayerVersion onEventLayer) {
this.onEventLayer = onEventLayer;
return this;
}
/**
* Sets the value of {@link ClusterProps#getOutputMastersRoleArn}
* @param outputMastersRoleArn Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder outputMastersRoleArn(java.lang.Boolean outputMastersRoleArn) {
this.outputMastersRoleArn = outputMastersRoleArn;
return this;
}
/**
* Sets the value of {@link ClusterProps#getPlaceClusterHandlerInVpc}
* @param placeClusterHandlerInVpc If set to true, the cluster handler functions will be placed in the private subnets of the cluster vpc, subject to the `vpcSubnets` selection strategy.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder placeClusterHandlerInVpc(java.lang.Boolean placeClusterHandlerInVpc) {
this.placeClusterHandlerInVpc = placeClusterHandlerInVpc;
return this;
}
/**
* Sets the value of {@link ClusterProps#getPrune}
* @param prune Indicates whether Kubernetes resources added through `addManifest()` 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 the kubectl apply
operation with the --prune
switch.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder prune(java.lang.Boolean prune) {
this.prune = prune;
return this;
}
/**
* Sets the value of {@link ClusterProps#getSecretsEncryptionKey}
* @param secretsEncryptionKey KMS secret for envelope encryption for Kubernetes secrets.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder secretsEncryptionKey(software.amazon.awscdk.services.kms.IKey secretsEncryptionKey) {
this.secretsEncryptionKey = secretsEncryptionKey;
return this;
}
/**
* Sets the value of {@link ClusterProps#getServiceIpv4Cidr}
* @param serviceIpv4Cidr The CIDR block to assign Kubernetes service IP addresses from.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder serviceIpv4Cidr(java.lang.String serviceIpv4Cidr) {
this.serviceIpv4Cidr = serviceIpv4Cidr;
return this;
}
/**
* Sets the value of {@link ClusterProps#getVersion}
* @param version The Kubernetes version to run in the cluster. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder version(software.amazon.awscdk.services.eks.KubernetesVersion version) {
this.version = version;
return this;
}
/**
* Sets the value of {@link ClusterProps#getClusterName}
* @param clusterName Name for the cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterName(java.lang.String clusterName) {
this.clusterName = clusterName;
return this;
}
/**
* Sets the value of {@link ClusterProps#getOutputClusterName}
* @param outputClusterName Determines whether a CloudFormation output with the name of the cluster will be synthesized.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder outputClusterName(java.lang.Boolean outputClusterName) {
this.outputClusterName = outputClusterName;
return this;
}
/**
* Sets the value of {@link ClusterProps#getOutputConfigCommand}
* @param outputConfigCommand Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized.
* This command will include
* the cluster name and, if applicable, the ARN of the masters IAM role.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder outputConfigCommand(java.lang.Boolean outputConfigCommand) {
this.outputConfigCommand = outputConfigCommand;
return this;
}
/**
* Sets the value of {@link ClusterProps#getRole}
* @param role Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder role(software.amazon.awscdk.services.iam.IRole role) {
this.role = role;
return this;
}
/**
* Sets the value of {@link ClusterProps#getSecurityGroup}
* @param securityGroup Security Group to use for Control Plane ENIs.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup) {
this.securityGroup = securityGroup;
return this;
}
/**
* Sets the value of {@link ClusterProps#getVpc}
* @param vpc The VPC in which to create the Cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) {
this.vpc = vpc;
return this;
}
/**
* Sets the value of {@link ClusterProps#getVpcSubnets}
* @param vpcSubnets Where to place EKS Control Plane ENIs.
* If you want to create public load balancers, this must include public subnets.
*
* For example, to only select private subnets, supply the following:
*
* vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_NAT }]
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder vpcSubnets(java.util.List extends software.amazon.awscdk.services.ec2.SubnetSelection> vpcSubnets) {
this.vpcSubnets = (java.util.List)vpcSubnets;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ClusterProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ClusterProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ClusterProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ClusterProps {
private final java.util.List clusterLogging;
private final java.lang.Number defaultCapacity;
private final software.amazon.awscdk.services.ec2.InstanceType defaultCapacityInstance;
private final software.amazon.awscdk.services.eks.DefaultCapacityType defaultCapacityType;
private final software.amazon.awscdk.services.iam.IRole kubectlLambdaRole;
private final java.util.Map tags;
private final software.amazon.awscdk.services.eks.AlbControllerOptions albController;
private final java.util.Map clusterHandlerEnvironment;
private final software.amazon.awscdk.services.ec2.ISecurityGroup clusterHandlerSecurityGroup;
private final software.amazon.awscdk.services.eks.CoreDnsComputeType coreDnsComputeType;
private final software.amazon.awscdk.services.eks.EndpointAccess endpointAccess;
private final java.util.Map kubectlEnvironment;
private final software.amazon.awscdk.services.lambda.ILayerVersion kubectlLayer;
private final software.amazon.awscdk.core.Size kubectlMemory;
private final software.amazon.awscdk.services.iam.IRole mastersRole;
private final software.amazon.awscdk.services.lambda.ILayerVersion onEventLayer;
private final java.lang.Boolean outputMastersRoleArn;
private final java.lang.Boolean placeClusterHandlerInVpc;
private final java.lang.Boolean prune;
private final software.amazon.awscdk.services.kms.IKey secretsEncryptionKey;
private final java.lang.String serviceIpv4Cidr;
private final software.amazon.awscdk.services.eks.KubernetesVersion version;
private final java.lang.String clusterName;
private final java.lang.Boolean outputClusterName;
private final java.lang.Boolean outputConfigCommand;
private final software.amazon.awscdk.services.iam.IRole role;
private final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup;
private final software.amazon.awscdk.services.ec2.IVpc vpc;
private final java.util.List vpcSubnets;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.clusterLogging = software.amazon.jsii.Kernel.get(this, "clusterLogging", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.ClusterLoggingTypes.class)));
this.defaultCapacity = software.amazon.jsii.Kernel.get(this, "defaultCapacity", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.defaultCapacityInstance = software.amazon.jsii.Kernel.get(this, "defaultCapacityInstance", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InstanceType.class));
this.defaultCapacityType = software.amazon.jsii.Kernel.get(this, "defaultCapacityType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.DefaultCapacityType.class));
this.kubectlLambdaRole = software.amazon.jsii.Kernel.get(this, "kubectlLambdaRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.albController = software.amazon.jsii.Kernel.get(this, "albController", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.AlbControllerOptions.class));
this.clusterHandlerEnvironment = software.amazon.jsii.Kernel.get(this, "clusterHandlerEnvironment", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.clusterHandlerSecurityGroup = software.amazon.jsii.Kernel.get(this, "clusterHandlerSecurityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class));
this.coreDnsComputeType = software.amazon.jsii.Kernel.get(this, "coreDnsComputeType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.CoreDnsComputeType.class));
this.endpointAccess = software.amazon.jsii.Kernel.get(this, "endpointAccess", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.EndpointAccess.class));
this.kubectlEnvironment = software.amazon.jsii.Kernel.get(this, "kubectlEnvironment", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.kubectlLayer = software.amazon.jsii.Kernel.get(this, "kubectlLayer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.ILayerVersion.class));
this.kubectlMemory = software.amazon.jsii.Kernel.get(this, "kubectlMemory", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.Size.class));
this.mastersRole = software.amazon.jsii.Kernel.get(this, "mastersRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.onEventLayer = software.amazon.jsii.Kernel.get(this, "onEventLayer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.ILayerVersion.class));
this.outputMastersRoleArn = software.amazon.jsii.Kernel.get(this, "outputMastersRoleArn", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.placeClusterHandlerInVpc = software.amazon.jsii.Kernel.get(this, "placeClusterHandlerInVpc", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.prune = software.amazon.jsii.Kernel.get(this, "prune", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.secretsEncryptionKey = software.amazon.jsii.Kernel.get(this, "secretsEncryptionKey", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kms.IKey.class));
this.serviceIpv4Cidr = software.amazon.jsii.Kernel.get(this, "serviceIpv4Cidr", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.version = software.amazon.jsii.Kernel.get(this, "version", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.eks.KubernetesVersion.class));
this.clusterName = software.amazon.jsii.Kernel.get(this, "clusterName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.outputClusterName = software.amazon.jsii.Kernel.get(this, "outputClusterName", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.outputConfigCommand = software.amazon.jsii.Kernel.get(this, "outputConfigCommand", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.role = software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IRole.class));
this.securityGroup = software.amazon.jsii.Kernel.get(this, "securityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class));
this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.vpcSubnets = software.amazon.jsii.Kernel.get(this, "vpcSubnets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class)));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.clusterLogging = (java.util.List)builder.clusterLogging;
this.defaultCapacity = builder.defaultCapacity;
this.defaultCapacityInstance = builder.defaultCapacityInstance;
this.defaultCapacityType = builder.defaultCapacityType;
this.kubectlLambdaRole = builder.kubectlLambdaRole;
this.tags = builder.tags;
this.albController = builder.albController;
this.clusterHandlerEnvironment = builder.clusterHandlerEnvironment;
this.clusterHandlerSecurityGroup = builder.clusterHandlerSecurityGroup;
this.coreDnsComputeType = builder.coreDnsComputeType;
this.endpointAccess = builder.endpointAccess;
this.kubectlEnvironment = builder.kubectlEnvironment;
this.kubectlLayer = builder.kubectlLayer;
this.kubectlMemory = builder.kubectlMemory;
this.mastersRole = builder.mastersRole;
this.onEventLayer = builder.onEventLayer;
this.outputMastersRoleArn = builder.outputMastersRoleArn;
this.placeClusterHandlerInVpc = builder.placeClusterHandlerInVpc;
this.prune = builder.prune;
this.secretsEncryptionKey = builder.secretsEncryptionKey;
this.serviceIpv4Cidr = builder.serviceIpv4Cidr;
this.version = java.util.Objects.requireNonNull(builder.version, "version is required");
this.clusterName = builder.clusterName;
this.outputClusterName = builder.outputClusterName;
this.outputConfigCommand = builder.outputConfigCommand;
this.role = builder.role;
this.securityGroup = builder.securityGroup;
this.vpc = builder.vpc;
this.vpcSubnets = (java.util.List)builder.vpcSubnets;
}
@Override
public final java.util.List getClusterLogging() {
return this.clusterLogging;
}
@Override
public final java.lang.Number getDefaultCapacity() {
return this.defaultCapacity;
}
@Override
public final software.amazon.awscdk.services.ec2.InstanceType getDefaultCapacityInstance() {
return this.defaultCapacityInstance;
}
@Override
public final software.amazon.awscdk.services.eks.DefaultCapacityType getDefaultCapacityType() {
return this.defaultCapacityType;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getKubectlLambdaRole() {
return this.kubectlLambdaRole;
}
@Override
public final java.util.Map getTags() {
return this.tags;
}
@Override
public final software.amazon.awscdk.services.eks.AlbControllerOptions getAlbController() {
return this.albController;
}
@Override
public final java.util.Map getClusterHandlerEnvironment() {
return this.clusterHandlerEnvironment;
}
@Override
public final software.amazon.awscdk.services.ec2.ISecurityGroup getClusterHandlerSecurityGroup() {
return this.clusterHandlerSecurityGroup;
}
@Override
public final software.amazon.awscdk.services.eks.CoreDnsComputeType getCoreDnsComputeType() {
return this.coreDnsComputeType;
}
@Override
public final software.amazon.awscdk.services.eks.EndpointAccess getEndpointAccess() {
return this.endpointAccess;
}
@Override
public final java.util.Map getKubectlEnvironment() {
return this.kubectlEnvironment;
}
@Override
public final software.amazon.awscdk.services.lambda.ILayerVersion getKubectlLayer() {
return this.kubectlLayer;
}
@Override
public final software.amazon.awscdk.core.Size getKubectlMemory() {
return this.kubectlMemory;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getMastersRole() {
return this.mastersRole;
}
@Override
public final software.amazon.awscdk.services.lambda.ILayerVersion getOnEventLayer() {
return this.onEventLayer;
}
@Override
public final java.lang.Boolean getOutputMastersRoleArn() {
return this.outputMastersRoleArn;
}
@Override
public final java.lang.Boolean getPlaceClusterHandlerInVpc() {
return this.placeClusterHandlerInVpc;
}
@Override
public final java.lang.Boolean getPrune() {
return this.prune;
}
@Override
public final software.amazon.awscdk.services.kms.IKey getSecretsEncryptionKey() {
return this.secretsEncryptionKey;
}
@Override
public final java.lang.String getServiceIpv4Cidr() {
return this.serviceIpv4Cidr;
}
@Override
public final software.amazon.awscdk.services.eks.KubernetesVersion getVersion() {
return this.version;
}
@Override
public final java.lang.String getClusterName() {
return this.clusterName;
}
@Override
public final java.lang.Boolean getOutputClusterName() {
return this.outputClusterName;
}
@Override
public final java.lang.Boolean getOutputConfigCommand() {
return this.outputConfigCommand;
}
@Override
public final software.amazon.awscdk.services.iam.IRole getRole() {
return this.role;
}
@Override
public final software.amazon.awscdk.services.ec2.ISecurityGroup getSecurityGroup() {
return this.securityGroup;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getVpc() {
return this.vpc;
}
@Override
public final java.util.List getVpcSubnets() {
return this.vpcSubnets;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getClusterLogging() != null) {
data.set("clusterLogging", om.valueToTree(this.getClusterLogging()));
}
if (this.getDefaultCapacity() != null) {
data.set("defaultCapacity", om.valueToTree(this.getDefaultCapacity()));
}
if (this.getDefaultCapacityInstance() != null) {
data.set("defaultCapacityInstance", om.valueToTree(this.getDefaultCapacityInstance()));
}
if (this.getDefaultCapacityType() != null) {
data.set("defaultCapacityType", om.valueToTree(this.getDefaultCapacityType()));
}
if (this.getKubectlLambdaRole() != null) {
data.set("kubectlLambdaRole", om.valueToTree(this.getKubectlLambdaRole()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
if (this.getAlbController() != null) {
data.set("albController", om.valueToTree(this.getAlbController()));
}
if (this.getClusterHandlerEnvironment() != null) {
data.set("clusterHandlerEnvironment", om.valueToTree(this.getClusterHandlerEnvironment()));
}
if (this.getClusterHandlerSecurityGroup() != null) {
data.set("clusterHandlerSecurityGroup", om.valueToTree(this.getClusterHandlerSecurityGroup()));
}
if (this.getCoreDnsComputeType() != null) {
data.set("coreDnsComputeType", om.valueToTree(this.getCoreDnsComputeType()));
}
if (this.getEndpointAccess() != null) {
data.set("endpointAccess", om.valueToTree(this.getEndpointAccess()));
}
if (this.getKubectlEnvironment() != null) {
data.set("kubectlEnvironment", om.valueToTree(this.getKubectlEnvironment()));
}
if (this.getKubectlLayer() != null) {
data.set("kubectlLayer", om.valueToTree(this.getKubectlLayer()));
}
if (this.getKubectlMemory() != null) {
data.set("kubectlMemory", om.valueToTree(this.getKubectlMemory()));
}
if (this.getMastersRole() != null) {
data.set("mastersRole", om.valueToTree(this.getMastersRole()));
}
if (this.getOnEventLayer() != null) {
data.set("onEventLayer", om.valueToTree(this.getOnEventLayer()));
}
if (this.getOutputMastersRoleArn() != null) {
data.set("outputMastersRoleArn", om.valueToTree(this.getOutputMastersRoleArn()));
}
if (this.getPlaceClusterHandlerInVpc() != null) {
data.set("placeClusterHandlerInVpc", om.valueToTree(this.getPlaceClusterHandlerInVpc()));
}
if (this.getPrune() != null) {
data.set("prune", om.valueToTree(this.getPrune()));
}
if (this.getSecretsEncryptionKey() != null) {
data.set("secretsEncryptionKey", om.valueToTree(this.getSecretsEncryptionKey()));
}
if (this.getServiceIpv4Cidr() != null) {
data.set("serviceIpv4Cidr", om.valueToTree(this.getServiceIpv4Cidr()));
}
data.set("version", om.valueToTree(this.getVersion()));
if (this.getClusterName() != null) {
data.set("clusterName", om.valueToTree(this.getClusterName()));
}
if (this.getOutputClusterName() != null) {
data.set("outputClusterName", om.valueToTree(this.getOutputClusterName()));
}
if (this.getOutputConfigCommand() != null) {
data.set("outputConfigCommand", om.valueToTree(this.getOutputConfigCommand()));
}
if (this.getRole() != null) {
data.set("role", om.valueToTree(this.getRole()));
}
if (this.getSecurityGroup() != null) {
data.set("securityGroup", om.valueToTree(this.getSecurityGroup()));
}
if (this.getVpc() != null) {
data.set("vpc", om.valueToTree(this.getVpc()));
}
if (this.getVpcSubnets() != null) {
data.set("vpcSubnets", om.valueToTree(this.getVpcSubnets()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-eks.ClusterProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ClusterProps.Jsii$Proxy that = (ClusterProps.Jsii$Proxy) o;
if (this.clusterLogging != null ? !this.clusterLogging.equals(that.clusterLogging) : that.clusterLogging != null) return false;
if (this.defaultCapacity != null ? !this.defaultCapacity.equals(that.defaultCapacity) : that.defaultCapacity != null) return false;
if (this.defaultCapacityInstance != null ? !this.defaultCapacityInstance.equals(that.defaultCapacityInstance) : that.defaultCapacityInstance != null) return false;
if (this.defaultCapacityType != null ? !this.defaultCapacityType.equals(that.defaultCapacityType) : that.defaultCapacityType != null) return false;
if (this.kubectlLambdaRole != null ? !this.kubectlLambdaRole.equals(that.kubectlLambdaRole) : that.kubectlLambdaRole != null) return false;
if (this.tags != null ? !this.tags.equals(that.tags) : that.tags != null) return false;
if (this.albController != null ? !this.albController.equals(that.albController) : that.albController != null) return false;
if (this.clusterHandlerEnvironment != null ? !this.clusterHandlerEnvironment.equals(that.clusterHandlerEnvironment) : that.clusterHandlerEnvironment != null) return false;
if (this.clusterHandlerSecurityGroup != null ? !this.clusterHandlerSecurityGroup.equals(that.clusterHandlerSecurityGroup) : that.clusterHandlerSecurityGroup != null) return false;
if (this.coreDnsComputeType != null ? !this.coreDnsComputeType.equals(that.coreDnsComputeType) : that.coreDnsComputeType != null) return false;
if (this.endpointAccess != null ? !this.endpointAccess.equals(that.endpointAccess) : that.endpointAccess != null) return false;
if (this.kubectlEnvironment != null ? !this.kubectlEnvironment.equals(that.kubectlEnvironment) : that.kubectlEnvironment != null) return false;
if (this.kubectlLayer != null ? !this.kubectlLayer.equals(that.kubectlLayer) : that.kubectlLayer != null) return false;
if (this.kubectlMemory != null ? !this.kubectlMemory.equals(that.kubectlMemory) : that.kubectlMemory != null) return false;
if (this.mastersRole != null ? !this.mastersRole.equals(that.mastersRole) : that.mastersRole != null) return false;
if (this.onEventLayer != null ? !this.onEventLayer.equals(that.onEventLayer) : that.onEventLayer != null) return false;
if (this.outputMastersRoleArn != null ? !this.outputMastersRoleArn.equals(that.outputMastersRoleArn) : that.outputMastersRoleArn != null) return false;
if (this.placeClusterHandlerInVpc != null ? !this.placeClusterHandlerInVpc.equals(that.placeClusterHandlerInVpc) : that.placeClusterHandlerInVpc != null) return false;
if (this.prune != null ? !this.prune.equals(that.prune) : that.prune != null) return false;
if (this.secretsEncryptionKey != null ? !this.secretsEncryptionKey.equals(that.secretsEncryptionKey) : that.secretsEncryptionKey != null) return false;
if (this.serviceIpv4Cidr != null ? !this.serviceIpv4Cidr.equals(that.serviceIpv4Cidr) : that.serviceIpv4Cidr != null) return false;
if (!version.equals(that.version)) return false;
if (this.clusterName != null ? !this.clusterName.equals(that.clusterName) : that.clusterName != null) return false;
if (this.outputClusterName != null ? !this.outputClusterName.equals(that.outputClusterName) : that.outputClusterName != null) return false;
if (this.outputConfigCommand != null ? !this.outputConfigCommand.equals(that.outputConfigCommand) : that.outputConfigCommand != null) return false;
if (this.role != null ? !this.role.equals(that.role) : that.role != null) return false;
if (this.securityGroup != null ? !this.securityGroup.equals(that.securityGroup) : that.securityGroup != null) return false;
if (this.vpc != null ? !this.vpc.equals(that.vpc) : that.vpc != null) return false;
return this.vpcSubnets != null ? this.vpcSubnets.equals(that.vpcSubnets) : that.vpcSubnets == null;
}
@Override
public final int hashCode() {
int result = this.clusterLogging != null ? this.clusterLogging.hashCode() : 0;
result = 31 * result + (this.defaultCapacity != null ? this.defaultCapacity.hashCode() : 0);
result = 31 * result + (this.defaultCapacityInstance != null ? this.defaultCapacityInstance.hashCode() : 0);
result = 31 * result + (this.defaultCapacityType != null ? this.defaultCapacityType.hashCode() : 0);
result = 31 * result + (this.kubectlLambdaRole != null ? this.kubectlLambdaRole.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
result = 31 * result + (this.albController != null ? this.albController.hashCode() : 0);
result = 31 * result + (this.clusterHandlerEnvironment != null ? this.clusterHandlerEnvironment.hashCode() : 0);
result = 31 * result + (this.clusterHandlerSecurityGroup != null ? this.clusterHandlerSecurityGroup.hashCode() : 0);
result = 31 * result + (this.coreDnsComputeType != null ? this.coreDnsComputeType.hashCode() : 0);
result = 31 * result + (this.endpointAccess != null ? this.endpointAccess.hashCode() : 0);
result = 31 * result + (this.kubectlEnvironment != null ? this.kubectlEnvironment.hashCode() : 0);
result = 31 * result + (this.kubectlLayer != null ? this.kubectlLayer.hashCode() : 0);
result = 31 * result + (this.kubectlMemory != null ? this.kubectlMemory.hashCode() : 0);
result = 31 * result + (this.mastersRole != null ? this.mastersRole.hashCode() : 0);
result = 31 * result + (this.onEventLayer != null ? this.onEventLayer.hashCode() : 0);
result = 31 * result + (this.outputMastersRoleArn != null ? this.outputMastersRoleArn.hashCode() : 0);
result = 31 * result + (this.placeClusterHandlerInVpc != null ? this.placeClusterHandlerInVpc.hashCode() : 0);
result = 31 * result + (this.prune != null ? this.prune.hashCode() : 0);
result = 31 * result + (this.secretsEncryptionKey != null ? this.secretsEncryptionKey.hashCode() : 0);
result = 31 * result + (this.serviceIpv4Cidr != null ? this.serviceIpv4Cidr.hashCode() : 0);
result = 31 * result + (this.version.hashCode());
result = 31 * result + (this.clusterName != null ? this.clusterName.hashCode() : 0);
result = 31 * result + (this.outputClusterName != null ? this.outputClusterName.hashCode() : 0);
result = 31 * result + (this.outputConfigCommand != null ? this.outputConfigCommand.hashCode() : 0);
result = 31 * result + (this.role != null ? this.role.hashCode() : 0);
result = 31 * result + (this.securityGroup != null ? this.securityGroup.hashCode() : 0);
result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0);
result = 31 * result + (this.vpcSubnets != null ? this.vpcSubnets.hashCode() : 0);
return result;
}
}
}