CallAwsServiceCrossRegionJsonataProps Struct
Properties for calling an AWS service's API action using JSONata from your state machine across regions.
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_iam as iam } 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 outputs: any;
declare const parameters: any;
declare const policyStatement: iam.PolicyStatement;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const callAwsServiceCrossRegionJsonataProps: stepfunctions_tasks.CallAwsServiceCrossRegionJsonataProps = {
action: 'action',
iamResources: ['iamResources'],
region: 'region',
service: 'service',
// the properties below are optional
additionalIamStatements: [policyStatement],
assign: {
assignKey: assign,
},
comment: 'comment',
credentials: {
role: taskRole,
},
endpoint: 'endpoint',
heartbeat: cdk.Duration.minutes(30),
heartbeatTimeout: timeout,
iamAction: 'iamAction',
integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
outputs: outputs,
parameters: {
parametersKey: parameters,
},
queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
retryOnServiceExceptions: false,
stateName: 'stateName',
taskTimeout: timeout,
timeout: cdk.Duration.minutes(30),
};
Properties
Use camelCase.
additionalIamStatementsPolicyStatement[]additional_iam_statementstyping.List[PolicyStatement]additionalIamStatementsList<PolicyStatement>AdditionalIamStatementsPolicyStatement[]AdditionalIamStatements*[]PolicyStatement= no additional statements are add…#Use in the case where the call requires more than a single statement to be executed, e.g. rekognition:detectLabels requires also S3 permissions to read the object on which it must act.
default
Default: no additional statements are added
assign{ [key: string]: any }assigntyping.Mapping[str, Any]assignMap<String, Object>AssignIDictionary<string, object>Assign*map[string]interface{}= Not assign variables#Using workflow variables, you can store data in a step and retrieve that data in future steps.
credentialsCredentialscredentialsCredentialscredentialsCredentialsCredentialsCredentialsCredentialsCredentials= None (Task is executed using the…#This enables cross-account resource invocations.
default
Default: None (Task is executed using the State Machine's execution role)
endpointstringendpointstrendpointStringEndpointstringEndpoint*string= Do not override API endpoint.#notes
Be aware that if you set this to a value from the Step Functions state (e.g. sfn.JsonPath.stringAt('$.endpoint')), the endpoint is controlled at runtime by whoever can start the state machine execution. This could allow them to redirect the authenticated AWS API call to a server they control, allowing them to intercept and replay that specific API call.
heartbeatDurationheartbeatDurationheartbeatDurationHeartbeatDurationHeartbeatDuration= Nonedeprecated#heartbeatTimeoutTimeoutheartbeat_timeoutTimeoutheartbeatTimeoutTimeoutHeartbeatTimeoutTimeoutHeartbeatTimeoutTimeout= None#[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
By default the action for this IAM statement will be service:action.
Use in the case where the IAM action name does not match with the API service/action name, e.g. s3:ListBuckets requires s3:ListAllMyBuckets.
iamResourcesstring[]iam_resourcestyping.List[str]iamResourcesList<String>IamResourcesstring[]IamResources*[]*stringrequired#integrationPatternIntegrationPatternintegration_patternIntegrationPatternintegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPattern= `IntegrationPattern.REQUEST_RESP…#You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.
default
Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.
outputsanyoutputsAnyoutputsObjectOutputsobjectOutputsinterface{}= $states.result or $states.errorO…#notes · default
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.
Default: $states.result or $states.errorOutput
parameters{ [key: string]: any }parameterstyping.Mapping[str, Any]parametersMap<String, Object>ParametersIDictionary<string, object>Parameters*map[string]interface{}= no parameters#queryLanguageQueryLanguagequery_languageQueryLanguagequeryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguage= JSONPath#If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.
example
'us-east-1'
retryOnServiceExceptionsbooleanretry_on_service_exceptionsboolretryOnServiceExceptionsBooleanRetryOnServiceExceptionsboolRetryOnServiceExceptions*bool= true#This handles Lambda.ServiceException, Lambda.AWSLambdaException, Lambda.SdkClientException, and Lambda.ClientExecutionTimeoutException with an interval of 2 seconds, a back-off rate of 2 and 6 maximum attempts.
example
's3'
stateNamestringstate_namestrstateNameStringStateNamestringStateName*string= The construct ID will be used as…#default
Default: The construct ID will be used as state name
[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface