Interface CfnJobDefinition.EcsTaskPropertiesProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnJobDefinition.EcsTaskPropertiesProperty.Jsii$Proxy
- Enclosing class:
CfnJobDefinition
You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;
Object options;
EcsTaskPropertiesProperty ecsTaskPropertiesProperty = EcsTaskPropertiesProperty.builder()
.containers(List.of(TaskContainerPropertiesProperty.builder()
.image("image")
// the properties below are optional
.command(List.of("command"))
.dependsOn(List.of(TaskContainerDependencyProperty.builder()
.condition("condition")
.containerName("containerName")
.build()))
.environment(List.of(EnvironmentProperty.builder()
.name("name")
.value("value")
.build()))
.essential(false)
.firelensConfiguration(FirelensConfigurationProperty.builder()
.type("type")
// the properties below are optional
.options(Map.of(
"optionsKey", "options"))
.build())
.linuxParameters(LinuxParametersProperty.builder()
.devices(List.of(DeviceProperty.builder()
.containerPath("containerPath")
.hostPath("hostPath")
.permissions(List.of("permissions"))
.build()))
.initProcessEnabled(false)
.maxSwap(123)
.sharedMemorySize(123)
.swappiness(123)
.tmpfs(List.of(TmpfsProperty.builder()
.containerPath("containerPath")
.size(123)
// the properties below are optional
.mountOptions(List.of("mountOptions"))
.build()))
.build())
.logConfiguration(LogConfigurationProperty.builder()
.logDriver("logDriver")
// the properties below are optional
.options(options)
.secretOptions(List.of(SecretProperty.builder()
.name("name")
.valueFrom("valueFrom")
.build()))
.build())
.mountPoints(List.of(MountPointProperty.builder()
.containerPath("containerPath")
.readOnly(false)
.sourceVolume("sourceVolume")
.build()))
.name("name")
.privileged(false)
.readonlyRootFilesystem(false)
.repositoryCredentials(RepositoryCredentialsProperty.builder()
.credentialsParameter("credentialsParameter")
.build())
.resourceRequirements(List.of(ResourceRequirementProperty.builder()
.type("type")
.value("value")
.build()))
.secrets(List.of(SecretProperty.builder()
.name("name")
.valueFrom("valueFrom")
.build()))
.ulimits(List.of(UlimitProperty.builder()
.hardLimit(123)
.name("name")
.softLimit(123)
.build()))
.user("user")
.build()))
.enableExecuteCommand(false)
.ephemeralStorage(EphemeralStorageProperty.builder()
.sizeInGiB(123)
.build())
.executionRoleArn("executionRoleArn")
.ipcMode("ipcMode")
.networkConfiguration(NetworkConfigurationProperty.builder()
.assignPublicIp("assignPublicIp")
.build())
.pidMode("pidMode")
.platformVersion("platformVersion")
.runtimePlatform(RuntimePlatformProperty.builder()
.cpuArchitecture("cpuArchitecture")
.operatingSystemFamily("operatingSystemFamily")
.build())
.taskRoleArn("taskRoleArn")
.volumes(List.of(VolumesProperty.builder()
.efsVolumeConfiguration(EfsVolumeConfigurationProperty.builder()
.fileSystemId("fileSystemId")
// the properties below are optional
.authorizationConfig(AuthorizationConfigProperty.builder()
.accessPointId("accessPointId")
.iam("iam")
.build())
.rootDirectory("rootDirectory")
.transitEncryption("transitEncryption")
.transitEncryptionPort(123)
.build())
.host(VolumesHostProperty.builder()
.sourcePath("sourcePath")
.build())
.name("name")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnJobDefinition.EcsTaskPropertiesPropertystatic final classAn implementation forCfnJobDefinition.EcsTaskPropertiesProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectThis object is a list of containers.default ObjectDetermines whether execute command functionality is turned on for this task.default ObjectThe amount of ephemeral storage to allocate for the task.default StringThe Amazon Resource Name (ARN) of the execution role that AWS Batch can assume.default StringThe IPC resource namespace to use for the containers in the task.default ObjectThe network configuration for jobs that are running on Fargate resources.default StringThe process namespace to use for the containers in the task.default StringThe Fargate platform version where the jobs are running.default ObjectAn object that represents the compute environment architecture for AWS Batch jobs on Fargate.default StringThe Amazon Resource Name (ARN) that's associated with the Amazon ECS task.default ObjectA list of volumes that are associated with the job.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainers
This object is a list of containers.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnJobDefinition.TaskContainerPropertiesProperty>- See Also:
-
getEnableExecuteCommand
Determines whether execute command functionality is turned on for this task.If
true, execute command functionality is turned on all the containers in the task.Returns union: either
BooleanorIResolvable- See Also:
-
getEphemeralStorage
The amount of ephemeral storage to allocate for the task.This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate .
Returns union: either
IResolvableorCfnJobDefinition.EphemeralStorageProperty- See Also:
-
getExecutionRoleArn
The Amazon Resource Name (ARN) of the execution role that AWS Batch can assume.For jobs that run on Fargate resources, you must provide an execution role. For more information, see AWS Batch execution IAM role in the AWS Batch User Guide .
- See Also:
-
getIpcMode
The IPC resource namespace to use for the containers in the task.The valid values are
host,task, ornone.If
hostis specified, all containers within the tasks that specified thehostIPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance.If
taskis specified, all containers within the specifiedtaskshare the same IPC resources.If
noneis specified, the IPC resources within the containers of a task are private, and are not shared with other containers in a task or on the container instance.If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see IPC settings in the Docker run reference.
- See Also:
-
getNetworkConfiguration
The network configuration for jobs that are running on Fargate resources.Jobs that are running on Amazon EC2 resources must not specify this parameter.
Returns union: either
IResolvableorCfnJobDefinition.NetworkConfigurationProperty- See Also:
-
getPidMode
The process namespace to use for the containers in the task.The valid values are
hostortask. For example, monitoring sidecars might needpidModeto access information about other containers running in the same task.If
hostis specified, all containers within the tasks that specified thehostPID mode on the same container instance share the process namespace with the host Amazon EC2 instance.If
taskis specified, all containers within the specified task share the same process namespace.If no value is specified, the default is a private namespace for each container. For more information, see PID settings in the Docker run reference.
- See Also:
-
getPlatformVersion
The Fargate platform version where the jobs are running.A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the
LATESTplatform version is used by default. This uses a recent, approved version of the Fargate platform for compute resources. For more information, see AWS Fargate platform versions in the Amazon Elastic Container Service Developer Guide .- See Also:
-
getRuntimePlatform
An object that represents the compute environment architecture for AWS Batch jobs on Fargate.Returns union: either
IResolvableorCfnJobDefinition.RuntimePlatformProperty- See Also:
-
getTaskRoleArn
The Amazon Resource Name (ARN) that's associated with the Amazon ECS task.This is object is comparable to ContainerProperties:jobRoleArn .
- See Also:
-
getVolumes
A list of volumes that are associated with the job.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnJobDefinition.VolumesProperty>- See Also:
-
builder
-