ScheduledTaskImageProps
- class aws_cdk.aws_ecs_patterns.ScheduledTaskImageProps(*, image, command=None, container_name=None, environment=None, log_driver=None, secrets=None)
Bases:
object
- Parameters:
image (
ContainerImage
) – The image used to start a container. Image or taskDefinition must be specified, but not both. Default: - nonecommand (
Optional
[Sequence
[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.container_name (
Optional
[str
]) – Optional name for the container added. Default: - ScheduledContainerenvironment (
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.
- 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_ecs_patterns as ecs_patterns # container_image: ecs.ContainerImage # log_driver: ecs.LogDriver # secret: ecs.Secret scheduled_task_image_props = ecs_patterns.ScheduledTaskImageProps( image=container_image, # the properties below are optional command=["command"], container_name="containerName", environment={ "environment_key": "environment" }, log_driver=log_driver, secrets={ "secrets_key": secret } )
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.
- container_name
Optional name for the container added.
- Default:
ScheduledContainer
- environment
The environment variables to pass to the container.
- Default:
none
- image
The image used to start a container.
Image or taskDefinition must be specified, but not both.
- Default:
none
- log_driver
The log driver to use.
- Default:
AwsLogDriver if enableLogging is true
- secrets
The secret to expose to the container as an environment variable.
- Default:
No secret environment variables.