Skip to content
v2.273.0

ScheduledTaskImageProps Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_ecs_patterns as ecs_patterns } from 'aws-cdk-lib';

declare const containerImage: ecs.ContainerImage;
declare const logDriver: ecs.LogDriver;
declare const secret: ecs.Secret;
const scheduledTaskImageProps: ecs_patterns.ScheduledTaskImageProps = {
  image: containerImage,

  // the properties below are optional
  command: ['command'],
  containerName: 'containerName',
  environment: {
    environmentKey: 'environment',
  },
  logDriver: logDriver,
  secrets: {
    secretsKey: secret,
  },
};

Properties ​

commandstring[]commandtyping.List[str]commandList<String>Commandstring[]Command*[]*string= CMD value built into container i…#
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.

containerNamestringcontainer_namestrcontainerNameStringContainerNamestringContainerName*string= ScheduledContainer#
Optional name for the container added.
environment{ [key: string]: string }environmenttyping.Mapping[str, str]environmentMap<String, String>EnvironmentIDictionary<string, string>Environment*map[string]*string= none#
The environment variables to pass to the container.
The image used to start a container.

Image or taskDefinition must be specified, but not both.

logDriverLogDriverlog_driverLogDriverlogDriverLogDriverLogDriverLogDriverLogDriverLogDriver= AwsLogDriver if enableLogging is…#
The log driver to use.
default

Default: AwsLogDriver if enableLogging is true

secrets{ [key: string]: Secret }secretstyping.Mapping[str, Secret]secretsMap<String, Secret>SecretsIDictionary<string, Secret>Secrets*map[string]Secret= No secret environment variables.#
The secret to expose to the container as an environment variable.