
commonMain.aws.sdk.kotlin.services.eks.model.CreateClusterRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eks.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateClusterRequest private constructor(builder: Builder) {
/**
* The access configuration for the cluster.
*/
public val accessConfig: aws.sdk.kotlin.services.eks.model.CreateAccessConfigRequest? = builder.accessConfig
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* The encryption configuration for the cluster.
*/
public val encryptionConfig: List? = builder.encryptionConfig
/**
* The Kubernetes network configuration for the cluster.
*/
public val kubernetesNetworkConfig: aws.sdk.kotlin.services.eks.model.KubernetesNetworkConfigRequest? = builder.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](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) 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](http://aws.amazon.com/cloudwatch/pricing/).
*/
public val logging: aws.sdk.kotlin.services.eks.model.Logging? = builder.logging
/**
* The unique name to give to your cluster.
*/
public val name: kotlin.String? = builder.name
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html) in the *Amazon EKS User Guide*. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*/
public val outpostConfig: aws.sdk.kotlin.services.eks.model.OutpostConfigRequest? = builder.outpostConfig
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) 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 val resourcesVpcConfig: aws.sdk.kotlin.services.eks.model.VpcConfigRequest? = builder.resourcesVpcConfig
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) in the **Amazon EKS User Guide**.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* 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 val tags: Map? = builder.tags
/**
* 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 val version: kotlin.String? = builder.version
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eks.model.CreateClusterRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateClusterRequest(")
append("accessConfig=$accessConfig,")
append("clientRequestToken=$clientRequestToken,")
append("encryptionConfig=$encryptionConfig,")
append("kubernetesNetworkConfig=$kubernetesNetworkConfig,")
append("logging=$logging,")
append("name=$name,")
append("outpostConfig=$outpostConfig,")
append("resourcesVpcConfig=$resourcesVpcConfig,")
append("roleArn=$roleArn,")
append("tags=$tags,")
append("version=$version")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessConfig?.hashCode() ?: 0
result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
result = 31 * result + (encryptionConfig?.hashCode() ?: 0)
result = 31 * result + (kubernetesNetworkConfig?.hashCode() ?: 0)
result = 31 * result + (logging?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (outpostConfig?.hashCode() ?: 0)
result = 31 * result + (resourcesVpcConfig?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (version?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as CreateClusterRequest
if (accessConfig != other.accessConfig) return false
if (clientRequestToken != other.clientRequestToken) return false
if (encryptionConfig != other.encryptionConfig) return false
if (kubernetesNetworkConfig != other.kubernetesNetworkConfig) return false
if (logging != other.logging) return false
if (name != other.name) return false
if (outpostConfig != other.outpostConfig) return false
if (resourcesVpcConfig != other.resourcesVpcConfig) return false
if (roleArn != other.roleArn) return false
if (tags != other.tags) return false
if (version != other.version) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eks.model.CreateClusterRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The access configuration for the cluster.
*/
public var accessConfig: aws.sdk.kotlin.services.eks.model.CreateAccessConfigRequest? = null
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public var clientRequestToken: kotlin.String? = null
/**
* The encryption configuration for the cluster.
*/
public var encryptionConfig: List? = null
/**
* The Kubernetes network configuration for the cluster.
*/
public var kubernetesNetworkConfig: aws.sdk.kotlin.services.eks.model.KubernetesNetworkConfigRequest? = null
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) 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](http://aws.amazon.com/cloudwatch/pricing/).
*/
public var logging: aws.sdk.kotlin.services.eks.model.Logging? = null
/**
* The unique name to give to your cluster.
*/
public var name: kotlin.String? = null
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html) in the *Amazon EKS User Guide*. This object isn't available for creating Amazon EKS clusters on the Amazon Web Services cloud.
*/
public var outpostConfig: aws.sdk.kotlin.services.eks.model.OutpostConfigRequest? = null
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Security Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) 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 var resourcesVpcConfig: aws.sdk.kotlin.services.eks.model.VpcConfigRequest? = null
/**
* 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](https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) in the **Amazon EKS User Guide**.
*/
public var roleArn: kotlin.String? = null
/**
* 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 var tags: Map? = null
/**
* 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 var version: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eks.model.CreateClusterRequest) : this() {
this.accessConfig = x.accessConfig
this.clientRequestToken = x.clientRequestToken
this.encryptionConfig = x.encryptionConfig
this.kubernetesNetworkConfig = x.kubernetesNetworkConfig
this.logging = x.logging
this.name = x.name
this.outpostConfig = x.outpostConfig
this.resourcesVpcConfig = x.resourcesVpcConfig
this.roleArn = x.roleArn
this.tags = x.tags
this.version = x.version
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eks.model.CreateClusterRequest = CreateClusterRequest(this)
/**
* construct an [aws.sdk.kotlin.services.eks.model.CreateAccessConfigRequest] inside the given [block]
*/
public fun accessConfig(block: aws.sdk.kotlin.services.eks.model.CreateAccessConfigRequest.Builder.() -> kotlin.Unit) {
this.accessConfig = aws.sdk.kotlin.services.eks.model.CreateAccessConfigRequest.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.eks.model.KubernetesNetworkConfigRequest] inside the given [block]
*/
public fun kubernetesNetworkConfig(block: aws.sdk.kotlin.services.eks.model.KubernetesNetworkConfigRequest.Builder.() -> kotlin.Unit) {
this.kubernetesNetworkConfig = aws.sdk.kotlin.services.eks.model.KubernetesNetworkConfigRequest.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.eks.model.Logging] inside the given [block]
*/
public fun logging(block: aws.sdk.kotlin.services.eks.model.Logging.Builder.() -> kotlin.Unit) {
this.logging = aws.sdk.kotlin.services.eks.model.Logging.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.eks.model.OutpostConfigRequest] inside the given [block]
*/
public fun outpostConfig(block: aws.sdk.kotlin.services.eks.model.OutpostConfigRequest.Builder.() -> kotlin.Unit) {
this.outpostConfig = aws.sdk.kotlin.services.eks.model.OutpostConfigRequest.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.eks.model.VpcConfigRequest] inside the given [block]
*/
public fun resourcesVpcConfig(block: aws.sdk.kotlin.services.eks.model.VpcConfigRequest.Builder.() -> kotlin.Unit) {
this.resourcesVpcConfig = aws.sdk.kotlin.services.eks.model.VpcConfigRequest.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy