CallAwsServiceCrossRegionProps Struct
Properties for calling an AWS service's API action from your state machine across regions.
Example
declare const myBucket: s3.Bucket;
const getObject = new tasks.CallAwsServiceCrossRegion(this, 'GetObject', {
region: 'ap-northeast-1',
service: 's3',
action: 'getObject',
parameters: {
Bucket: myBucket.bucketName,
Key: sfn.JsonPath.stringAt('$.key')
},
iamResources: [myBucket.arnForObjects('*')],
});
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#May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
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.
May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
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'
May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
resultSelector{ [key: string]: any }result_selectortyping.Mapping[str, Any]resultSelectorMap<String, Object>ResultSelectorIDictionary<string, object>ResultSelector*map[string]interface{}= None#You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
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