Struct aws_sdk_batch::types::EksContainer
source · #[non_exhaustive]pub struct EksContainer {
pub name: Option<String>,
pub image: Option<String>,
pub image_pull_policy: Option<String>,
pub command: Option<Vec<String>>,
pub args: Option<Vec<String>>,
pub env: Option<Vec<EksContainerEnvironmentVariable>>,
pub resources: Option<EksContainerResourceRequirements>,
pub volume_mounts: Option<Vec<EksContainerVolumeMount>>,
pub security_context: Option<EksContainerSecurityContext>,
}
Expand description
EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties for a container node in the pod that's launched as part of a job. This can't be specified for Amazon ECS based job definitions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: 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.
image: Option<String>
The Docker image used to start the container.
image_pull_policy: Option<String>
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.
command: Option<Vec<String>>
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.
args: 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.
env: 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.
resources: 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.
volume_mounts: 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.
security_context: 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.
Implementations§
source§impl EksContainer
impl EksContainer
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
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_pull_policy(&self) -> Option<&str>
pub fn image_pull_policy(&self) -> Option<&str>
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) -> Option<&[String]>
pub fn command(&self) -> Option<&[String]>
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) -> Option<&[String]>
pub fn args(&self) -> Option<&[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) -> Option<&[EksContainerEnvironmentVariable]>
pub fn env(&self) -> Option<&[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) -> Option<&EksContainerResourceRequirements>
pub fn 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 volume_mounts(&self) -> Option<&[EksContainerVolumeMount]>
pub fn volume_mounts(&self) -> Option<&[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) -> Option<&EksContainerSecurityContext>
pub fn 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.
source§impl EksContainer
impl EksContainer
sourcepub fn builder() -> EksContainerBuilder
pub fn builder() -> EksContainerBuilder
Creates a new builder-style object to manufacture EksContainer
.
Trait Implementations§
source§impl Clone for EksContainer
impl Clone for EksContainer
source§fn clone(&self) -> EksContainer
fn clone(&self) -> EksContainer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EksContainer
impl Debug for EksContainer
source§impl PartialEq<EksContainer> for EksContainer
impl PartialEq<EksContainer> for EksContainer
source§fn eq(&self, other: &EksContainer) -> bool
fn eq(&self, other: &EksContainer) -> bool
self
and other
values to be equal, and is used
by ==
.