interface RunEcsEc2TaskProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.StepFunctions.Tasks.RunEcsEc2TaskProps |
![]() | software.amazon.awscdk.services.stepfunctions.tasks.RunEcsEc2TaskProps |
![]() | aws_cdk.aws_stepfunctions_tasks.RunEcsEc2TaskProps |
![]() | @aws-cdk/aws-stepfunctions-tasks » RunEcsEc2TaskProps |
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Properties to run an ECS task on EC2 in StepFunctionsan ECS.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
import * as ecs from '@aws-cdk/aws-ecs';
import * as stepfunctions from '@aws-cdk/aws-stepfunctions';
import * as stepfunctions_tasks from '@aws-cdk/aws-stepfunctions-tasks';
declare const cluster: ecs.Cluster;
declare const containerDefinition: ecs.ContainerDefinition;
declare const placementConstraint: ecs.PlacementConstraint;
declare const placementStrategy: ecs.PlacementStrategy;
declare const securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const taskDefinition: ecs.TaskDefinition;
const runEcsEc2TaskProps: stepfunctions_tasks.RunEcsEc2TaskProps = {
cluster: cluster,
taskDefinition: taskDefinition,
// the properties below are optional
containerOverrides: [{
containerDefinition: containerDefinition,
// the properties below are optional
command: ['command'],
cpu: 123,
environment: [{
name: 'name',
value: 'value',
}],
memoryLimit: 123,
memoryReservation: 123,
}],
integrationPattern: stepfunctions.ServiceIntegrationPattern.FIRE_AND_FORGET,
placementConstraints: [placementConstraint],
placementStrategies: [placementStrategy],
securityGroup: securityGroup,
subnets: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnetName: 'subnetName',
subnets: [subnet],
subnetType: ec2.SubnetType.ISOLATED,
},
};
Properties
Name | Type | Description |
---|---|---|
cluster | ICluster | The topic to run the task on. |
task | Task | Task Definition used for running tasks in the service. |
container | Container [] | Container setting overrides. |
integration | Service | The service integration pattern indicates different ways to call RunTask in ECS. |
placement | Placement [] | Placement constraints. |
placement | Placement [] | Placement strategies. |
security | ISecurity | Existing security group to use for the task's ENIs. |
subnets? | Subnet | In what subnets to place the task's ENIs. |
cluster
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
ICluster
The topic to run the task on.
taskDefinition
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Task
Task Definition used for running tasks in the service.
Note: this must be TaskDefinition, and not ITaskDefinition, as it requires properties that are not known for imported task definitions
containerOverrides?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Container
[]
(optional, default: No overrides)
Container setting overrides.
Key is the name of the container to override, value is the values you want to override.
integrationPattern?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Service
(optional, default: FIRE_AND_FORGET)
The service integration pattern indicates different ways to call RunTask in ECS.
The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN.
placementConstraints?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Placement
[]
(optional, default: No constraints)
Placement constraints.
placementStrategies?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Placement
[]
(optional, default: No strategies)
Placement strategies.
securityGroup?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
ISecurity
(optional, default: A new security group is created)
Existing security group to use for the task's ENIs.
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
subnets?
⚠️ Deprecated: use EcsRunTask
and EcsRunTaskProps
Type:
Subnet
(optional, default: Private subnets)
In what subnets to place the task's ENIs.
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)