Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.eks.model.CreateClusterRequest Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.eks.model;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.DefaultValueTrait;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class CreateClusterRequest extends EksRequest implements
ToCopyableBuilder {
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(CreateClusterRequest::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("version")
.getter(getter(CreateClusterRequest::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("version").build()).build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("roleArn").getter(getter(CreateClusterRequest::roleArn)).setter(setter(Builder::roleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("roleArn").build()).build();
private static final SdkField RESOURCES_VPC_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("resourcesVpcConfig")
.getter(getter(CreateClusterRequest::resourcesVpcConfig)).setter(setter(Builder::resourcesVpcConfig))
.constructor(VpcConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourcesVpcConfig").build())
.build();
private static final SdkField KUBERNETES_NETWORK_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("kubernetesNetworkConfig")
.getter(getter(CreateClusterRequest::kubernetesNetworkConfig)).setter(setter(Builder::kubernetesNetworkConfig))
.constructor(KubernetesNetworkConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kubernetesNetworkConfig").build())
.build();
private static final SdkField LOGGING_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("logging").getter(getter(CreateClusterRequest::logging)).setter(setter(Builder::logging))
.constructor(Logging::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logging").build()).build();
private static final SdkField CLIENT_REQUEST_TOKEN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("clientRequestToken")
.getter(getter(CreateClusterRequest::clientRequestToken))
.setter(setter(Builder::clientRequestToken))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("clientRequestToken").build(),
DefaultValueTrait.idempotencyToken()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("tags")
.getter(getter(CreateClusterRequest::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> ENCRYPTION_CONFIG_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("encryptionConfig")
.getter(getter(CreateClusterRequest::encryptionConfig))
.setter(setter(Builder::encryptionConfig))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionConfig").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(EncryptionConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField OUTPOST_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("outpostConfig")
.getter(getter(CreateClusterRequest::outpostConfig)).setter(setter(Builder::outpostConfig))
.constructor(OutpostConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("outpostConfig").build()).build();
private static final SdkField ACCESS_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("accessConfig")
.getter(getter(CreateClusterRequest::accessConfig)).setter(setter(Builder::accessConfig))
.constructor(CreateAccessConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("accessConfig").build()).build();
private static final SdkField BOOTSTRAP_SELF_MANAGED_ADDONS_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("bootstrapSelfManagedAddons")
.getter(getter(CreateClusterRequest::bootstrapSelfManagedAddons))
.setter(setter(Builder::bootstrapSelfManagedAddons))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bootstrapSelfManagedAddons").build())
.build();
private static final SdkField UPGRADE_POLICY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("upgradePolicy")
.getter(getter(CreateClusterRequest::upgradePolicy)).setter(setter(Builder::upgradePolicy))
.constructor(UpgradePolicyRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("upgradePolicy").build()).build();
private static final SdkField ZONAL_SHIFT_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("zonalShiftConfig")
.getter(getter(CreateClusterRequest::zonalShiftConfig)).setter(setter(Builder::zonalShiftConfig))
.constructor(ZonalShiftConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("zonalShiftConfig").build()).build();
private static final SdkField REMOTE_NETWORK_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("remoteNetworkConfig")
.getter(getter(CreateClusterRequest::remoteNetworkConfig)).setter(setter(Builder::remoteNetworkConfig))
.constructor(RemoteNetworkConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("remoteNetworkConfig").build())
.build();
private static final SdkField COMPUTE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("computeConfig")
.getter(getter(CreateClusterRequest::computeConfig)).setter(setter(Builder::computeConfig))
.constructor(ComputeConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeConfig").build()).build();
private static final SdkField STORAGE_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("storageConfig")
.getter(getter(CreateClusterRequest::storageConfig)).setter(setter(Builder::storageConfig))
.constructor(StorageConfigRequest::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("storageConfig").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, VERSION_FIELD,
ROLE_ARN_FIELD, RESOURCES_VPC_CONFIG_FIELD, KUBERNETES_NETWORK_CONFIG_FIELD, LOGGING_FIELD,
CLIENT_REQUEST_TOKEN_FIELD, TAGS_FIELD, ENCRYPTION_CONFIG_FIELD, OUTPOST_CONFIG_FIELD, ACCESS_CONFIG_FIELD,
BOOTSTRAP_SELF_MANAGED_ADDONS_FIELD, UPGRADE_POLICY_FIELD, ZONAL_SHIFT_CONFIG_FIELD, REMOTE_NETWORK_CONFIG_FIELD,
COMPUTE_CONFIG_FIELD, STORAGE_CONFIG_FIELD));
private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer();
private final String name;
private final String version;
private final String roleArn;
private final VpcConfigRequest resourcesVpcConfig;
private final KubernetesNetworkConfigRequest kubernetesNetworkConfig;
private final Logging logging;
private final String clientRequestToken;
private final Map tags;
private final List encryptionConfig;
private final OutpostConfigRequest outpostConfig;
private final CreateAccessConfigRequest accessConfig;
private final Boolean bootstrapSelfManagedAddons;
private final UpgradePolicyRequest upgradePolicy;
private final ZonalShiftConfigRequest zonalShiftConfig;
private final RemoteNetworkConfigRequest remoteNetworkConfig;
private final ComputeConfigRequest computeConfig;
private final StorageConfigRequest storageConfig;
private CreateClusterRequest(BuilderImpl builder) {
super(builder);
this.name = builder.name;
this.version = builder.version;
this.roleArn = builder.roleArn;
this.resourcesVpcConfig = builder.resourcesVpcConfig;
this.kubernetesNetworkConfig = builder.kubernetesNetworkConfig;
this.logging = builder.logging;
this.clientRequestToken = builder.clientRequestToken;
this.tags = builder.tags;
this.encryptionConfig = builder.encryptionConfig;
this.outpostConfig = builder.outpostConfig;
this.accessConfig = builder.accessConfig;
this.bootstrapSelfManagedAddons = builder.bootstrapSelfManagedAddons;
this.upgradePolicy = builder.upgradePolicy;
this.zonalShiftConfig = builder.zonalShiftConfig;
this.remoteNetworkConfig = builder.remoteNetworkConfig;
this.computeConfig = builder.computeConfig;
this.storageConfig = builder.storageConfig;
}
/**
*
* The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive),
* hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100 characters.
* The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're
* creating the cluster in.
*
*
* @return The unique name to give to your cluster. The name can contain only alphanumeric characters
* (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be
* longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web
* Services account that you're creating the cluster in.
*/
public final String name() {
return name;
}
/**
*
* The desired Kubernetes version for your cluster. If you don't specify a value here, the default version available
* in Amazon EKS is used.
*
*
*
* The default version might not be the latest version available.
*
*
*
* @return The desired Kubernetes version for your cluster. If you don't specify a value here, the default version
* available in Amazon EKS is used.
*
* The default version might not be the latest version available.
*
*/
public final String version() {
return version;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make
* calls to Amazon Web Services API operations on your behalf. For more information, see Amazon EKS Service IAM Role in
* the Amazon EKS User Guide .
*
*
* @return The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane
* to make calls to Amazon Web Services API operations on your behalf. For more information, see Amazon EKS Service IAM
* Role in the Amazon EKS User Guide .
*/
public final String roleArn() {
return roleArn;
}
/**
*
* The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group
* Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can specify up
* to five security groups. However, we recommend that you use a dedicated security group for your cluster control
* plane.
*
*
* @return The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations
* and Cluster Security Group
* Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can
* specify up to five security groups. However, we recommend that you use a dedicated security group for
* your cluster control plane.
*/
public final VpcConfigRequest resourcesVpcConfig() {
return resourcesVpcConfig;
}
/**
*
* The Kubernetes network configuration for the cluster.
*
*
* @return The Kubernetes network configuration for the cluster.
*/
public final KubernetesNetworkConfigRequest kubernetesNetworkConfig() {
return kubernetesNetworkConfig;
}
/**
*
* Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default,
* cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control plane
* logs in the Amazon EKS User Guide .
*
*
*
* CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For
* more information, see CloudWatch Pricing .
*
*
*
* @return Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By
* default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster
* control plane logs in the Amazon EKS User Guide .
*
* CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs.
* For more information, see CloudWatch Pricing .
*
*/
public final Logging logging() {
return logging;
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public final String clientRequestToken() {
return clientRequestToken;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructMap);
}
/**
*
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You
* define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return Metadata that assists with categorization and organization. Each tag consists of a key and an optional
* value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*/
public final Map tags() {
return tags;
}
/**
* For responses, this returns true if the service returned a value for the EncryptionConfig property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasEncryptionConfig() {
return encryptionConfig != null && !(encryptionConfig instanceof SdkAutoConstructList);
}
/**
*
* The encryption configuration for the cluster.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasEncryptionConfig} method.
*
*
* @return The encryption configuration for the cluster.
*/
public final List encryptionConfig() {
return encryptionConfig;
}
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* Before creating a local cluster on an Outpost, review Local clusters
* for Amazon EKS on Amazon Web Services Outposts in the Amazon EKS User Guide . This object isn't
* available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*
*
* @return An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services
* Outpost. Before creating a local cluster on an Outpost, review Local
* clusters for Amazon EKS on Amazon Web Services Outposts in the Amazon EKS User Guide . This
* object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*/
public final OutpostConfigRequest outpostConfig() {
return outpostConfig;
}
/**
*
* The access configuration for the cluster.
*
*
* @return The access configuration for the cluster.
*/
public final CreateAccessConfigRequest accessConfig() {
return accessConfig;
}
/**
*
* If you set this value to False
when creating a cluster, the default networking add-ons will not be
* installed.
*
*
* The default networking addons include vpc-cni, coredns, and kube-proxy.
*
*
* Use this option when you plan to install third-party alternative add-ons or self-manage the default networking
* add-ons.
*
*
* @return If you set this value to False
when creating a cluster, the default networking add-ons will
* not be installed.
*
* The default networking addons include vpc-cni, coredns, and kube-proxy.
*
*
* Use this option when you plan to install third-party alternative add-ons or self-manage the default
* networking add-ons.
*/
public final Boolean bootstrapSelfManagedAddons() {
return bootstrapSelfManagedAddons;
}
/**
*
* New clusters, by default, have extended support enabled. You can disable extended support when creating a cluster
* by setting this value to STANDARD
.
*
*
* @return New clusters, by default, have extended support enabled. You can disable extended support when creating a
* cluster by setting this value to STANDARD
.
*/
public final UpgradePolicyRequest upgradePolicy() {
return upgradePolicy;
}
/**
*
* Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures
* zonal autoshift for the cluster.
*
*
* Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a
* temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal shift
* expires or you cancel it. You can extend the zonal shift if necessary.
*
*
* You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by enabling
* zonal autoshift . This shift updates the flow of east-to-west network traffic in your cluster to only
* consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or NLB handling
* ingress traffic for applications in your EKS cluster will automatically route traffic to targets in the healthy
* AZs. For more information about zonal shift in EKS, see Learn about Amazon Application Recovery
* Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .
*
*
* @return Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services
* configures zonal autoshift for the cluster.
*
* Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to
* be a temporary measure that allows you to move traffic for a resource away from an impaired AZ until the
* zonal shift expires or you cancel it. You can extend the zonal shift if necessary.
*
*
* You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by
* enabling zonal autoshift . This shift updates the flow of east-to-west network traffic in your
* cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally,
* any ALB or NLB handling ingress traffic for applications in your EKS cluster will automatically route
* traffic to targets in the healthy AZs. For more information about zonal shift in EKS, see Learn about Amazon Application
* Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .
*/
public final ZonalShiftConfigRequest zonalShiftConfig() {
return zonalShiftConfig;
}
/**
*
* The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after the
* cluster is created.
*
*
* @return The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration
* after the cluster is created.
*/
public final RemoteNetworkConfigRequest remoteNetworkConfig() {
return remoteNetworkConfig;
}
/**
*
* Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the
* compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web
* Services account
*
*
* @return Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If
* the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your
* Amazon Web Services account
*/
public final ComputeConfigRequest computeConfig() {
return computeConfig;
}
/**
*
* Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the
* block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services
* account.
*
*
* @return Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster.
* If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your
* Amazon Web Services account.
*/
public final StorageConfigRequest storageConfig() {
return storageConfig;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(version());
hashCode = 31 * hashCode + Objects.hashCode(roleArn());
hashCode = 31 * hashCode + Objects.hashCode(resourcesVpcConfig());
hashCode = 31 * hashCode + Objects.hashCode(kubernetesNetworkConfig());
hashCode = 31 * hashCode + Objects.hashCode(logging());
hashCode = 31 * hashCode + Objects.hashCode(clientRequestToken());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasEncryptionConfig() ? encryptionConfig() : null);
hashCode = 31 * hashCode + Objects.hashCode(outpostConfig());
hashCode = 31 * hashCode + Objects.hashCode(accessConfig());
hashCode = 31 * hashCode + Objects.hashCode(bootstrapSelfManagedAddons());
hashCode = 31 * hashCode + Objects.hashCode(upgradePolicy());
hashCode = 31 * hashCode + Objects.hashCode(zonalShiftConfig());
hashCode = 31 * hashCode + Objects.hashCode(remoteNetworkConfig());
hashCode = 31 * hashCode + Objects.hashCode(computeConfig());
hashCode = 31 * hashCode + Objects.hashCode(storageConfig());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CreateClusterRequest)) {
return false;
}
CreateClusterRequest other = (CreateClusterRequest) obj;
return Objects.equals(name(), other.name()) && Objects.equals(version(), other.version())
&& Objects.equals(roleArn(), other.roleArn()) && Objects.equals(resourcesVpcConfig(), other.resourcesVpcConfig())
&& Objects.equals(kubernetesNetworkConfig(), other.kubernetesNetworkConfig())
&& Objects.equals(logging(), other.logging()) && Objects.equals(clientRequestToken(), other.clientRequestToken())
&& hasTags() == other.hasTags() && Objects.equals(tags(), other.tags())
&& hasEncryptionConfig() == other.hasEncryptionConfig()
&& Objects.equals(encryptionConfig(), other.encryptionConfig())
&& Objects.equals(outpostConfig(), other.outpostConfig()) && Objects.equals(accessConfig(), other.accessConfig())
&& Objects.equals(bootstrapSelfManagedAddons(), other.bootstrapSelfManagedAddons())
&& Objects.equals(upgradePolicy(), other.upgradePolicy())
&& Objects.equals(zonalShiftConfig(), other.zonalShiftConfig())
&& Objects.equals(remoteNetworkConfig(), other.remoteNetworkConfig())
&& Objects.equals(computeConfig(), other.computeConfig())
&& Objects.equals(storageConfig(), other.storageConfig());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("CreateClusterRequest").add("Name", name()).add("Version", version()).add("RoleArn", roleArn())
.add("ResourcesVpcConfig", resourcesVpcConfig()).add("KubernetesNetworkConfig", kubernetesNetworkConfig())
.add("Logging", logging()).add("ClientRequestToken", clientRequestToken()).add("Tags", hasTags() ? tags() : null)
.add("EncryptionConfig", hasEncryptionConfig() ? encryptionConfig() : null).add("OutpostConfig", outpostConfig())
.add("AccessConfig", accessConfig()).add("BootstrapSelfManagedAddons", bootstrapSelfManagedAddons())
.add("UpgradePolicy", upgradePolicy()).add("ZonalShiftConfig", zonalShiftConfig())
.add("RemoteNetworkConfig", remoteNetworkConfig()).add("ComputeConfig", computeConfig())
.add("StorageConfig", storageConfig()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "version":
return Optional.ofNullable(clazz.cast(version()));
case "roleArn":
return Optional.ofNullable(clazz.cast(roleArn()));
case "resourcesVpcConfig":
return Optional.ofNullable(clazz.cast(resourcesVpcConfig()));
case "kubernetesNetworkConfig":
return Optional.ofNullable(clazz.cast(kubernetesNetworkConfig()));
case "logging":
return Optional.ofNullable(clazz.cast(logging()));
case "clientRequestToken":
return Optional.ofNullable(clazz.cast(clientRequestToken()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
case "encryptionConfig":
return Optional.ofNullable(clazz.cast(encryptionConfig()));
case "outpostConfig":
return Optional.ofNullable(clazz.cast(outpostConfig()));
case "accessConfig":
return Optional.ofNullable(clazz.cast(accessConfig()));
case "bootstrapSelfManagedAddons":
return Optional.ofNullable(clazz.cast(bootstrapSelfManagedAddons()));
case "upgradePolicy":
return Optional.ofNullable(clazz.cast(upgradePolicy()));
case "zonalShiftConfig":
return Optional.ofNullable(clazz.cast(zonalShiftConfig()));
case "remoteNetworkConfig":
return Optional.ofNullable(clazz.cast(remoteNetworkConfig()));
case "computeConfig":
return Optional.ofNullable(clazz.cast(computeConfig()));
case "storageConfig":
return Optional.ofNullable(clazz.cast(storageConfig()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
@Override
public final Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
private static Map> memberNameToFieldInitializer() {
Map> map = new HashMap<>();
map.put("name", NAME_FIELD);
map.put("version", VERSION_FIELD);
map.put("roleArn", ROLE_ARN_FIELD);
map.put("resourcesVpcConfig", RESOURCES_VPC_CONFIG_FIELD);
map.put("kubernetesNetworkConfig", KUBERNETES_NETWORK_CONFIG_FIELD);
map.put("logging", LOGGING_FIELD);
map.put("clientRequestToken", CLIENT_REQUEST_TOKEN_FIELD);
map.put("tags", TAGS_FIELD);
map.put("encryptionConfig", ENCRYPTION_CONFIG_FIELD);
map.put("outpostConfig", OUTPOST_CONFIG_FIELD);
map.put("accessConfig", ACCESS_CONFIG_FIELD);
map.put("bootstrapSelfManagedAddons", BOOTSTRAP_SELF_MANAGED_ADDONS_FIELD);
map.put("upgradePolicy", UPGRADE_POLICY_FIELD);
map.put("zonalShiftConfig", ZONAL_SHIFT_CONFIG_FIELD);
map.put("remoteNetworkConfig", REMOTE_NETWORK_CONFIG_FIELD);
map.put("computeConfig", COMPUTE_CONFIG_FIELD);
map.put("storageConfig", STORAGE_CONFIG_FIELD);
return Collections.unmodifiableMap(map);
}
private static Function getter(Function g) {
return obj -> g.apply((CreateClusterRequest) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends EksRequest.Builder, SdkPojo, CopyableBuilder {
/**
*
* The unique name to give to your cluster. The name can contain only alphanumeric characters (case-sensitive),
* hyphens, and underscores. It must start with an alphanumeric character and can't be longer than 100
* characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account
* that you're creating the cluster in.
*
*
* @param name
* The unique name to give to your cluster. The name can contain only alphanumeric characters
* (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character and can't be
* longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon
* Web Services account that you're creating the cluster in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The desired Kubernetes version for your cluster. If you don't specify a value here, the default version
* available in Amazon EKS is used.
*
*
*
* The default version might not be the latest version available.
*
*
*
* @param version
* The desired Kubernetes version for your cluster. If you don't specify a value here, the default
* version available in Amazon EKS is used.
*
* The default version might not be the latest version available.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder version(String version);
/**
*
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to
* make calls to Amazon Web Services API operations on your behalf. For more information, see Amazon EKS Service IAM Role
* in the Amazon EKS User Guide .
*
*
* @param roleArn
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control
* plane to make calls to Amazon Web Services API operations on your behalf. For more information, see Amazon EKS Service IAM
* Role in the Amazon EKS User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder roleArn(String roleArn);
/**
*
* The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and
* Cluster Security Group
* Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can
* specify up to five security groups. However, we recommend that you use a dedicated security group for your
* cluster control plane.
*
*
* @param resourcesVpcConfig
* The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC
* Considerations and Cluster Security Group
* Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can
* specify up to five security groups. However, we recommend that you use a dedicated security group for
* your cluster control plane.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder resourcesVpcConfig(VpcConfigRequest resourcesVpcConfig);
/**
*
* The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and
* Cluster Security Group
* Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can
* specify up to five security groups. However, we recommend that you use a dedicated security group for your
* cluster control plane.
*
* This is a convenience method that creates an instance of the {@link VpcConfigRequest.Builder} avoiding the
* need to create one manually via {@link VpcConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link VpcConfigRequest.Builder#build()} is called immediately and its
* result is passed to {@link #resourcesVpcConfig(VpcConfigRequest)}.
*
* @param resourcesVpcConfig
* a consumer that will call methods on {@link VpcConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #resourcesVpcConfig(VpcConfigRequest)
*/
default Builder resourcesVpcConfig(Consumer resourcesVpcConfig) {
return resourcesVpcConfig(VpcConfigRequest.builder().applyMutation(resourcesVpcConfig).build());
}
/**
*
* The Kubernetes network configuration for the cluster.
*
*
* @param kubernetesNetworkConfig
* The Kubernetes network configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder kubernetesNetworkConfig(KubernetesNetworkConfigRequest kubernetesNetworkConfig);
/**
*
* The Kubernetes network configuration for the cluster.
*
* This is a convenience method that creates an instance of the {@link KubernetesNetworkConfigRequest.Builder}
* avoiding the need to create one manually via {@link KubernetesNetworkConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link KubernetesNetworkConfigRequest.Builder#build()} is called
* immediately and its result is passed to {@link #kubernetesNetworkConfig(KubernetesNetworkConfigRequest)}.
*
* @param kubernetesNetworkConfig
* a consumer that will call methods on {@link KubernetesNetworkConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #kubernetesNetworkConfig(KubernetesNetworkConfigRequest)
*/
default Builder kubernetesNetworkConfig(Consumer kubernetesNetworkConfig) {
return kubernetesNetworkConfig(KubernetesNetworkConfigRequest.builder().applyMutation(kubernetesNetworkConfig)
.build());
}
/**
*
* Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By
* default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control
* plane logs in the Amazon EKS User Guide .
*
*
*
* CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For
* more information, see CloudWatch Pricing .
*
*
*
* @param logging
* Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By
* default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster
* control plane logs in the Amazon EKS User Guide .
*
* CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane
* logs. For more information, see CloudWatch
* Pricing .
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder logging(Logging logging);
/**
*
* Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By
* default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control
* plane logs in the Amazon EKS User Guide .
*
*
*
* CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For
* more information, see CloudWatch Pricing .
*
* This is a convenience method that creates an instance of the {@link Logging.Builder} avoiding the
* need to create one manually via {@link Logging#builder()}.
*
*
* When the {@link Consumer} completes, {@link Logging.Builder#build()} is called immediately and its result is
* passed to {@link #logging(Logging)}.
*
* @param logging
* a consumer that will call methods on {@link Logging.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #logging(Logging)
*/
default Builder logging(Consumer logging) {
return logging(Logging.builder().applyMutation(logging).build());
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @param clientRequestToken
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder clientRequestToken(String clientRequestToken);
/**
*
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value.
* You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*
*
* @param tags
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional
* value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
/**
*
* The encryption configuration for the cluster.
*
*
* @param encryptionConfig
* The encryption configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder encryptionConfig(Collection encryptionConfig);
/**
*
* The encryption configuration for the cluster.
*
*
* @param encryptionConfig
* The encryption configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder encryptionConfig(EncryptionConfig... encryptionConfig);
/**
*
* The encryption configuration for the cluster.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder} avoiding the need to create one
* manually via {@link software.amazon.awssdk.services.eks.model.EncryptionConfig#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder#build()} is called immediately and
* its result is passed to {@link #encryptionConfig(List)}.
*
* @param encryptionConfig
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #encryptionConfig(java.util.Collection)
*/
Builder encryptionConfig(Consumer... encryptionConfig);
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* Before creating a local cluster on an Outpost, review Local
* clusters for Amazon EKS on Amazon Web Services Outposts in the Amazon EKS User Guide . This object
* isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*
*
* @param outpostConfig
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services
* Outpost. Before creating a local cluster on an Outpost, review Local
* clusters for Amazon EKS on Amazon Web Services Outposts in the Amazon EKS User Guide . This
* object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outpostConfig(OutpostConfigRequest outpostConfig);
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* Before creating a local cluster on an Outpost, review Local
* clusters for Amazon EKS on Amazon Web Services Outposts in the Amazon EKS User Guide . This object
* isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*
* This is a convenience method that creates an instance of the {@link OutpostConfigRequest.Builder} avoiding
* the need to create one manually via {@link OutpostConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link OutpostConfigRequest.Builder#build()} is called immediately and
* its result is passed to {@link #outpostConfig(OutpostConfigRequest)}.
*
* @param outpostConfig
* a consumer that will call methods on {@link OutpostConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outpostConfig(OutpostConfigRequest)
*/
default Builder outpostConfig(Consumer outpostConfig) {
return outpostConfig(OutpostConfigRequest.builder().applyMutation(outpostConfig).build());
}
/**
*
* The access configuration for the cluster.
*
*
* @param accessConfig
* The access configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder accessConfig(CreateAccessConfigRequest accessConfig);
/**
*
* The access configuration for the cluster.
*
* This is a convenience method that creates an instance of the {@link CreateAccessConfigRequest.Builder}
* avoiding the need to create one manually via {@link CreateAccessConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link CreateAccessConfigRequest.Builder#build()} is called immediately
* and its result is passed to {@link #accessConfig(CreateAccessConfigRequest)}.
*
* @param accessConfig
* a consumer that will call methods on {@link CreateAccessConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #accessConfig(CreateAccessConfigRequest)
*/
default Builder accessConfig(Consumer accessConfig) {
return accessConfig(CreateAccessConfigRequest.builder().applyMutation(accessConfig).build());
}
/**
*
* If you set this value to False
when creating a cluster, the default networking add-ons will not
* be installed.
*
*
* The default networking addons include vpc-cni, coredns, and kube-proxy.
*
*
* Use this option when you plan to install third-party alternative add-ons or self-manage the default
* networking add-ons.
*
*
* @param bootstrapSelfManagedAddons
* If you set this value to False
when creating a cluster, the default networking add-ons
* will not be installed.
*
* The default networking addons include vpc-cni, coredns, and kube-proxy.
*
*
* Use this option when you plan to install third-party alternative add-ons or self-manage the default
* networking add-ons.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder bootstrapSelfManagedAddons(Boolean bootstrapSelfManagedAddons);
/**
*
* New clusters, by default, have extended support enabled. You can disable extended support when creating a
* cluster by setting this value to STANDARD
.
*
*
* @param upgradePolicy
* New clusters, by default, have extended support enabled. You can disable extended support when
* creating a cluster by setting this value to STANDARD
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder upgradePolicy(UpgradePolicyRequest upgradePolicy);
/**
*
* New clusters, by default, have extended support enabled. You can disable extended support when creating a
* cluster by setting this value to STANDARD
.
*
* This is a convenience method that creates an instance of the {@link UpgradePolicyRequest.Builder} avoiding
* the need to create one manually via {@link UpgradePolicyRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link UpgradePolicyRequest.Builder#build()} is called immediately and
* its result is passed to {@link #upgradePolicy(UpgradePolicyRequest)}.
*
* @param upgradePolicy
* a consumer that will call methods on {@link UpgradePolicyRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #upgradePolicy(UpgradePolicyRequest)
*/
default Builder upgradePolicy(Consumer upgradePolicy) {
return upgradePolicy(UpgradePolicyRequest.builder().applyMutation(upgradePolicy).build());
}
/**
*
* Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures
* zonal autoshift for the cluster.
*
*
* Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a
* temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal
* shift expires or you cancel it. You can extend the zonal shift if necessary.
*
*
* You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by
* enabling zonal autoshift . This shift updates the flow of east-to-west network traffic in your cluster
* to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or
* NLB handling ingress traffic for applications in your EKS cluster will automatically route traffic to targets
* in the healthy AZs. For more information about zonal shift in EKS, see Learn about Amazon Application
* Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .
*
*
* @param zonalShiftConfig
* Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services
* configures zonal autoshift for the cluster.
*
* Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed
* to be a temporary measure that allows you to move traffic for a resource away from an impaired AZ
* until the zonal shift expires or you cancel it. You can extend the zonal shift if necessary.
*
*
* You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you
* by enabling zonal autoshift . This shift updates the flow of east-to-west network traffic in
* your cluster to only consider network endpoints for Pods running on worker nodes in healthy AZs.
* Additionally, any ALB or NLB handling ingress traffic for applications in your EKS cluster will
* automatically route traffic to targets in the healthy AZs. For more information about zonal shift in
* EKS, see Learn about Amazon
* Application Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User
* Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder zonalShiftConfig(ZonalShiftConfigRequest zonalShiftConfig);
/**
*
* Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled, Amazon Web Services configures
* zonal autoshift for the cluster.
*
*
* Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC zonal shift is designed to be a
* temporary measure that allows you to move traffic for a resource away from an impaired AZ until the zonal
* shift expires or you cancel it. You can extend the zonal shift if necessary.
*
*
* You can start a zonal shift for an EKS cluster, or you can allow Amazon Web Services to do it for you by
* enabling zonal autoshift . This shift updates the flow of east-to-west network traffic in your cluster
* to only consider network endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB or
* NLB handling ingress traffic for applications in your EKS cluster will automatically route traffic to targets
* in the healthy AZs. For more information about zonal shift in EKS, see Learn about Amazon Application
* Recovery Controller (ARC) Zonal Shift in Amazon EKS in the Amazon EKS User Guide .
*
* This is a convenience method that creates an instance of the {@link ZonalShiftConfigRequest.Builder} avoiding
* the need to create one manually via {@link ZonalShiftConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link ZonalShiftConfigRequest.Builder#build()} is called immediately
* and its result is passed to {@link #zonalShiftConfig(ZonalShiftConfigRequest)}.
*
* @param zonalShiftConfig
* a consumer that will call methods on {@link ZonalShiftConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #zonalShiftConfig(ZonalShiftConfigRequest)
*/
default Builder zonalShiftConfig(Consumer zonalShiftConfig) {
return zonalShiftConfig(ZonalShiftConfigRequest.builder().applyMutation(zonalShiftConfig).build());
}
/**
*
* The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after
* the cluster is created.
*
*
* @param remoteNetworkConfig
* The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration
* after the cluster is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder remoteNetworkConfig(RemoteNetworkConfigRequest remoteNetworkConfig);
/**
*
* The configuration in the cluster for EKS Hybrid Nodes. You can't change or update this configuration after
* the cluster is created.
*
* This is a convenience method that creates an instance of the {@link RemoteNetworkConfigRequest.Builder}
* avoiding the need to create one manually via {@link RemoteNetworkConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link RemoteNetworkConfigRequest.Builder#build()} is called immediately
* and its result is passed to {@link #remoteNetworkConfig(RemoteNetworkConfigRequest)}.
*
* @param remoteNetworkConfig
* a consumer that will call methods on {@link RemoteNetworkConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #remoteNetworkConfig(RemoteNetworkConfigRequest)
*/
default Builder remoteNetworkConfig(Consumer remoteNetworkConfig) {
return remoteNetworkConfig(RemoteNetworkConfigRequest.builder().applyMutation(remoteNetworkConfig).build());
}
/**
*
* Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the
* compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web
* Services account
*
*
* @param computeConfig
* Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If
* the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your
* Amazon Web Services account
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder computeConfig(ComputeConfigRequest computeConfig);
/**
*
* Enable or disable the compute capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If the
* compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web
* Services account
*
* This is a convenience method that creates an instance of the {@link ComputeConfigRequest.Builder} avoiding
* the need to create one manually via {@link ComputeConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link ComputeConfigRequest.Builder#build()} is called immediately and
* its result is passed to {@link #computeConfig(ComputeConfigRequest)}.
*
* @param computeConfig
* a consumer that will call methods on {@link ComputeConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #computeConfig(ComputeConfigRequest)
*/
default Builder computeConfig(Consumer computeConfig) {
return computeConfig(ComputeConfigRequest.builder().applyMutation(computeConfig).build());
}
/**
*
* Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If
* the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web
* Services account.
*
*
* @param storageConfig
* Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode
* cluster. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes
* in your Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder storageConfig(StorageConfigRequest storageConfig);
/**
*
* Enable or disable the block storage capability of EKS Auto Mode when creating your EKS Auto Mode cluster. If
* the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web
* Services account.
*
* This is a convenience method that creates an instance of the {@link StorageConfigRequest.Builder} avoiding
* the need to create one manually via {@link StorageConfigRequest#builder()}.
*
*
* When the {@link Consumer} completes, {@link StorageConfigRequest.Builder#build()} is called immediately and
* its result is passed to {@link #storageConfig(StorageConfigRequest)}.
*
* @param storageConfig
* a consumer that will call methods on {@link StorageConfigRequest.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #storageConfig(StorageConfigRequest)
*/
default Builder storageConfig(Consumer storageConfig) {
return storageConfig(StorageConfigRequest.builder().applyMutation(storageConfig).build());
}
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends EksRequest.BuilderImpl implements Builder {
private String name;
private String version;
private String roleArn;
private VpcConfigRequest resourcesVpcConfig;
private KubernetesNetworkConfigRequest kubernetesNetworkConfig;
private Logging logging;
private String clientRequestToken;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private List encryptionConfig = DefaultSdkAutoConstructList.getInstance();
private OutpostConfigRequest outpostConfig;
private CreateAccessConfigRequest accessConfig;
private Boolean bootstrapSelfManagedAddons;
private UpgradePolicyRequest upgradePolicy;
private ZonalShiftConfigRequest zonalShiftConfig;
private RemoteNetworkConfigRequest remoteNetworkConfig;
private ComputeConfigRequest computeConfig;
private StorageConfigRequest storageConfig;
private BuilderImpl() {
}
private BuilderImpl(CreateClusterRequest model) {
super(model);
name(model.name);
version(model.version);
roleArn(model.roleArn);
resourcesVpcConfig(model.resourcesVpcConfig);
kubernetesNetworkConfig(model.kubernetesNetworkConfig);
logging(model.logging);
clientRequestToken(model.clientRequestToken);
tags(model.tags);
encryptionConfig(model.encryptionConfig);
outpostConfig(model.outpostConfig);
accessConfig(model.accessConfig);
bootstrapSelfManagedAddons(model.bootstrapSelfManagedAddons);
upgradePolicy(model.upgradePolicy);
zonalShiftConfig(model.zonalShiftConfig);
remoteNetworkConfig(model.remoteNetworkConfig);
computeConfig(model.computeConfig);
storageConfig(model.storageConfig);
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final String getVersion() {
return version;
}
public final void setVersion(String version) {
this.version = version;
}
@Override
public final Builder version(String version) {
this.version = version;
return this;
}
public final String getRoleArn() {
return roleArn;
}
public final void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
@Override
public final Builder roleArn(String roleArn) {
this.roleArn = roleArn;
return this;
}
public final VpcConfigRequest.Builder getResourcesVpcConfig() {
return resourcesVpcConfig != null ? resourcesVpcConfig.toBuilder() : null;
}
public final void setResourcesVpcConfig(VpcConfigRequest.BuilderImpl resourcesVpcConfig) {
this.resourcesVpcConfig = resourcesVpcConfig != null ? resourcesVpcConfig.build() : null;
}
@Override
public final Builder resourcesVpcConfig(VpcConfigRequest resourcesVpcConfig) {
this.resourcesVpcConfig = resourcesVpcConfig;
return this;
}
public final KubernetesNetworkConfigRequest.Builder getKubernetesNetworkConfig() {
return kubernetesNetworkConfig != null ? kubernetesNetworkConfig.toBuilder() : null;
}
public final void setKubernetesNetworkConfig(KubernetesNetworkConfigRequest.BuilderImpl kubernetesNetworkConfig) {
this.kubernetesNetworkConfig = kubernetesNetworkConfig != null ? kubernetesNetworkConfig.build() : null;
}
@Override
public final Builder kubernetesNetworkConfig(KubernetesNetworkConfigRequest kubernetesNetworkConfig) {
this.kubernetesNetworkConfig = kubernetesNetworkConfig;
return this;
}
public final Logging.Builder getLogging() {
return logging != null ? logging.toBuilder() : null;
}
public final void setLogging(Logging.BuilderImpl logging) {
this.logging = logging != null ? logging.build() : null;
}
@Override
public final Builder logging(Logging logging) {
this.logging = logging;
return this;
}
public final String getClientRequestToken() {
return clientRequestToken;
}
public final void setClientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
}
@Override
public final Builder clientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
return this;
}
public final Map getTags() {
if (tags instanceof SdkAutoConstructMap) {
return null;
}
return tags;
}
public final void setTags(Map tags) {
this.tags = TagMapCopier.copy(tags);
}
@Override
public final Builder tags(Map tags) {
this.tags = TagMapCopier.copy(tags);
return this;
}
public final List getEncryptionConfig() {
List result = EncryptionConfigListCopier.copyToBuilder(this.encryptionConfig);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setEncryptionConfig(Collection encryptionConfig) {
this.encryptionConfig = EncryptionConfigListCopier.copyFromBuilder(encryptionConfig);
}
@Override
public final Builder encryptionConfig(Collection encryptionConfig) {
this.encryptionConfig = EncryptionConfigListCopier.copy(encryptionConfig);
return this;
}
@Override
@SafeVarargs
public final Builder encryptionConfig(EncryptionConfig... encryptionConfig) {
encryptionConfig(Arrays.asList(encryptionConfig));
return this;
}
@Override
@SafeVarargs
public final Builder encryptionConfig(Consumer... encryptionConfig) {
encryptionConfig(Stream.of(encryptionConfig).map(c -> EncryptionConfig.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final OutpostConfigRequest.Builder getOutpostConfig() {
return outpostConfig != null ? outpostConfig.toBuilder() : null;
}
public final void setOutpostConfig(OutpostConfigRequest.BuilderImpl outpostConfig) {
this.outpostConfig = outpostConfig != null ? outpostConfig.build() : null;
}
@Override
public final Builder outpostConfig(OutpostConfigRequest outpostConfig) {
this.outpostConfig = outpostConfig;
return this;
}
public final CreateAccessConfigRequest.Builder getAccessConfig() {
return accessConfig != null ? accessConfig.toBuilder() : null;
}
public final void setAccessConfig(CreateAccessConfigRequest.BuilderImpl accessConfig) {
this.accessConfig = accessConfig != null ? accessConfig.build() : null;
}
@Override
public final Builder accessConfig(CreateAccessConfigRequest accessConfig) {
this.accessConfig = accessConfig;
return this;
}
public final Boolean getBootstrapSelfManagedAddons() {
return bootstrapSelfManagedAddons;
}
public final void setBootstrapSelfManagedAddons(Boolean bootstrapSelfManagedAddons) {
this.bootstrapSelfManagedAddons = bootstrapSelfManagedAddons;
}
@Override
public final Builder bootstrapSelfManagedAddons(Boolean bootstrapSelfManagedAddons) {
this.bootstrapSelfManagedAddons = bootstrapSelfManagedAddons;
return this;
}
public final UpgradePolicyRequest.Builder getUpgradePolicy() {
return upgradePolicy != null ? upgradePolicy.toBuilder() : null;
}
public final void setUpgradePolicy(UpgradePolicyRequest.BuilderImpl upgradePolicy) {
this.upgradePolicy = upgradePolicy != null ? upgradePolicy.build() : null;
}
@Override
public final Builder upgradePolicy(UpgradePolicyRequest upgradePolicy) {
this.upgradePolicy = upgradePolicy;
return this;
}
public final ZonalShiftConfigRequest.Builder getZonalShiftConfig() {
return zonalShiftConfig != null ? zonalShiftConfig.toBuilder() : null;
}
public final void setZonalShiftConfig(ZonalShiftConfigRequest.BuilderImpl zonalShiftConfig) {
this.zonalShiftConfig = zonalShiftConfig != null ? zonalShiftConfig.build() : null;
}
@Override
public final Builder zonalShiftConfig(ZonalShiftConfigRequest zonalShiftConfig) {
this.zonalShiftConfig = zonalShiftConfig;
return this;
}
public final RemoteNetworkConfigRequest.Builder getRemoteNetworkConfig() {
return remoteNetworkConfig != null ? remoteNetworkConfig.toBuilder() : null;
}
public final void setRemoteNetworkConfig(RemoteNetworkConfigRequest.BuilderImpl remoteNetworkConfig) {
this.remoteNetworkConfig = remoteNetworkConfig != null ? remoteNetworkConfig.build() : null;
}
@Override
public final Builder remoteNetworkConfig(RemoteNetworkConfigRequest remoteNetworkConfig) {
this.remoteNetworkConfig = remoteNetworkConfig;
return this;
}
public final ComputeConfigRequest.Builder getComputeConfig() {
return computeConfig != null ? computeConfig.toBuilder() : null;
}
public final void setComputeConfig(ComputeConfigRequest.BuilderImpl computeConfig) {
this.computeConfig = computeConfig != null ? computeConfig.build() : null;
}
@Override
public final Builder computeConfig(ComputeConfigRequest computeConfig) {
this.computeConfig = computeConfig;
return this;
}
public final StorageConfigRequest.Builder getStorageConfig() {
return storageConfig != null ? storageConfig.toBuilder() : null;
}
public final void setStorageConfig(StorageConfigRequest.BuilderImpl storageConfig) {
this.storageConfig = storageConfig != null ? storageConfig.build() : null;
}
@Override
public final Builder storageConfig(StorageConfigRequest storageConfig) {
this.storageConfig = storageConfig;
return this;
}
@Override
public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) {
super.overrideConfiguration(overrideConfiguration);
return this;
}
@Override
public Builder overrideConfiguration(Consumer builderConsumer) {
super.overrideConfiguration(builderConsumer);
return this;
}
@Override
public CreateClusterRequest build() {
return new CreateClusterRequest(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
@Override
public Map> sdkFieldNameToField() {
return SDK_NAME_TO_FIELD;
}
}
}