
commonMain.aws.sdk.kotlin.services.eks.model.CreatePodIdentityAssociationRequest.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 CreatePodIdentityAssociationRequest private constructor(builder: Builder) {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* The name of the cluster to create the association in.
*/
public val clusterName: kotlin.String? = builder.clusterName
/**
* The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
*/
public val namespace: kotlin.String? = builder.namespace
/**
* The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
*/
public val serviceAccount: kotlin.String? = builder.serviceAccount
/**
* 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.
*
* The following basic restrictions apply to tags:
* + Maximum number of tags per resource – 50
* + For each resource, each tag key must be unique, and each tag key can have only one value.
* + Maximum key length – 128 Unicode characters in UTF-8
* + Maximum value length – 256 Unicode characters in UTF-8
* + If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
* + Tag keys and values are case-sensitive.
* + Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eks.model.CreatePodIdentityAssociationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePodIdentityAssociationRequest(")
append("clientRequestToken=$clientRequestToken,")
append("clusterName=$clusterName,")
append("namespace=$namespace,")
append("roleArn=$roleArn,")
append("serviceAccount=$serviceAccount,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (clusterName?.hashCode() ?: 0)
result = 31 * result + (namespace?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (serviceAccount?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreatePodIdentityAssociationRequest
if (clientRequestToken != other.clientRequestToken) return false
if (clusterName != other.clusterName) return false
if (namespace != other.namespace) return false
if (roleArn != other.roleArn) return false
if (serviceAccount != other.serviceAccount) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eks.model.CreatePodIdentityAssociationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public var clientRequestToken: kotlin.String? = null
/**
* The name of the cluster to create the association in.
*/
public var clusterName: kotlin.String? = null
/**
* The name of the Kubernetes namespace inside the cluster to create the association in. The service account and the pods that use the service account must be in this namespace.
*/
public var namespace: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role to associate with the service account. The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the pods that use this service account.
*/
public var roleArn: kotlin.String? = null
/**
* The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
*/
public var serviceAccount: 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.
*
* The following basic restrictions apply to tags:
* + Maximum number of tags per resource – 50
* + For each resource, each tag key must be unique, and each tag key can have only one value.
* + Maximum key length – 128 Unicode characters in UTF-8
* + Maximum value length – 256 Unicode characters in UTF-8
* + If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
* + Tag keys and values are case-sensitive.
* + Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eks.model.CreatePodIdentityAssociationRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.clusterName = x.clusterName
this.namespace = x.namespace
this.roleArn = x.roleArn
this.serviceAccount = x.serviceAccount
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eks.model.CreatePodIdentityAssociationRequest = CreatePodIdentityAssociationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy