Interface IScheduledTaskImageProps
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IScheduledTaskImageProps
Syntax (vb)
Public Interface IScheduledTaskImageProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.ECS.Patterns;
ContainerImage containerImage;
LogDriver logDriver;
Secret secret;
var scheduledTaskImageProps = new ScheduledTaskImageProps {
Image = containerImage,
// the properties below are optional
Command = new [] { "command" },
ContainerName = "containerName",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
LogDriver = logDriver,
Secrets = new Dictionary<string, Secret> {
{ "secretsKey", secret }
}
};
Synopsis
Properties
Command | The command that is passed to the container. |
ContainerName | Optional name for the container added. |
Environment | The environment variables to pass to the container. |
Image | The image used to start a container. |
LogDriver | The log driver to use. |
Secrets | The secret to expose to the container as an environment variable. |
Properties
Command
The command that is passed to the container.
virtual string[] Command { get; }
Property Value
System.String[]
Remarks
If you provide a shell command as a single string, you have to quote command-line arguments.
Default: - CMD value built into container image.
ContainerName
Optional name for the container added.
virtual string ContainerName { get; }
Property Value
System.String
Remarks
Default: - ScheduledContainer
Environment
The environment variables to pass to the container.
virtual IDictionary<string, string> Environment { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: none
Image
The image used to start a container.
ContainerImage Image { get; }
Property Value
Remarks
Image or taskDefinition must be specified, but not both.
Default: - none
LogDriver
The log driver to use.
virtual LogDriver LogDriver { get; }
Property Value
Remarks
Default: - AwsLogDriver if enableLogging is true
Secrets
The secret to expose to the container as an environment variable.
virtual IDictionary<string, Secret> Secrets { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, Secret>
Remarks
Default: - No secret environment variables.