/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Batch { namespace Model { /** *

The properties for the pod.

See Also:

AWS * API Reference

*/ class EksPodProperties { public: AWS_BATCH_API EksPodProperties(); AWS_BATCH_API EksPodProperties(Aws::Utils::Json::JsonView jsonValue); AWS_BATCH_API EksPodProperties& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline const Aws::String& GetServiceAccountName() const{ return m_serviceAccountName; } /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline bool ServiceAccountNameHasBeenSet() const { return m_serviceAccountNameHasBeenSet; } /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline void SetServiceAccountName(const Aws::String& value) { m_serviceAccountNameHasBeenSet = true; m_serviceAccountName = value; } /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline void SetServiceAccountName(Aws::String&& value) { m_serviceAccountNameHasBeenSet = true; m_serviceAccountName = std::move(value); } /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline void SetServiceAccountName(const char* value) { m_serviceAccountNameHasBeenSet = true; m_serviceAccountName.assign(value); } /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline EksPodProperties& WithServiceAccountName(const Aws::String& value) { SetServiceAccountName(value); return *this;} /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline EksPodProperties& WithServiceAccountName(Aws::String&& value) { SetServiceAccountName(std::move(value)); return *this;} /** *

The name of the service account that's used to run the pod. For more * information, see Kubernetes * service accounts and Configure * a Kubernetes service account to assume an IAM role in the Amazon EKS User * Guide and Configure * service accounts for pods in the Kubernetes documentation.

*/ inline EksPodProperties& WithServiceAccountName(const char* value) { SetServiceAccountName(value); return *this;} /** *

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 and Pod * networking in the Kubernetes documentation.

*/ inline bool GetHostNetwork() const{ return m_hostNetwork; } /** *

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 and Pod * networking in the Kubernetes documentation.

*/ inline bool HostNetworkHasBeenSet() const { return m_hostNetworkHasBeenSet; } /** *

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 and Pod * networking in the Kubernetes documentation.

*/ inline void SetHostNetwork(bool value) { m_hostNetworkHasBeenSet = true; m_hostNetwork = value; } /** *

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 and Pod * networking in the Kubernetes documentation.

*/ inline EksPodProperties& WithHostNetwork(bool value) { SetHostNetwork(value); return *this;} /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline const Aws::String& GetDnsPolicy() const{ return m_dnsPolicy; } /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline bool DnsPolicyHasBeenSet() const { return m_dnsPolicyHasBeenSet; } /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline void SetDnsPolicy(const Aws::String& value) { m_dnsPolicyHasBeenSet = true; m_dnsPolicy = value; } /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline void SetDnsPolicy(Aws::String&& value) { m_dnsPolicyHasBeenSet = true; m_dnsPolicy = std::move(value); } /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline void SetDnsPolicy(const char* value) { m_dnsPolicyHasBeenSet = true; m_dnsPolicy.assign(value); } /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline EksPodProperties& WithDnsPolicy(const Aws::String& value) { SetDnsPolicy(value); return *this;} /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline EksPodProperties& WithDnsPolicy(Aws::String&& value) { SetDnsPolicy(std::move(value)); return *this;} /** *

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. For more * information, see Pod's * DNS policy in the Kubernetes documentation.

Valid values: * Default | ClusterFirst | * ClusterFirstWithHostNet

*/ inline EksPodProperties& WithDnsPolicy(const char* value) { SetDnsPolicy(value); return *this;} /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline const Aws::Vector& GetContainers() const{ return m_containers; } /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; } /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline void SetContainers(const Aws::Vector& value) { m_containersHasBeenSet = true; m_containers = value; } /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline void SetContainers(Aws::Vector&& value) { m_containersHasBeenSet = true; m_containers = std::move(value); } /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline EksPodProperties& WithContainers(const Aws::Vector& value) { SetContainers(value); return *this;} /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline EksPodProperties& WithContainers(Aws::Vector&& value) { SetContainers(std::move(value)); return *this;} /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline EksPodProperties& AddContainers(const EksContainer& value) { m_containersHasBeenSet = true; m_containers.push_back(value); return *this; } /** *

The properties of the container that's used on the Amazon EKS pod.

*/ inline EksPodProperties& AddContainers(EksContainer&& value) { m_containersHasBeenSet = true; m_containers.push_back(std::move(value)); return *this; } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline const Aws::Vector& GetVolumes() const{ return m_volumes; } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline void SetVolumes(const Aws::Vector& value) { m_volumesHasBeenSet = true; m_volumes = value; } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline void SetVolumes(Aws::Vector&& value) { m_volumesHasBeenSet = true; m_volumes = std::move(value); } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline EksPodProperties& WithVolumes(const Aws::Vector& value) { SetVolumes(value); return *this;} /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline EksPodProperties& WithVolumes(Aws::Vector&& value) { SetVolumes(std::move(value)); return *this;} /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline EksPodProperties& AddVolumes(const EksVolume& value) { m_volumesHasBeenSet = true; m_volumes.push_back(value); return *this; } /** *

Specifies the volumes for a job definition that uses Amazon EKS * resources.

*/ inline EksPodProperties& AddVolumes(EksVolume&& value) { m_volumesHasBeenSet = true; m_volumes.push_back(std::move(value)); return *this; } /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline const EksMetadata& GetMetadata() const{ return m_metadata; } /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; } /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline void SetMetadata(const EksMetadata& value) { m_metadataHasBeenSet = true; m_metadata = value; } /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline void SetMetadata(EksMetadata&& value) { m_metadataHasBeenSet = true; m_metadata = std::move(value); } /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline EksPodProperties& WithMetadata(const EksMetadata& value) { SetMetadata(value); return *this;} /** *

Metadata about the Kubernetes pod. For more information, see Understanding * Kubernetes Objects in the Kubernetes documentation.

*/ inline EksPodProperties& WithMetadata(EksMetadata&& value) { SetMetadata(std::move(value)); return *this;} private: Aws::String m_serviceAccountName; bool m_serviceAccountNameHasBeenSet = false; bool m_hostNetwork; bool m_hostNetworkHasBeenSet = false; Aws::String m_dnsPolicy; bool m_dnsPolicyHasBeenSet = false; Aws::Vector m_containers; bool m_containersHasBeenSet = false; Aws::Vector m_volumes; bool m_volumesHasBeenSet = false; EksMetadata m_metadata; bool m_metadataHasBeenSet = false; }; } // namespace Model } // namespace Batch } // namespace Aws