Class RunEcsEc2Task
(deprecated) Run an ECS/EC2 Task in a StepFunctions workflow.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public class RunEcsEc2Task : EcsRunTaskBase, IConnectable, IStepFunctionsTask
Syntax (vb)
Public Class RunEcsEc2Task
Inherits EcsRunTaskBase
Implements IConnectable, IStepFunctionsTask
Remarks
Stability: Deprecated
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.EC2;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.StepFunctions;
using Amazon.CDK.AWS.StepFunctions.Tasks;
Cluster cluster;
ContainerDefinition containerDefinition;
PlacementConstraint placementConstraint;
PlacementStrategy placementStrategy;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
TaskDefinition taskDefinition;
var runEcsEc2Task = new RunEcsEc2Task(new RunEcsEc2TaskProps {
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,
PlacementConstraints = new [] { placementConstraint },
PlacementStrategies = new [] { placementStrategy },
SecurityGroup = securityGroup,
Subnets = new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
SubnetName = "subnetName",
Subnets = new [] { subnet },
SubnetType = SubnetType.ISOLATED
}
});
Synopsis
Constructors
RunEcsEc2Task(IRunEcsEc2TaskProps) | |
RunEcsEc2Task(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
RunEcsEc2Task(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Constructors
RunEcsEc2Task(IRunEcsEc2TaskProps)
public RunEcsEc2Task(IRunEcsEc2TaskProps props)
Parameters
- props IRunEcsEc2TaskProps
Remarks
Stability: Deprecated
RunEcsEc2Task(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected RunEcsEc2Task(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
RunEcsEc2Task(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected RunEcsEc2Task(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props