ContainerOverride

class aws_cdk.aws_stepfunctions_tasks.ContainerOverride(*, container_definition, command=None, cpu=None, environment=None, memory_limit=None, memory_reservation=None)

Bases: object

A list of container overrides that specify the name of a container and the overrides it should receive.

Parameters:
  • container_definition (ContainerDefinition) – Name of the container inside the task definition.

  • command (Optional[Sequence[str]]) – Command to run inside the container. Default: - Default command from the Docker image or the task definition

  • cpu (Union[int, float, None]) – The number of cpu units reserved for the container. Default: - The default value from the task definition.

  • environment (Optional[Sequence[Union[TaskEnvironmentVariable, Dict[str, Any]]]]) – The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. Default: - The existing environment variables from the Docker image or the task definition

  • memory_limit (Union[int, float, None]) – The hard limit (in MiB) of memory to present to the container. Default: - The default value from the task definition.

  • memory_reservation (Union[int, float, None]) – The soft limit (in MiB) of memory to reserve for the container. Default: - The default value from the task definition.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# container_definition: ecs.ContainerDefinition

container_override = stepfunctions_tasks.ContainerOverride(
    container_definition=container_definition,

    # the properties below are optional
    command=["command"],
    cpu=123,
    environment=[stepfunctions_tasks.TaskEnvironmentVariable(
        name="name",
        value="value"
    )],
    memory_limit=123,
    memory_reservation=123
)

Attributes

command

Command to run inside the container.

Default:
  • Default command from the Docker image or the task definition

container_definition

Name of the container inside the task definition.

cpu

The number of cpu units reserved for the container.

Default:
  • The default value from the task definition.

environment

The environment variables to send to the container.

You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.

Default:
  • The existing environment variables from the Docker image or the task definition

memory_limit

The hard limit (in MiB) of memory to present to the container.

Default:
  • The default value from the task definition.

memory_reservation

The soft limit (in MiB) of memory to reserve for the container.

Default:
  • The default value from the task definition.