ScheduledEc2TaskImageOptions

class aws_cdk.aws_ecs_patterns.ScheduledEc2TaskImageOptions(*, image, command=None, environment=None, log_driver=None, secrets=None, cpu=None, memory_limit_mib=None, memory_reservation_mib=None)

Bases: aws_cdk.aws_ecs_patterns.ScheduledTaskImageProps

__init__(*, image, command=None, environment=None, log_driver=None, secrets=None, cpu=None, memory_limit_mib=None, memory_reservation_mib=None)

The properties for the ScheduledEc2Task using an image.

Parameters
  • image (ContainerImage) – The image used to start a container. Image or taskDefinition must be specified, but not both. Default: - none

  • command (Optional[List[str]]) – The command that is passed to the container. If you provide a shell command as a single string, you have to quote command-line arguments. Default: - CMD value built into container image.

  • environment (Optional[Mapping[str, str]]) – The environment variables to pass to the container. Default: none

  • log_driver (Optional[LogDriver]) – The log driver to use. Default: - AwsLogDriver if enableLogging is true

  • secrets (Optional[Mapping[str, Secret]]) – The secret to expose to the container as an environment variable. Default: - No secret environment variables.

  • cpu (Union[int, float, None]) – The minimum number of CPU units to reserve for the container. Default: none

  • memory_limit_mib (Union[int, float, None]) – The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the allocated memory, the container is terminated. At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services. Default: - No memory limit.

  • memory_reservation_mib (Union[int, float, None]) – The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory within the limit. If the container requires more memory, it can consume up to the value specified by the Memory property or all of the available memory on the container instance—whichever comes first. At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services. Default: - No memory reserved.

Return type

None

Attributes

command

The command that is passed to the container.

If you provide a shell command as a single string, you have to quote command-line arguments.

default :default: - CMD value built into container image.

Return type

Optional[List[str]]

cpu

The minimum number of CPU units to reserve for the container.

default :default: none

Return type

Union[int, float, None]

environment

The environment variables to pass to the container.

default :default: none

Return type

Optional[Mapping[str, str]]

image

The image used to start a container.

Image or taskDefinition must be specified, but not both.

default :default: - none

Return type

ContainerImage

log_driver

The log driver to use.

default :default: - AwsLogDriver if enableLogging is true

Return type

Optional[LogDriver]

memory_limit_mib

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

If your container attempts to exceed the allocated memory, the container is terminated.

At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.

default :default: - No memory limit.

Return type

Union[int, float, None]

memory_reservation_mib

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

When system memory is under contention, Docker attempts to keep the container memory within the limit. If the container requires more memory, it can consume up to the value specified by the Memory property or all of the available memory on the container instance—whichever comes first.

At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.

default :default: - No memory reserved.

Return type

Union[int, float, None]

secrets

The secret to expose to the container as an environment variable.

default :default: - No secret environment variables.

Return type

Optional[Mapping[str, Secret]]