Struct aws_sdk_batch::model::eks_container::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for EksContainer
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the container. If the name isn't specified, the default name "Default
" is used. Each container in a pod must have a unique name.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the container. If the name isn't specified, the default name "Default
" is used. Each container in a pod must have a unique name.
sourcepub fn image(self, input: impl Into<String>) -> Self
pub fn image(self, input: impl Into<String>) -> Self
The Docker image used to start the container.
sourcepub fn set_image(self, input: Option<String>) -> Self
pub fn set_image(self, input: Option<String>) -> Self
The Docker image used to start the container.
sourcepub fn image_pull_policy(self, input: impl Into<String>) -> Self
pub fn image_pull_policy(self, input: impl Into<String>) -> Self
The image pull policy for the container. Supported values are Always
, IfNotPresent
, and Never
. This parameter defaults to IfNotPresent
. However, if the :latest
tag is specified, it defaults to Always
. For more information, see Updating images in the Kubernetes documentation.
sourcepub fn set_image_pull_policy(self, input: Option<String>) -> Self
pub fn set_image_pull_policy(self, input: Option<String>) -> Self
The image pull policy for the container. Supported values are Always
, IfNotPresent
, and Never
. This parameter defaults to IfNotPresent
. However, if the :latest
tag is specified, it defaults to Always
. For more information, see Updating images in the Kubernetes documentation.
sourcepub fn command(self, input: impl Into<String>) -> Self
pub fn command(self, input: impl Into<String>) -> Self
Appends an item to command
.
To override the contents of this collection use set_command
.
The entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT
of the container image is used. Environment variable references are expanded using the container's environment.
If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)
" and the NAME1
environment variable doesn't exist, the command string will remain "$(NAME1)
." $$
is replaced with $
and the resulting string isn't expanded. For example, $$(VAR_NAME)
will be passed as $(VAR_NAME)
whether or not the VAR_NAME
environment variable exists. The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile reference and Define a command and arguments for a container and Entrypoint in the Kubernetes documentation.
sourcepub fn set_command(self, input: Option<Vec<String>>) -> Self
pub fn set_command(self, input: Option<Vec<String>>) -> Self
The entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT
of the container image is used. Environment variable references are expanded using the container's environment.
If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)
" and the NAME1
environment variable doesn't exist, the command string will remain "$(NAME1)
." $$
is replaced with $
and the resulting string isn't expanded. For example, $$(VAR_NAME)
will be passed as $(VAR_NAME)
whether or not the VAR_NAME
environment variable exists. The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile reference and Define a command and arguments for a container and Entrypoint in the Kubernetes documentation.
sourcepub fn args(self, input: impl Into<String>) -> Self
pub fn args(self, input: impl Into<String>) -> Self
Appends an item to args
.
To override the contents of this collection use set_args
.
An array of arguments to the entrypoint. If this isn't specified, the CMD
of the container image is used. This corresponds to the args
member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)
" and the NAME1
environment variable doesn't exist, the command string will remain "$(NAME1)
." $$
is replaced with $
, and the resulting string isn't expanded. For example, $$(VAR_NAME)
is passed as $(VAR_NAME)
whether or not the VAR_NAME
environment variable exists. For more information, see CMD in the Dockerfile reference and Define a command and arguments for a pod in the Kubernetes documentation.
sourcepub fn set_args(self, input: Option<Vec<String>>) -> Self
pub fn set_args(self, input: Option<Vec<String>>) -> Self
An array of arguments to the entrypoint. If this isn't specified, the CMD
of the container image is used. This corresponds to the args
member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)
" and the NAME1
environment variable doesn't exist, the command string will remain "$(NAME1)
." $$
is replaced with $
, and the resulting string isn't expanded. For example, $$(VAR_NAME)
is passed as $(VAR_NAME)
whether or not the VAR_NAME
environment variable exists. For more information, see CMD in the Dockerfile reference and Define a command and arguments for a pod in the Kubernetes documentation.
sourcepub fn env(self, input: EksContainerEnvironmentVariable) -> Self
pub fn env(self, input: EksContainerEnvironmentVariable) -> Self
Appends an item to env
.
To override the contents of this collection use set_env
.
The environment variables to pass to a container.
Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for variables that Batch sets.
sourcepub fn set_env(self, input: Option<Vec<EksContainerEnvironmentVariable>>) -> Self
pub fn set_env(self, input: Option<Vec<EksContainerEnvironmentVariable>>) -> Self
The environment variables to pass to a container.
Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for variables that Batch sets.
sourcepub fn resources(self, input: EksContainerResourceRequirements) -> Self
pub fn resources(self, input: EksContainerResourceRequirements) -> Self
The type and amount of resources to assign to a container. The supported resources include memory
, cpu
, and nvidia.com/gpu
. For more information, see Resource management for pods and containers in the Kubernetes documentation.
sourcepub fn set_resources(
self,
input: Option<EksContainerResourceRequirements>
) -> Self
pub fn set_resources(
self,
input: Option<EksContainerResourceRequirements>
) -> Self
The type and amount of resources to assign to a container. The supported resources include memory
, cpu
, and nvidia.com/gpu
. For more information, see Resource management for pods and containers in the Kubernetes documentation.
sourcepub fn volume_mounts(self, input: EksContainerVolumeMount) -> Self
pub fn volume_mounts(self, input: EksContainerVolumeMount) -> Self
Appends an item to volume_mounts
.
To override the contents of this collection use set_volume_mounts
.
The volume mounts for the container. Batch supports emptyDir
, hostPath
, and secret
volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation.
sourcepub fn set_volume_mounts(
self,
input: Option<Vec<EksContainerVolumeMount>>
) -> Self
pub fn set_volume_mounts(
self,
input: Option<Vec<EksContainerVolumeMount>>
) -> Self
The volume mounts for the container. Batch supports emptyDir
, hostPath
, and secret
volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation.
sourcepub fn security_context(self, input: EksContainerSecurityContext) -> Self
pub fn security_context(self, input: EksContainerSecurityContext) -> Self
The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation.
sourcepub fn set_security_context(
self,
input: Option<EksContainerSecurityContext>
) -> Self
pub fn set_security_context(
self,
input: Option<EksContainerSecurityContext>
) -> Self
The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation.
sourcepub fn build(self) -> EksContainer
pub fn build(self) -> EksContainer
Consumes the builder and constructs a EksContainer
.