Class EcsFargateContainerDefinition.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EcsFargateContainerDefinition>
- Enclosing class:
EcsFargateContainerDefinition
EcsFargateContainerDefinition
.-
Method Summary
Modifier and TypeMethodDescriptionassignPublicIp
(Boolean assignPublicIp) Indicates whether the job has a public IP address.build()
The command that's passed to the container.The number of vCPUs reserved for the container.environment
(Map<String, String> environment) The environment variables to pass to a container.ephemeralStorageSize
(Size ephemeralStorageSize) The size for ephemeral storage.executionRole
(IRole executionRole) The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf.fargateCpuArchitecture
(CpuArchitecture fargateCpuArchitecture) The vCPU architecture of Fargate Runtime.fargateOperatingSystemFamily
(OperatingSystemFamily fargateOperatingSystemFamily) The operating system for the compute environment.fargatePlatformVersion
(FargatePlatformVersion fargatePlatformVersion) Which version of Fargate to use when running this container.image
(ContainerImage image) The image that this container will run.The role that the container can assume.linuxParameters
(LinuxParameters linuxParameters) Linux-specific modifications that are applied to the container, such as details for device mappings.The loging configuration for this Job.The memory hard limit present to the container.readonlyRootFilesystem
(Boolean readonlyRootFilesystem) Gives the container readonly access to its root filesystem.A map from environment variable names to the secrets for the container.The user name to use inside the container.The volumes to mount to this container.
-
Method Details
-
create
@Stability(Stable) public static EcsFargateContainerDefinition.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
EcsFargateContainerDefinition.Builder
.
-
cpu
The number of vCPUs reserved for the container.Each vCPU is equivalent to 1,024 CPU shares. For containers running on EC2 resources, you must specify at least one vCPU.
- Parameters:
cpu
- The number of vCPUs reserved for the container. This parameter is required.- Returns:
this
-
image
The image that this container will run.- Parameters:
image
- The image that this container will run. This parameter is required.- Returns:
this
-
memory
The memory hard limit present to the container.If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.
- Parameters:
memory
- The memory hard limit present to the container. This parameter is required.- Returns:
this
-
command
The command that's passed to the container.Default: - no command
- Parameters:
command
- The command that's passed to the container. This parameter is required.- Returns:
this
- See Also:
-
environment
@Stability(Stable) public EcsFargateContainerDefinition.Builder environment(Map<String, String> environment) The environment variables to pass to a container.Cannot start with
AWS_BATCH
. We don't recommend using plaintext environment variables for sensitive information, such as credential data.Default: - no environment variables
- Parameters:
environment
- The environment variables to pass to a container. This parameter is required.- Returns:
this
-
executionRole
The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf.Default: - a Role will be created
- Parameters:
executionRole
- The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf. This parameter is required.- Returns:
this
- See Also:
-
jobRole
The role that the container can assume.Default: - no job role
- Parameters:
jobRole
- The role that the container can assume. This parameter is required.- Returns:
this
- See Also:
-
linuxParameters
@Stability(Stable) public EcsFargateContainerDefinition.Builder linuxParameters(LinuxParameters linuxParameters) Linux-specific modifications that are applied to the container, such as details for device mappings.Default: none
- Parameters:
linuxParameters
- Linux-specific modifications that are applied to the container, such as details for device mappings. This parameter is required.- Returns:
this
-
logging
The loging configuration for this Job.Default: - the log configuration of the Docker daemon
- Parameters:
logging
- The loging configuration for this Job. This parameter is required.- Returns:
this
-
readonlyRootFilesystem
@Stability(Stable) public EcsFargateContainerDefinition.Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem) Gives the container readonly access to its root filesystem.Default: false
- Parameters:
readonlyRootFilesystem
- Gives the container readonly access to its root filesystem. This parameter is required.- Returns:
this
-
secrets
@Stability(Stable) public EcsFargateContainerDefinition.Builder secrets(Map<String, ? extends Secret> secrets) A map from environment variable names to the secrets for the container.Allows your job definitions to reference the secret by the environment variable name defined in this property.
Default: - no secrets
- Parameters:
secrets
- A map from environment variable names to the secrets for the container. This parameter is required.- Returns:
this
- See Also:
-
user
The user name to use inside the container.Default: - no user
- Parameters:
user
- The user name to use inside the container. This parameter is required.- Returns:
this
-
volumes
@Stability(Stable) public EcsFargateContainerDefinition.Builder volumes(List<? extends EcsVolume> volumes) The volumes to mount to this container.Automatically added to the job definition.
Default: - no volumes
- Parameters:
volumes
- The volumes to mount to this container. This parameter is required.- Returns:
this
-
assignPublicIp
@Stability(Stable) public EcsFargateContainerDefinition.Builder assignPublicIp(Boolean assignPublicIp) Indicates whether the job has a public IP address.For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet.
Default: false
- Parameters:
assignPublicIp
- Indicates whether the job has a public IP address. This parameter is required.- Returns:
this
- See Also:
-
ephemeralStorageSize
@Stability(Stable) public EcsFargateContainerDefinition.Builder ephemeralStorageSize(Size ephemeralStorageSize) The size for ephemeral storage.Default: - 20 GiB
- Parameters:
ephemeralStorageSize
- The size for ephemeral storage. This parameter is required.- Returns:
this
-
fargateCpuArchitecture
@Stability(Stable) public EcsFargateContainerDefinition.Builder fargateCpuArchitecture(CpuArchitecture fargateCpuArchitecture) The vCPU architecture of Fargate Runtime.Default: - X86_64
- Parameters:
fargateCpuArchitecture
- The vCPU architecture of Fargate Runtime. This parameter is required.- Returns:
this
-
fargateOperatingSystemFamily
@Stability(Stable) public EcsFargateContainerDefinition.Builder fargateOperatingSystemFamily(OperatingSystemFamily fargateOperatingSystemFamily) The operating system for the compute environment.Default: - LINUX
- Parameters:
fargateOperatingSystemFamily
- The operating system for the compute environment. This parameter is required.- Returns:
this
-
fargatePlatformVersion
@Stability(Stable) public EcsFargateContainerDefinition.Builder fargatePlatformVersion(FargatePlatformVersion fargatePlatformVersion) Which version of Fargate to use when running this container.Default: LATEST
- Parameters:
fargatePlatformVersion
- Which version of Fargate to use when running this container. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EcsFargateContainerDefinition>
- Returns:
- a newly built instance of
EcsFargateContainerDefinition
.
-