interface EcsRunTaskJsonataProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.StepFunctions.Tasks.EcsRunTaskJsonataProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#EcsRunTaskJsonataProps |
![]() | software.amazon.awscdk.services.stepfunctions.tasks.EcsRunTaskJsonataProps |
![]() | aws_cdk.aws_stepfunctions_tasks.EcsRunTaskJsonataProps |
![]() | aws-cdk-lib » aws_stepfunctions_tasks » EcsRunTaskJsonataProps |
Properties for ECS Tasks using JSONata.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
declare const assign: any;
declare const cluster: ecs.Cluster;
declare const containerDefinition: ecs.ContainerDefinition;
declare const ecsLaunchTarget: stepfunctions_tasks.IEcsLaunchTarget;
declare const outputs: any;
declare const securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const taskDefinition: ecs.TaskDefinition;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const ecsRunTaskJsonataProps: stepfunctions_tasks.EcsRunTaskJsonataProps = {
cluster: cluster,
launchTarget: ecsLaunchTarget,
taskDefinition: taskDefinition,
// the properties below are optional
assign: {
assignKey: assign,
},
assignPublicIp: false,
comment: 'comment',
containerOverrides: [{
containerDefinition: containerDefinition,
// the properties below are optional
command: ['command'],
cpu: 123,
environment: [{
name: 'name',
value: 'value',
}],
memoryLimit: 123,
memoryReservation: 123,
}],
cpu: 'cpu',
credentials: {
role: taskRole,
},
enableExecuteCommand: false,
heartbeat: cdk.Duration.minutes(30),
heartbeatTimeout: timeout,
integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
memoryMiB: 'memoryMiB',
outputs: outputs,
propagatedTagSource: ecs.PropagatedTagSource.SERVICE,
queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
revisionNumber: 123,
securityGroups: [securityGroup],
stateName: 'stateName',
subnets: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnets: [subnet],
subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
},
taskTimeout: timeout,
timeout: cdk.Duration.minutes(30),
};
Properties
Name | Type | Description |
---|---|---|
cluster | ICluster | The ECS cluster to run the task on. |
launch | IEcs | An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. |
task | Task | [disable-awslint:ref-via-interface] Task Definition used for running tasks in the service. |
assign? | { [string]: any } | Workflow variables to store in this step. |
assign | boolean | Assign public IP addresses to each task. |
comment? | string | A comment describing this state. |
container | Container [] | Container setting overrides. |
cpu? | string | Cpu setting override. |
credentials? | Credentials | Credentials for an IAM Role that the State Machine assumes for executing the task. |
enable | boolean | Whether ECS Exec should be enabled. |
heartbeat? | Duration | Timeout for the heartbeat. |
heartbeat | Timeout | Timeout for the heartbeat. |
integration | Integration | AWS Step Functions integrates with services directly in the Amazon States Language. |
memory | string | Memory setting override. |
outputs? | any | Used to specify and transform output from the state. |
propagated | Propagated | Specifies whether to propagate the tags from the task definition to the task. |
query | Query | The name of the query language used by the state. |
revision | number | The revision number of ECS task definition family. |
security | ISecurity [] | Existing security groups to use for the tasks. |
state | string | Optional name for this state. |
subnets? | Subnet | Subnets to place the task's ENIs. |
task | Timeout | Timeout for the task. |
timeout? | Duration | Timeout for the task. |
cluster
Type:
ICluster
The ECS cluster to run the task on.
launchTarget
Type:
IEcs
An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted.
See also: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
taskDefinition
Type:
Task
[disable-awslint:ref-via-interface] 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 If you want to run a RunTask with an imported task definition, consider using CustomState
assign?
Type:
{ [string]: any }
(optional, default: Not assign variables)
Workflow variables to store in this step.
Using workflow variables, you can store data in a step and retrieve that data in future steps.
See also: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html
assignPublicIp?
Type:
boolean
(optional, default: false)
Assign public IP addresses to each task.
comment?
Type:
string
(optional, default: No comment)
A comment describing this state.
containerOverrides?
Type:
Container
[]
(optional, default: No overrides)
Container setting overrides.
Specify the container to use and the overrides to apply.
cpu?
Type:
string
(optional, default: No override)
Cpu setting override.
See also: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
credentials?
Type:
Credentials
(optional, default: None (Task is executed using the State Machine's execution role))
Credentials for an IAM Role that the State Machine assumes for executing the task.
This enables cross-account resource invocations.
See also: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
enableExecuteCommand?
Type:
boolean
(optional, default: false)
Whether ECS Exec should be enabled.
heartbeat?
⚠️ Deprecated: use heartbeatTimeout
Type:
Duration
(optional, default: None)
Timeout for the heartbeat.
heartbeatTimeout?
Type:
Timeout
(optional, default: None)
Timeout for the heartbeat.
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
integrationPattern?
Type:
Integration
(optional, default: IntegrationPattern.REQUEST_RESPONSE
for most tasks.
IntegrationPattern.RUN_JOB
for the following exceptions:
BatchSubmitJob
, EmrAddStep
, EmrCreateCluster
, EmrTerminationCluster
, and EmrContainersStartJobRun
.)
AWS Step Functions integrates with services directly in the Amazon States Language.
You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.
See also: https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
memoryMiB?
Type:
string
(optional, default: No override)
Memory setting override.
See also: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
outputs?
Type:
any
(optional, default: $states.result or $states.errorOutput)
Used to specify and transform output from the state.
When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.
See also: https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html
propagatedTagSource?
Type:
Propagated
(optional, default: No tags are propagated.)
Specifies whether to propagate the tags from the task definition to the task.
An error will be received if you specify the SERVICE option when running a task.
queryLanguage?
Type:
Query
(optional, default: JSONPath)
The name of the query language used by the state.
If the state does not contain a queryLanguage
field,
then it will use the query language specified in the top-level queryLanguage
field.
revisionNumber?
Type:
number
(optional, default: '$latest')
The revision number of ECS task definition family.
securityGroups?
Type:
ISecurity
[]
(optional, default: A new security group is created)
Existing security groups to use for the tasks.
stateName?
Type:
string
(optional, default: The construct ID will be used as state name)
Optional name for this state.
subnets?
Type:
Subnet
(optional, default: Public subnets if assignPublicIp is set. Private subnets otherwise.)
Subnets to place the task's ENIs.
taskTimeout?
Type:
Timeout
(optional, default: None)
Timeout for the task.
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
timeout?
⚠️ Deprecated: use taskTimeout
Type:
Duration
(optional, default: None)
Timeout for the task.