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
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: - nonecommand (
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: nonelog_driver (
Optional
[LogDriver
]) – The log driver to use. Default: - AwsLogDriver if enableLogging is truesecrets (
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: nonememory_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.
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
CMD value built into container image.
- Return type
Optional
[List
[str
]]
-
cpu
¶ The minimum number of CPU units to reserve for the container.
- Default
none
- Return type
Union
[int
,float
,None
]
-
environment
¶ The environment variables to pass to the container.
- 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
none
- Return type
-
log_driver
¶ The log driver to use.
- 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
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
No memory reserved.
- Return type
Union
[int
,float
,None
]