Struct aws_sdk_batch::types::builders::EksContainerDetailBuilder
source · #[non_exhaustive]pub struct EksContainerDetailBuilder { /* private fields */ }
Expand description
A builder for EksContainerDetail
.
Implementations§
source§impl EksContainerDetailBuilder
impl EksContainerDetailBuilder
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 get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
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 Always
if the :latest
tag is specified, IfNotPresent
otherwise. 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 Always
if the :latest
tag is specified, IfNotPresent
otherwise. For more information, see Updating images in the Kubernetes documentation.
sourcepub fn get_image_pull_policy(&self) -> &Option<String>
pub fn get_image_pull_policy(&self) -> &Option<String>
The image pull policy for the container. Supported values are Always
, IfNotPresent
, and Never
. This parameter defaults to Always
if the :latest
tag is specified, IfNotPresent
otherwise. 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. For more information, see 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. For more information, see Entrypoint in the Kubernetes documentation.
sourcepub fn get_command(&self) -> &Option<Vec<String>>
pub fn get_command(&self) -> &Option<Vec<String>>
The entrypoint for the container. For more information, see 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 get_args(&self) -> &Option<Vec<String>>
pub fn get_args(&self) -> &Option<Vec<String>>
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 get_env(&self) -> &Option<Vec<EksContainerEnvironmentVariable>>
pub fn get_env(&self) -> &Option<Vec<EksContainerEnvironmentVariable>>
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 get_resources(&self) -> &Option<EksContainerResourceRequirements>
pub fn get_resources(&self) -> &Option<EksContainerResourceRequirements>
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 exit_code(self, input: i32) -> Self
pub fn exit_code(self, input: i32) -> Self
The exit code for the job attempt. A non-zero exit code is considered failed.
sourcepub fn set_exit_code(self, input: Option<i32>) -> Self
pub fn set_exit_code(self, input: Option<i32>) -> Self
The exit code for the job attempt. A non-zero exit code is considered failed.
sourcepub fn get_exit_code(&self) -> &Option<i32>
pub fn get_exit_code(&self) -> &Option<i32>
The exit code for the job attempt. A non-zero exit code is considered failed.
sourcepub fn reason(self, input: impl Into<String>) -> Self
pub fn reason(self, input: impl Into<String>) -> Self
A short human-readable string to provide additional details for a running or stopped container. It can be up to 255 characters long.
sourcepub fn set_reason(self, input: Option<String>) -> Self
pub fn set_reason(self, input: Option<String>) -> Self
A short human-readable string to provide additional details for a running or stopped container. It can be up to 255 characters long.
sourcepub fn get_reason(&self) -> &Option<String>
pub fn get_reason(&self) -> &Option<String>
A short human-readable string to provide additional details for a running or stopped container. It can be up to 255 characters long.
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 get_volume_mounts(&self) -> &Option<Vec<EksContainerVolumeMount>>
pub fn get_volume_mounts(&self) -> &Option<Vec<EksContainerVolumeMount>>
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 get_security_context(&self) -> &Option<EksContainerSecurityContext>
pub fn get_security_context(&self) -> &Option<EksContainerSecurityContext>
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) -> EksContainerDetail
pub fn build(self) -> EksContainerDetail
Consumes the builder and constructs a EksContainerDetail
.
Trait Implementations§
source§impl Clone for EksContainerDetailBuilder
impl Clone for EksContainerDetailBuilder
source§fn clone(&self) -> EksContainerDetailBuilder
fn clone(&self) -> EksContainerDetailBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EksContainerDetailBuilder
impl Debug for EksContainerDetailBuilder
source§impl Default for EksContainerDetailBuilder
impl Default for EksContainerDetailBuilder
source§fn default() -> EksContainerDetailBuilder
fn default() -> EksContainerDetailBuilder
source§impl PartialEq<EksContainerDetailBuilder> for EksContainerDetailBuilder
impl PartialEq<EksContainerDetailBuilder> for EksContainerDetailBuilder
source§fn eq(&self, other: &EksContainerDetailBuilder) -> bool
fn eq(&self, other: &EksContainerDetailBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.