Class CommonEcsRunTaskProps
Basic properties for ECS Tasks.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CommonEcsRunTaskProps : Object, ICommonEcsRunTaskProps
Syntax (vb)
Public Class CommonEcsRunTaskProps
Inherits Object
Implements ICommonEcsRunTaskProps
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.StepFunctions;
using Amazon.CDK.AWS.StepFunctions.Tasks;
Cluster cluster;
ContainerDefinition containerDefinition;
TaskDefinition taskDefinition;
var commonEcsRunTaskProps = new CommonEcsRunTaskProps {
Cluster = cluster,
TaskDefinition = taskDefinition,
// the properties below are optional
ContainerOverrides = new [] { new ContainerOverride {
ContainerDefinition = containerDefinition,
// the properties below are optional
Command = new [] { "command" },
Cpu = 123,
Environment = new [] { new TaskEnvironmentVariable {
Name = "name",
Value = "value"
} },
MemoryLimit = 123,
MemoryReservation = 123
} },
IntegrationPattern = ServiceIntegrationPattern.FIRE_AND_FORGET
};
Synopsis
Constructors
CommonEcsRunTaskProps() |
Properties
Cluster | The topic to run the task on. |
ContainerOverrides | Container setting overrides. |
IntegrationPattern | The service integration pattern indicates different ways to call RunTask in ECS. |
TaskDefinition | Task Definition used for running tasks in the service. |
Constructors
CommonEcsRunTaskProps()
public CommonEcsRunTaskProps()
Properties
Cluster
ContainerOverrides
Container setting overrides.
public IContainerOverride[] ContainerOverrides { get; set; }
Property Value
Remarks
Key is the name of the container to override, value is the values you want to override.
Default: - No overrides
IntegrationPattern
The service integration pattern indicates different ways to call RunTask in ECS.
public Nullable<ServiceIntegrationPattern> IntegrationPattern { get; set; }
Property Value
System.Nullable<ServiceIntegrationPattern>
Remarks
The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN.
Default: FIRE_AND_FORGET
TaskDefinition
Task Definition used for running tasks in the service.
public TaskDefinition TaskDefinition { get; set; }
Property Value
Remarks
Note: this must be TaskDefinition, and not ITaskDefinition, as it requires properties that are not known for imported task definitions If you want to run a RunTask with an imported task definition, consider using CustomState