interface ScheduledTaskImageProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.Patterns.ScheduledTaskImageProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecspatterns#ScheduledTaskImageProps |
Java | software.amazon.awscdk.services.ecs.patterns.ScheduledTaskImageProps |
Python | aws_cdk.aws_ecs_patterns.ScheduledTaskImageProps |
TypeScript (source) | aws-cdk-lib » aws_ecs_patterns » ScheduledTaskImageProps |
Example
// 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
Name | Type | Description |
---|---|---|
image | Container | The image used to start a container. |
command? | string[] | The command that is passed to the container. |
container | string | Optional name for the container added. |
environment? | { [string]: string } | The environment variables to pass to the container. |
log | Log | The log driver to use. |
secrets? | { [string]: Secret } | The secret to expose to the container as an environment variable. |
image
Type:
Container
The image used to start a container.
Image or taskDefinition must be specified, but not both.
command?
Type:
string[]
(optional, default: CMD value built into container image.)
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.
containerName?
Type:
string
(optional, default: ScheduledContainer)
Optional name for the container added.
environment?
Type:
{ [string]: string }
(optional, default: none)
The environment variables to pass to the container.
logDriver?
Type:
Log
(optional, default: AwsLogDriver if enableLogging is true)
The log driver to use.
secrets?
Type:
{ [string]:
Secret
}
(optional, default: No secret environment variables.)
The secret to expose to the container as an environment variable.