
commonMain.aws.sdk.kotlin.services.batch.model.EksPodPropertiesDetail.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* The details for the pod.
*/
public class EksPodPropertiesDetail private constructor(builder: Builder) {
/**
* The properties of the container that's used on the Amazon EKS pod.
*/
public val containers: List? = builder.containers
/**
* The DNS policy for the pod. The default value is `ClusterFirst`. If the `hostNetwork` parameter is not specified, the default is `ClusterFirstWithHostNet`. `ClusterFirst` indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. If no value was specified for `dnsPolicy` in the [RegisterJobDefinition](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html) API operation, then no value will be returned for `dnsPolicy` by either of [DescribeJobDefinitions](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobDefinitions.html) or [DescribeJobs](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobs.html) API operations. The pod spec setting will contain either `ClusterFirst` or `ClusterFirstWithHostNet`, depending on the value of the `hostNetwork` parameter. For more information, see [Pod's DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) in the *Kubernetes documentation*.
*
* Valid values: `Default` | `ClusterFirst` | `ClusterFirstWithHostNet`
*/
public val dnsPolicy: kotlin.String? = builder.dnsPolicy
/**
* Indicates if the pod uses the hosts' network IP address. The default value is `true`. Setting this to `false` enables the Kubernetes pod networking model. Most Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see [Host namespaces](https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces) and [Pod networking](https://kubernetes.io/docs/concepts/workloads/pods/#pod-networking) in the *Kubernetes documentation*.
*/
public val hostNetwork: kotlin.Boolean? = builder.hostNetwork
/**
* Describes and uniquely identifies Kubernetes resources. For example, the compute environment that a pod runs in or the `jobID` for a job running in the pod. For more information, see [Understanding Kubernetes Objects](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/) in the *Kubernetes documentation*.
*/
public val metadata: aws.sdk.kotlin.services.batch.model.EksMetadata? = builder.metadata
/**
* The name of the node for this job.
*/
public val nodeName: kotlin.String? = builder.nodeName
/**
* The name of the pod for this job.
*/
public val podName: kotlin.String? = builder.podName
/**
* The name of the service account that's used to run the pod. For more information, see [Kubernetes service accounts](https://docs.aws.amazon.com/eks/latest/userguide/service-accounts.html) and [Configure a Kubernetes service account to assume an IAM role](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html) in the *Amazon EKS User Guide* and [Configure service accounts for pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) in the *Kubernetes documentation*.
*/
public val serviceAccountName: kotlin.String? = builder.serviceAccountName
/**
* Specifies the volumes for a job definition using Amazon EKS resources.
*/
public val volumes: List? = builder.volumes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.EksPodPropertiesDetail = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EksPodPropertiesDetail(")
append("containers=$containers,")
append("dnsPolicy=$dnsPolicy,")
append("hostNetwork=$hostNetwork,")
append("metadata=$metadata,")
append("nodeName=$nodeName,")
append("podName=$podName,")
append("serviceAccountName=$serviceAccountName,")
append("volumes=$volumes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = containers?.hashCode() ?: 0
result = 31 * result + (dnsPolicy?.hashCode() ?: 0)
result = 31 * result + (hostNetwork?.hashCode() ?: 0)
result = 31 * result + (metadata?.hashCode() ?: 0)
result = 31 * result + (nodeName?.hashCode() ?: 0)
result = 31 * result + (podName?.hashCode() ?: 0)
result = 31 * result + (serviceAccountName?.hashCode() ?: 0)
result = 31 * result + (volumes?.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 EksPodPropertiesDetail
if (containers != other.containers) return false
if (dnsPolicy != other.dnsPolicy) return false
if (hostNetwork != other.hostNetwork) return false
if (metadata != other.metadata) return false
if (nodeName != other.nodeName) return false
if (podName != other.podName) return false
if (serviceAccountName != other.serviceAccountName) return false
if (volumes != other.volumes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.EksPodPropertiesDetail = Builder(this).apply(block).build()
public class Builder {
/**
* The properties of the container that's used on the Amazon EKS pod.
*/
public var containers: List? = null
/**
* The DNS policy for the pod. The default value is `ClusterFirst`. If the `hostNetwork` parameter is not specified, the default is `ClusterFirstWithHostNet`. `ClusterFirst` indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. If no value was specified for `dnsPolicy` in the [RegisterJobDefinition](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html) API operation, then no value will be returned for `dnsPolicy` by either of [DescribeJobDefinitions](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobDefinitions.html) or [DescribeJobs](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobs.html) API operations. The pod spec setting will contain either `ClusterFirst` or `ClusterFirstWithHostNet`, depending on the value of the `hostNetwork` parameter. For more information, see [Pod's DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) in the *Kubernetes documentation*.
*
* Valid values: `Default` | `ClusterFirst` | `ClusterFirstWithHostNet`
*/
public var dnsPolicy: kotlin.String? = null
/**
* Indicates if the pod uses the hosts' network IP address. The default value is `true`. Setting this to `false` enables the Kubernetes pod networking model. Most Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see [Host namespaces](https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces) and [Pod networking](https://kubernetes.io/docs/concepts/workloads/pods/#pod-networking) in the *Kubernetes documentation*.
*/
public var hostNetwork: kotlin.Boolean? = null
/**
* Describes and uniquely identifies Kubernetes resources. For example, the compute environment that a pod runs in or the `jobID` for a job running in the pod. For more information, see [Understanding Kubernetes Objects](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/) in the *Kubernetes documentation*.
*/
public var metadata: aws.sdk.kotlin.services.batch.model.EksMetadata? = null
/**
* The name of the node for this job.
*/
public var nodeName: kotlin.String? = null
/**
* The name of the pod for this job.
*/
public var podName: kotlin.String? = null
/**
* The name of the service account that's used to run the pod. For more information, see [Kubernetes service accounts](https://docs.aws.amazon.com/eks/latest/userguide/service-accounts.html) and [Configure a Kubernetes service account to assume an IAM role](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html) in the *Amazon EKS User Guide* and [Configure service accounts for pods](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) in the *Kubernetes documentation*.
*/
public var serviceAccountName: kotlin.String? = null
/**
* Specifies the volumes for a job definition using Amazon EKS resources.
*/
public var volumes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.EksPodPropertiesDetail) : this() {
this.containers = x.containers
this.dnsPolicy = x.dnsPolicy
this.hostNetwork = x.hostNetwork
this.metadata = x.metadata
this.nodeName = x.nodeName
this.podName = x.podName
this.serviceAccountName = x.serviceAccountName
this.volumes = x.volumes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.EksPodPropertiesDetail = EksPodPropertiesDetail(this)
/**
* construct an [aws.sdk.kotlin.services.batch.model.EksMetadata] inside the given [block]
*/
public fun metadata(block: aws.sdk.kotlin.services.batch.model.EksMetadata.Builder.() -> kotlin.Unit) {
this.metadata = aws.sdk.kotlin.services.batch.model.EksMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy