Interface IEcsContainerDefinition

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IEcsContainerDefinition.Jsii$Default, IEcsEc2ContainerDefinition, IEcsEc2ContainerDefinition.Jsii$Default, IEcsFargateContainerDefinition, IEcsFargateContainerDefinition.Jsii$Default
All Known Implementing Classes:
EcsEc2ContainerDefinition, EcsFargateContainerDefinition, IEcsContainerDefinition.Jsii$Proxy, IEcsEc2ContainerDefinition.Jsii$Proxy, IEcsFargateContainerDefinition.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:03.408Z") @Stability(Stable) public interface IEcsContainerDefinition extends software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
A container that can be run with ECS orchestration.
  • Method Details

    • getCpu

      @Stability(Stable) @NotNull Number getCpu()
      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.

    • getExecutionRole

      @Stability(Stable) @NotNull IRole getExecutionRole()
      The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf.

      See Also:
    • getImage

      @Stability(Stable) @NotNull ContainerImage getImage()
      The image that this container will run.
    • getMemory

      @Stability(Stable) @NotNull Size getMemory()
      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.

    • getVolumes

      @Stability(Stable) @NotNull List<EcsVolume> getVolumes()
      The volumes to mount to this container.

      Automatically added to the job definition.

      Default: - no volumes

    • getCommand

      @Stability(Stable) @Nullable default List<String> getCommand()
      The command that's passed to the container.

      See Also:
    • getEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getEnvironment()
      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

    • getJobRole

      @Stability(Stable) @Nullable default IRole getJobRole()
      The role that the container can assume.

      Default: - no jobRole

      See Also:
    • getLinuxParameters

      @Stability(Stable) @Nullable default LinuxParameters getLinuxParameters()
      Linux-specific modifications that are applied to the container, such as details for device mappings.

      Default: none

    • getLogDriverConfig

      @Stability(Stable) @Nullable default LogDriverConfig getLogDriverConfig()
      The configuration of the log driver.
    • getReadonlyRootFilesystem

      @Stability(Stable) @Nullable default Boolean getReadonlyRootFilesystem()
      Gives the container readonly access to its root filesystem.

      Default: false

    • getSecrets

      @Stability(Stable) @Nullable default Map<String,Secret> getSecrets()
      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

      See Also:
    • getUser

      @Stability(Stable) @Nullable default String getUser()
      The user name to use inside the container.

      Default: - no user

    • addVolume

      @Stability(Stable) void addVolume(@NotNull EcsVolume volume)
      Add a Volume to this container.

      Parameters:
      volume - This parameter is required.