TaskStateBaseOptions Struct
Base options for all task states.
Example
ts
// 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_stepfunctions as stepfunctions } from 'aws-cdk-lib';
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const taskStateBaseOptions: stepfunctions.TaskStateBaseOptions = {
credentials: {
role: taskRole,
},
heartbeat: cdk.Duration.minutes(30),
heartbeatTimeout: timeout,
integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
taskTimeout: timeout,
timeout: cdk.Duration.minutes(30),
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_stepfunctions as stepfunctions
# task_role: stepfunctions.TaskRole
# timeout: stepfunctions.Timeout
task_state_base_options = stepfunctions.TaskStateBaseOptions(
credentials=stepfunctions.Credentials(
role=task_role
),
heartbeat=cdk.Duration.minutes(30),
heartbeat_timeout=timeout,
integration_pattern=stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
task_timeout=timeout,
timeout=cdk.Duration.minutes(30)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.stepfunctions.*;
TaskRole taskRole;
Timeout timeout;
TaskStateBaseOptions taskStateBaseOptions = TaskStateBaseOptions.builder()
.credentials(Credentials.builder()
.role(taskRole)
.build())
.heartbeat(Duration.minutes(30))
.heartbeatTimeout(timeout)
.integrationPattern(IntegrationPattern.REQUEST_RESPONSE)
.taskTimeout(timeout)
.timeout(Duration.minutes(30))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.StepFunctions;
TaskRole taskRole;
Timeout timeout;
var taskStateBaseOptions = new TaskStateBaseOptions {
Credentials = new Credentials {
Role = taskRole
},
Heartbeat = Duration.Minutes(30),
HeartbeatTimeout = timeout,
IntegrationPattern = IntegrationPattern.REQUEST_RESPONSE,
TaskTimeout = timeout,
Timeout = Duration.Minutes(30)
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var taskRole TaskRole
var timeout Timeout
taskStateBaseOptions := &TaskStateBaseOptions{
Credentials: &Credentials{
Role: taskRole,
},
Heartbeat: cdk.Duration_Minutes(jsii.Number(30)),
HeartbeatTimeout: timeout,
IntegrationPattern: awscdk.Aws_stepfunctions.IntegrationPattern_REQUEST_RESPONSE,
TaskTimeout: timeout,
Timeout: cdk.Duration_*Minutes(jsii.Number(30)),
}
Properties
credentialsoptionalCredentialscredentialsoptionalCredentialscredentialsoptionalCredentialsCredentialsoptionalCredentialsCredentialsoptionalCredentials#Credentials for an IAM Role that the State Machine assumes for executing the task.
Default: None (Task is executed using the State Machine's execution role)
This enables cross-account resource invocations.
heartbeatoptionalDurationheartbeatoptionalDurationheartbeatoptionalDurationHeartbeatoptionalDurationHeartbeatoptionalDuration= Nonedeprecated#use `heartbeatTimeout`
heartbeatTimeoutoptionalTimeoutheartbeat_timeoutoptionalTimeoutheartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeout= None#Timeout for the heartbeat.
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
integrationPatternoptionalIntegrationPatternintegration_patternoptionalIntegrationPatternintegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPattern#AWS Step Functions integrates with services directly in the Amazon States Language.
Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.
You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.