Interface EcsFargateContainerDefinitionProps
- All Superinterfaces:
EcsContainerDefinitionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcsFargateContainerDefinitionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:04.817Z")
@Stability(Stable)
public interface EcsFargateContainerDefinitionProps
extends software.amazon.jsii.JsiiSerializable, EcsContainerDefinitionProps
Props to configure an EcsFargateContainerDefinition.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.batch.*;
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.iam.*;
ContainerImage containerImage;
EcsVolume ecsVolume;
LinuxParameters linuxParameters;
LogDriver logDriver;
Role role;
Secret secret;
Size size;
EcsFargateContainerDefinitionProps ecsFargateContainerDefinitionProps = EcsFargateContainerDefinitionProps.builder()
.cpu(123)
.image(containerImage)
.memory(size)
// the properties below are optional
.assignPublicIp(false)
.command(List.of("command"))
.environment(Map.of(
"environmentKey", "environment"))
.ephemeralStorageSize(size)
.executionRole(role)
.fargatePlatformVersion(FargatePlatformVersion.LATEST)
.jobRole(role)
.linuxParameters(linuxParameters)
.logging(logDriver)
.readonlyRootFilesystem(false)
.secrets(Map.of(
"secretsKey", secret))
.user("user")
.volumes(List.of(ecsVolume))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEcsFargateContainerDefinitionPropsstatic final classAn implementation forEcsFargateContainerDefinitionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanIndicates whether the job has a public IP address.default SizeThe size for ephemeral storage.default FargatePlatformVersionWhich version of Fargate to use when running this container.Methods inherited from interface software.amazon.awscdk.services.batch.EcsContainerDefinitionProps
getCommand, getCpu, getEnvironment, getExecutionRole, getImage, getJobRole, getLinuxParameters, getLogging, getMemory, getReadonlyRootFilesystem, getSecrets, getUser, getVolumesMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAssignPublicIp
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
- See Also:
-
getEphemeralStorageSize
The size for ephemeral storage.Default: - 20 GiB
-
getFargatePlatformVersion
Which version of Fargate to use when running this container.Default: LATEST
-
builder
-