Class EcsFargateContainerDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.EcsFargateContainerDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EcsFargateContainerDefinitionProps>
- Enclosing interface:
EcsFargateContainerDefinitionProps
@Stability(Stable)
public static final class EcsFargateContainerDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<EcsFargateContainerDefinitionProps>
A builder for
EcsFargateContainerDefinitionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignPublicIp
(Boolean assignPublicIp) Sets the value ofEcsFargateContainerDefinitionProps.getAssignPublicIp()
build()
Builds the configured instance.Sets the value ofEcsContainerDefinitionProps.getCommand()
Sets the value ofEcsContainerDefinitionProps.getCpu()
environment
(Map<String, String> environment) Sets the value ofEcsContainerDefinitionProps.getEnvironment()
ephemeralStorageSize
(Size ephemeralStorageSize) Sets the value ofEcsFargateContainerDefinitionProps.getEphemeralStorageSize()
executionRole
(IRole executionRole) Sets the value ofEcsContainerDefinitionProps.getExecutionRole()
fargateCpuArchitecture
(CpuArchitecture fargateCpuArchitecture) Sets the value ofEcsFargateContainerDefinitionProps.getFargateCpuArchitecture()
fargateOperatingSystemFamily
(OperatingSystemFamily fargateOperatingSystemFamily) Sets the value ofEcsFargateContainerDefinitionProps.getFargateOperatingSystemFamily()
fargatePlatformVersion
(FargatePlatformVersion fargatePlatformVersion) Sets the value ofEcsFargateContainerDefinitionProps.getFargatePlatformVersion()
image
(ContainerImage image) Sets the value ofEcsContainerDefinitionProps.getImage()
Sets the value ofEcsContainerDefinitionProps.getJobRole()
linuxParameters
(LinuxParameters linuxParameters) Sets the value ofEcsContainerDefinitionProps.getLinuxParameters()
Sets the value ofEcsContainerDefinitionProps.getLogging()
Sets the value ofEcsContainerDefinitionProps.getMemory()
readonlyRootFilesystem
(Boolean readonlyRootFilesystem) Sets the value ofEcsContainerDefinitionProps.getReadonlyRootFilesystem()
Sets the value ofEcsContainerDefinitionProps.getSecrets()
Sets the value ofEcsContainerDefinitionProps.getUser()
Sets the value ofEcsContainerDefinitionProps.getVolumes()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
assignPublicIp
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder assignPublicIp(Boolean assignPublicIp) Sets the value ofEcsFargateContainerDefinitionProps.getAssignPublicIp()
- Parameters:
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.- Returns:
this
-
ephemeralStorageSize
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder ephemeralStorageSize(Size ephemeralStorageSize) Sets the value ofEcsFargateContainerDefinitionProps.getEphemeralStorageSize()
- Parameters:
ephemeralStorageSize
- The size for ephemeral storage.- Returns:
this
-
fargateCpuArchitecture
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder fargateCpuArchitecture(CpuArchitecture fargateCpuArchitecture) Sets the value ofEcsFargateContainerDefinitionProps.getFargateCpuArchitecture()
- Parameters:
fargateCpuArchitecture
- The vCPU architecture of Fargate Runtime.- Returns:
this
-
fargateOperatingSystemFamily
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder fargateOperatingSystemFamily(OperatingSystemFamily fargateOperatingSystemFamily) Sets the value ofEcsFargateContainerDefinitionProps.getFargateOperatingSystemFamily()
- Parameters:
fargateOperatingSystemFamily
- The operating system for the compute environment.- Returns:
this
-
fargatePlatformVersion
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder fargatePlatformVersion(FargatePlatformVersion fargatePlatformVersion) Sets the value ofEcsFargateContainerDefinitionProps.getFargatePlatformVersion()
- Parameters:
fargatePlatformVersion
- Which version of Fargate to use when running this container.- Returns:
this
-
cpu
Sets the value ofEcsContainerDefinitionProps.getCpu()
- Parameters:
cpu
- The number of vCPUs reserved for the container. This parameter is required. Each vCPU is equivalent to 1,024 CPU shares. For containers running on EC2 resources, you must specify at least one vCPU.- Returns:
this
-
image
Sets the value ofEcsContainerDefinitionProps.getImage()
- Parameters:
image
- The image that this container will run. This parameter is required.- Returns:
this
-
memory
Sets the value ofEcsContainerDefinitionProps.getMemory()
- Parameters:
memory
- The memory hard limit present to the container. This parameter is required. 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.- Returns:
this
-
command
Sets the value ofEcsContainerDefinitionProps.getCommand()
- Parameters:
command
- The command that's passed to the container.- Returns:
this
-
environment
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder environment(Map<String, String> environment) Sets the value ofEcsContainerDefinitionProps.getEnvironment()
- Parameters:
environment
- The environment variables to pass to a container. Cannot start withAWS_BATCH
. We don't recommend using plaintext environment variables for sensitive information, such as credential data.- Returns:
this
-
executionRole
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder executionRole(IRole executionRole) Sets the value ofEcsContainerDefinitionProps.getExecutionRole()
- Parameters:
executionRole
- The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf.- Returns:
this
-
jobRole
Sets the value ofEcsContainerDefinitionProps.getJobRole()
- Parameters:
jobRole
- The role that the container can assume.- Returns:
this
-
linuxParameters
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder linuxParameters(LinuxParameters linuxParameters) Sets the value ofEcsContainerDefinitionProps.getLinuxParameters()
- Parameters:
linuxParameters
- Linux-specific modifications that are applied to the container, such as details for device mappings.- Returns:
this
-
logging
Sets the value ofEcsContainerDefinitionProps.getLogging()
- Parameters:
logging
- The loging configuration for this Job.- Returns:
this
-
readonlyRootFilesystem
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem) Sets the value ofEcsContainerDefinitionProps.getReadonlyRootFilesystem()
- Parameters:
readonlyRootFilesystem
- Gives the container readonly access to its root filesystem.- Returns:
this
-
secrets
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder secrets(Map<String, ? extends Secret> secrets) Sets the value ofEcsContainerDefinitionProps.getSecrets()
- Parameters:
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.- Returns:
this
-
user
Sets the value ofEcsContainerDefinitionProps.getUser()
- Parameters:
user
- The user name to use inside the container.- Returns:
this
-
volumes
@Stability(Stable) public EcsFargateContainerDefinitionProps.Builder volumes(List<? extends EcsVolume> volumes) Sets the value ofEcsContainerDefinitionProps.getVolumes()
- Parameters:
volumes
- The volumes to mount to this container. Automatically added to the job definition.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EcsFargateContainerDefinitionProps>
- Returns:
- a new instance of
EcsFargateContainerDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-