Interface CallAwsServiceProps

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:25.401Z") @Stability(Stable) public interface CallAwsServiceProps extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for calling an AWS service's API action from your state machine.

Example:

 Bucket myBucket;
 CallAwsService getObject = CallAwsService.Builder.create(this, "GetObject")
         .service("s3")
         .action("getObject")
         .parameters(Map.of(
                 "Bucket", myBucket.getBucketName(),
                 "Key", JsonPath.stringAt("$.key")))
         .iamResources(List.of(myBucket.arnForObjects("*")))
         .build();
 

See Also:
  • 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 state machine 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.

    • getService

      @Stability(Stable) @NotNull String getService()
      The AWS service to call.

      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

    • getIamAction

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

      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.

      Use PascalCase for the parameter names.

      Default: - no parameters

    • builder

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