ScheduledTaskImageProps

class aws_cdk.aws_ecs_patterns.ScheduledTaskImageProps(*, image, command=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: - none

  • command (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.

  • 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.

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_ecs as ecs
import aws_cdk.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"],
    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.

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.