Class EcsFargateContainerDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.batch.EcsFargateContainerDefinition
All Implemented Interfaces:
IEcsContainerDefinition, IEcsFargateContainerDefinition, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)", date="2024-01-03T18:29:22.421Z") @Stability(Stable) public class EcsFargateContainerDefinition extends software.constructs.Construct implements IEcsFargateContainerDefinition, IEcsContainerDefinition
A container orchestrated by ECS that uses Fargate resources.

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;
 EcsFargateContainerDefinition ecsFargateContainerDefinition = EcsFargateContainerDefinition.Builder.create(this, "MyEcsFargateContainerDefinition")
         .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();