interface RunEcsFargateTaskProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.Tasks.RunEcsFargateTaskProps |
Java | software.amazon.awscdk.services.stepfunctions.tasks.RunEcsFargateTaskProps |
Python | aws_cdk.aws_stepfunctions_tasks.RunEcsFargateTaskProps |
TypeScript (source) | @aws-cdk/aws-stepfunctions-tasks » RunEcsFargateTaskProps |
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Properties to define an ECS service.
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 securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const taskDefinition: ecs.TaskDefinition;
const runEcsFargateTaskProps: stepfunctions_tasks.RunEcsFargateTaskProps = {
cluster: cluster,
taskDefinition: taskDefinition,
// the properties below are optional
assignPublicIp: false,
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,
platformVersion: ecs.FargatePlatformVersion.LATEST,
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. |
assign | boolean | Assign public IP addresses to each task. |
container | Container [] | Container setting overrides. |
integration | Service | The service integration pattern indicates different ways to call RunTask in ECS. |
platform | Fargate | Fargate platform version to run this service on. |
security | ISecurity | Existing security group to use for the tasks. |
subnets? | Subnet | In what subnets to place the task's ENIs. |
cluster
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Type:
ICluster
The topic to run the task on.
taskDefinition
⚠️ Deprecated: replaced by 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
assignPublicIp?
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Type:
boolean
(optional, default: false)
Assign public IP addresses to each task.
containerOverrides?
⚠️ Deprecated: replaced by 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: replaced by 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.
platformVersion?
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Type:
Fargate
(optional, default: Latest)
Fargate platform version to run this service on.
Unless you have specific compatibility requirements, you don't need to specify this.
securityGroup?
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Type:
ISecurity
(optional, default: A new security group is created)
Existing security group to use for the tasks.
subnets?
⚠️ Deprecated: replaced by EcsRunTask
and EcsRunTaskProps
Type:
Subnet
(optional, default: Private subnet if assignPublicIp, public subnets otherwise)
In what subnets to place the task's ENIs.