ContainerOverride

class aws_cdk.aws_events_targets.ContainerOverride(*, container_name, command=None, cpu=None, environment=None, memory_limit=None, memory_reservation=None)

Bases: object

Parameters
  • container_name (str) – Name of the container inside the task definition.

  • command (Optional[Sequence[str]]) – Command to run inside the container. Default: Default command

  • 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]]]]) – Variables to set in the container’s environment.

  • memory_limit (Union[int, float, None]) – Hard memory limit on the container. Default: The default value from the task definition.

  • memory_reservation (Union[int, float, None]) – Soft memory limit on 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.
import aws_cdk.aws_events_targets as events_targets

container_override = events_targets.ContainerOverride(
    container_name="containerName",

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

Attributes

command

Command to run inside the container.

Default

Default command

Return type

Optional[List[str]]

container_name

Name of the container inside the task definition.

Return type

str

cpu

The number of cpu units reserved for the container.

Default

The default value from the task definition.

Return type

Union[int, float, None]

environment

Variables to set in the container’s environment.

Return type

Optional[List[TaskEnvironmentVariable]]

memory_limit

Hard memory limit on the container.

Default

The default value from the task definition.

Return type

Union[int, float, None]

memory_reservation

Soft memory limit on the container.

Default

The default value from the task definition.

Return type

Union[int, float, None]