Class ScheduledTaskImageProps
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ScheduledTaskImageProps : Object, IScheduledTaskImageProps
Syntax (vb)
Public Class ScheduledTaskImageProps
Inherits Object
Implements 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" },
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
LogDriver = logDriver,
Secrets = new Dictionary<string, Secret> {
{ "secretsKey", secret }
}
};
Synopsis
Constructors
ScheduledTaskImageProps() |
Properties
Command | The command that is passed to the container. |
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. |
Constructors
ScheduledTaskImageProps()
public ScheduledTaskImageProps()
Properties
Command
The command that is passed to the container.
public string[] Command { get; set; }
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.
Environment
The environment variables to pass to the container.
public IDictionary<string, string> Environment { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: none
Image
The image used to start a container.
public ContainerImage Image { get; set; }
Property Value
Remarks
Image or taskDefinition must be specified, but not both.
Default: - none
LogDriver
The log driver to use.
public LogDriver LogDriver { get; set; }
Property Value
Remarks
Default: - AwsLogDriver if enableLogging is true
Secrets
The secret to expose to the container as an environment variable.
public IDictionary<string, Secret> Secrets { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, Secret>
Remarks
Default: - No secret environment variables.