Interface IRunEcsEc2TaskProps
(deprecated) Properties to run an ECS task on EC2 in StepFunctionsan ECS.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public interface IRunEcsEc2TaskProps : ICommonEcsRunTaskProps
Syntax (vb)
Public Interface IRunEcsEc2TaskProps
Inherits ICommonEcsRunTaskProps
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 runEcsEc2TaskProps = 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
Properties
PlacementConstraints | (deprecated) Placement constraints. |
PlacementStrategies | (deprecated) Placement strategies. |
SecurityGroup | (deprecated) Existing security group to use for the task's ENIs. |
Subnets | (deprecated) In what subnets to place the task's ENIs. |
Properties
PlacementConstraints
(deprecated) Placement constraints.
virtual PlacementConstraint[] PlacementConstraints { get; }
Property Value
Remarks
Default: No constraints
Stability: Deprecated
PlacementStrategies
(deprecated) Placement strategies.
virtual PlacementStrategy[] PlacementStrategies { get; }
Property Value
Remarks
Default: No strategies
Stability: Deprecated
SecurityGroup
(deprecated) Existing security group to use for the task's ENIs.
virtual ISecurityGroup SecurityGroup { get; }
Property Value
Remarks
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: A new security group is created
Stability: Deprecated
Subnets
(deprecated) In what subnets to place the task's ENIs.
virtual ISubnetSelection Subnets { get; }
Property Value
Remarks
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
Stability: Deprecated