Class CfnJobDefinitionPropsMixin.EksContainerProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobDefinitionPropsMixin.EksContainerProperty>
- Enclosing interface:
CfnJobDefinitionPropsMixin.EksContainerProperty
CfnJobDefinitionPropsMixin.EksContainerProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getArgs()build()Builds the configured instance.Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getCommand()Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getEnv()env(IResolvable env) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getEnv()Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getImage()imagePullPolicy(String imagePullPolicy) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getImagePullPolicy()Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getName()Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getResources()resources(IResolvable resources) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getResources()securityContext(CfnJobDefinitionPropsMixin.SecurityContextProperty securityContext) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getSecurityContext()securityContext(IResolvable securityContext) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getSecurityContext()volumeMounts(List<? extends Object> volumeMounts) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getVolumeMounts()volumeMounts(IResolvable volumeMounts) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getVolumeMounts()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
args
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder args(List<String> args) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getArgs()- Parameters:
args- An array of arguments to the entrypoint. If this isn't specified, theCMDof the container image is used. This corresponds to theargsmember 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 theNAME1environment 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 theVAR_NAMEenvironment variable exists. For more information, see Dockerfile reference: CMD and Define a command and arguments for a pod in the Kubernetes documentation .- Returns:
this
-
command
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder command(List<String> command) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getCommand()- Parameters:
command- The entrypoint for the container. This isn't run within a shell. If this isn't specified, theENTRYPOINTof 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 theNAME1environment 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 theVAR_NAMEenvironment 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 .- Returns:
this
-
env
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder env(IResolvable env) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getEnv()- Parameters:
env- The environment variables to pass to a container.Environment variables cannot start with "
AWS_BATCH". This naming convention is reserved for variables that AWS Batch sets.- Returns:
this
-
env
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder env(List<? extends Object> env) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getEnv()- Parameters:
env- The environment variables to pass to a container.Environment variables cannot start with "
AWS_BATCH". This naming convention is reserved for variables that AWS Batch sets.- Returns:
this
-
image
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder image(String image) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getImage()- Parameters:
image- The Docker image used to start the container.- Returns:
this
-
imagePullPolicy
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder imagePullPolicy(String imagePullPolicy) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getImagePullPolicy()- Parameters:
imagePullPolicy- The image pull policy for the container. Supported values areAlways,IfNotPresent, andNever. This parameter defaults toIfNotPresent. However, if the:latesttag is specified, it defaults toAlways. For more information, see Updating images in the Kubernetes documentation .- Returns:
this
-
name
Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getName()- Parameters:
name- 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.- Returns:
this
-
resources
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder resources(IResolvable resources) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getResources()- Parameters:
resources- The type and amount of resources to assign to a container. The supported resources includememory,cpu, andnvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation .- Returns:
this
-
resources
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder resources(CfnJobDefinitionPropsMixin.ResourcesProperty resources) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getResources()- Parameters:
resources- The type and amount of resources to assign to a container. The supported resources includememory,cpu, andnvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation .- Returns:
this
-
securityContext
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder securityContext(IResolvable securityContext) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getSecurityContext()- Parameters:
securityContext- The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation .- Returns:
this
-
securityContext
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder securityContext(CfnJobDefinitionPropsMixin.SecurityContextProperty securityContext) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getSecurityContext()- Parameters:
securityContext- The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation .- Returns:
this
-
volumeMounts
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder volumeMounts(IResolvable volumeMounts) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getVolumeMounts()- Parameters:
volumeMounts- The volume mounts for the container. AWS Batch supportsemptyDir,hostPath, andsecretvolume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation .- Returns:
this
-
volumeMounts
@Stability(Stable) public CfnJobDefinitionPropsMixin.EksContainerProperty.Builder volumeMounts(List<? extends Object> volumeMounts) Sets the value ofCfnJobDefinitionPropsMixin.EksContainerProperty.getVolumeMounts()- Parameters:
volumeMounts- The volume mounts for the container. AWS Batch supportsemptyDir,hostPath, andsecretvolume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnJobDefinitionPropsMixin.EksContainerProperty>- Returns:
- a new instance of
CfnJobDefinitionPropsMixin.EksContainerProperty - Throws:
NullPointerException- if any required attribute was not provided
-