Interface CallAwsServiceCrossRegionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
All Known Implementing Classes:
CallAwsServiceCrossRegionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:24.351Z") @Stability(Stable) public interface CallAwsServiceCrossRegionProps extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for calling an AWS service's API action from your state machine across regions.

Example:

 Bucket myBucket;
 CallAwsServiceCrossRegion getObject = CallAwsServiceCrossRegion.Builder.create(this, "GetObject")
         .region("ap-northeast-1")
         .service("s3")
         .action("getObject")
         .parameters(Map.of(
                 "Bucket", myBucket.getBucketName(),
                 "Key", JsonPath.stringAt("$.key")))
         .iamResources(List.of(myBucket.arnForObjects("*")))
         .build();
 
  • Method Details

    • getAction

      @Stability(Stable) @NotNull String getAction()
      The API action to call.

      Use camelCase.

    • getIamResources

      @Stability(Stable) @NotNull List<String> getIamResources()
      The resources for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call.
    • getRegion

      @Stability(Stable) @NotNull String getRegion()
      The AWS region to call this AWS API for.

      Example:

       "us-east-1";
       
    • getService

      @Stability(Stable) @NotNull String getService()
      The AWS service to call in AWS SDK for JavaScript v3 format.

      Example:

       "s3";
       

      See Also:
    • getAdditionalIamStatements

      @Stability(Stable) @Nullable default List<PolicyStatement> getAdditionalIamStatements()
      Additional IAM statements that will be added to the state machine role's policy.

      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: - no additional statements are added

    • getEndpoint

      @Stability(Stable) @Nullable default String getEndpoint()
      The AWS API endpoint.

      Default: Do not override API endpoint.

    • getIamAction

      @Stability(Stable) @Nullable default String getIamAction()
      The action for the IAM statement that will be added to the Lambda function role's policy to allow the state machine to make the API call.

      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.

      Default: - service:action

    • getParameters

      @Stability(Stable) @Nullable default Map<String,Object> getParameters()
      Parameters for the API action call in AWS SDK for JavaScript v3 format.

      Default: - no parameters

    • getRetryOnServiceExceptions

      @Stability(Stable) @Nullable default Boolean getRetryOnServiceExceptions()
      Whether to retry on the backend Lambda service exceptions.

      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.

      Default: true

      See Also:
    • builder

      @Stability(Stable) static CallAwsServiceCrossRegionProps.Builder builder()
      Returns:
      a CallAwsServiceCrossRegionProps.Builder of CallAwsServiceCrossRegionProps