Class CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty>
- Enclosing interface:
CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getCommand()dependsOn(IResolvable dependsOn) environment(List<? extends Object> environment) environment(IResolvable environment) essential(IResolvable essential) firelensConfiguration(CfnJobDefinitionPropsMixin.FirelensConfigurationProperty firelensConfiguration) firelensConfiguration(IResolvable firelensConfiguration) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getImage()linuxParameters(CfnJobDefinitionPropsMixin.LinuxParametersProperty linuxParameters) linuxParameters(IResolvable linuxParameters) logConfiguration(CfnJobDefinitionPropsMixin.LogConfigurationProperty logConfiguration) logConfiguration(IResolvable logConfiguration) mountPoints(List<? extends Object> mountPoints) mountPoints(IResolvable mountPoints) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getName()privileged(Boolean privileged) privileged(IResolvable privileged) readonlyRootFilesystem(Boolean readonlyRootFilesystem) readonlyRootFilesystem(IResolvable readonlyRootFilesystem) repositoryCredentials(CfnJobDefinitionPropsMixin.RepositoryCredentialsProperty repositoryCredentials) repositoryCredentials(IResolvable repositoryCredentials) resourceRequirements(List<? extends Object> resourceRequirements) resourceRequirements(IResolvable resourceRequirements) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getSecrets()secrets(IResolvable secrets) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getSecrets()Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUlimits()ulimits(IResolvable ulimits) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUlimits()Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUser()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder command(List<String> command) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getCommand()- Parameters:
command- The command that's passed to the container. This parameter maps toCmdin the Create a container section of the Docker Remote API and theCOMMANDparameter to docker run . For more information, see Dockerfile reference: CMD .- Returns:
this
-
dependsOn
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder dependsOn(IResolvable dependsOn) - Parameters:
dependsOn- A list of containers that this container depends on.- Returns:
this
-
dependsOn
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder dependsOn(List<? extends Object> dependsOn) - Parameters:
dependsOn- A list of containers that this container depends on.- Returns:
this
-
environment
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder environment(IResolvable environment) - Parameters:
environment- The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the--envparameter to docker run .We don't recommend using plaintext environment variables for sensitive information, such as credential data. > Environment variables cannot start with
AWS_BATCH. This naming convention is reserved for variables that AWS Batch sets.- Returns:
this
-
environment
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder environment(List<? extends Object> environment) - Parameters:
environment- The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the--envparameter to docker run .We don't recommend using plaintext environment variables for sensitive information, such as credential data. > Environment variables cannot start with
AWS_BATCH. This naming convention is reserved for variables that AWS Batch sets.- Returns:
this
-
essential
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder essential(Boolean essential) - Parameters:
essential- If the essential parameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessentialparameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide .
- Returns:
this
-
essential
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder essential(IResolvable essential) - Parameters:
essential- If the essential parameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If theessentialparameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide .
- Returns:
this
-
firelensConfiguration
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder firelensConfiguration(IResolvable firelensConfiguration) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getFirelensConfiguration()- Parameters:
firelensConfiguration- The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
firelensConfiguration
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder firelensConfiguration(CfnJobDefinitionPropsMixin.FirelensConfigurationProperty firelensConfiguration) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getFirelensConfiguration()- Parameters:
firelensConfiguration- The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
image
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder image(String image) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getImage()- Parameters:
image- The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with eitherrepository-url/image:tagorrepository-url/image@digest. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps toImagein the Create a container section of the Docker Remote API and theIMAGEparameter of the docker run .- Returns:
this
-
linuxParameters
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder linuxParameters(IResolvable linuxParameters) - Parameters:
linuxParameters- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities .- Returns:
this
-
linuxParameters
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder linuxParameters(CfnJobDefinitionPropsMixin.LinuxParametersProperty linuxParameters) - Parameters:
linuxParameters- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities .- Returns:
this
-
logConfiguration
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder logConfiguration(IResolvable logConfiguration) - Parameters:
logConfiguration- The log configuration specification for the container. This parameter maps toLogConfigin the Create a container section of the Docker Remote API and the--log-driveroption to docker run .By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation .
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfigurationdata type). Additional log drivers may be available in future releases of the Amazon ECS container agent.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the
ECS_AVAILABLE_LOGGING_DRIVERSenvironment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
logConfiguration
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder logConfiguration(CfnJobDefinitionPropsMixin.LogConfigurationProperty logConfiguration) - Parameters:
logConfiguration- The log configuration specification for the container. This parameter maps toLogConfigin the Create a container section of the Docker Remote API and the--log-driveroption to docker run .By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation .
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfigurationdata type). Additional log drivers may be available in future releases of the Amazon ECS container agent.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the
ECS_AVAILABLE_LOGGING_DRIVERSenvironment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
mountPoints
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder mountPoints(IResolvable mountPoints) - Parameters:
mountPoints- The mount points for data volumes in your container. This parameter maps toVolumesin the Create a container section of the Docker Remote API and the --volume option to docker run .Windows containers can mount whole directories on the same drive as
$env:ProgramData. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Returns:
this
-
mountPoints
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder mountPoints(List<? extends Object> mountPoints) - Parameters:
mountPoints- The mount points for data volumes in your container. This parameter maps toVolumesin the Create a container section of the Docker Remote API and the --volume option to docker run .Windows containers can mount whole directories on the same drive as
$env:ProgramData. Windows containers can't mount directories on a different drive, and mount point can't be across drives.- Returns:
this
-
name
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder name(String name) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getName()- Parameters:
name- The name of a container. The name can be used as a unique identifier to target yourdependsOnandOverridesobjects.- Returns:
this
-
privileged
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder privileged(Boolean privileged) - Parameters:
privileged- When this parameter istrue, the container is given elevated privileges on the host container instance (similar to therootuser). This parameter maps toPrivilegedin the Create a container section of the Docker Remote API and the--privilegedoption to docker run .This parameter is not supported for Windows containers or tasks run on Fargate.
- Returns:
this
-
privileged
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder privileged(IResolvable privileged) - Parameters:
privileged- When this parameter istrue, the container is given elevated privileges on the host container instance (similar to therootuser). This parameter maps toPrivilegedin the Create a container section of the Docker Remote API and the--privilegedoption to docker run .This parameter is not supported for Windows containers or tasks run on Fargate.
- Returns:
this
-
readonlyRootFilesystem
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getReadonlyRootFilesystem()- Parameters:
readonlyRootFilesystem- When this parameter is true, the container is given read-only access to its root file system. This parameter maps toReadonlyRootfsin the Create a container section of the Docker Remote API and the--read-onlyoption to docker run .This parameter is not supported for Windows containers.
- Returns:
this
-
readonlyRootFilesystem
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder readonlyRootFilesystem(IResolvable readonlyRootFilesystem) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getReadonlyRootFilesystem()- Parameters:
readonlyRootFilesystem- When this parameter is true, the container is given read-only access to its root file system. This parameter maps toReadonlyRootfsin the Create a container section of the Docker Remote API and the--read-onlyoption to docker run .This parameter is not supported for Windows containers.
- Returns:
this
-
repositoryCredentials
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder repositoryCredentials(IResolvable repositoryCredentials) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getRepositoryCredentials()- Parameters:
repositoryCredentials- The private repository authentication credentials to use.- Returns:
this
-
repositoryCredentials
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder repositoryCredentials(CfnJobDefinitionPropsMixin.RepositoryCredentialsProperty repositoryCredentials) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getRepositoryCredentials()- Parameters:
repositoryCredentials- The private repository authentication credentials to use.- Returns:
this
-
resourceRequirements
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder resourceRequirements(IResolvable resourceRequirements) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getResourceRequirements()- Parameters:
resourceRequirements- The type and amount of a resource to assign to a container. The only supported resource is a GPU.- Returns:
this
-
resourceRequirements
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder resourceRequirements(List<? extends Object> resourceRequirements) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getResourceRequirements()- Parameters:
resourceRequirements- The type and amount of a resource to assign to a container. The only supported resource is a GPU.- Returns:
this
-
secrets
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder secrets(IResolvable secrets) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getSecrets()- Parameters:
secrets- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.- Returns:
this
-
secrets
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder secrets(List<? extends Object> secrets) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getSecrets()- Parameters:
secrets- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.- Returns:
this
-
ulimits
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder ulimits(IResolvable ulimits) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUlimits()- Parameters:
ulimits- A list ofulimitsto set in the container. If aulimitvalue is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimitsin the Create a container section of the Docker Remote API and the--ulimitoption to docker run .Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofileresource limit sets a restriction on the number of open files that a container can use. The defaultnofilesoft limit is1024and the default hard limit is65535.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'This parameter is not supported for Windows containers.
- Returns:
this
-
ulimits
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder ulimits(List<? extends Object> ulimits) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUlimits()- Parameters:
ulimits- A list ofulimitsto set in the container. If aulimitvalue is specified in a task definition, it overrides the default values set by Docker. This parameter maps toUlimitsin the Create a container section of the Docker Remote API and the--ulimitoption to docker run .Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The
nofileresource limit sets a restriction on the number of open files that a container can use. The defaultnofilesoft limit is1024and the default hard limit is65535.This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version
--format '{{.Server.APIVersion}}'This parameter is not supported for Windows containers.
- Returns:
this
-
user
@Stability(Stable) public CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.Builder user(String user) Sets the value ofCfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty.getUser()- Parameters:
user- The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.When running tasks using the
hostnetwork mode, don't run containers using theroot user (UID 0). We recommend using a non-root user for better security.You can specify the
userusing the following formats. If specifying a UID or GID, you must specify it as a positive integer.useruser:groupuiduid:giduser:giuid:group
This parameter is not supported for Windows containers.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty>- Returns:
- a new instance of
CfnJobDefinitionPropsMixin.TaskContainerPropertiesProperty - Throws:
NullPointerException- if any required attribute was not provided
-