Interface AwsSdkCall

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AwsSdkCall.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.049Z") @Stability(Stable) public interface AwsSdkCall extends software.amazon.jsii.JsiiSerializable
An AWS SDK call.

Example:

 AwsCustomResource awsCustom = AwsCustomResource.Builder.create(this, "aws-custom")
         .onCreate(AwsSdkCall.builder()
                 .service("...")
                 .action("...")
                 .parameters(Map.of(
                         "text", "..."))
                 .physicalResourceId(PhysicalResourceId.of("..."))
                 .build())
         .onUpdate(AwsSdkCall.builder()
                 .service("...")
                 .action("...")
                 .parameters(Map.of(
                         "text", "...",
                         "resourceId", new PhysicalResourceIdReference()))
                 .build())
         .policy(AwsCustomResourcePolicy.fromSdkCalls(SdkCallsPolicyOptions.builder()
                 .resources(AwsCustomResourcePolicy.ANY_RESOURCE)
                 .build()))
         .build();
 
  • Method Details

    • getAction

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

      See Also:
    • getService

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

      See Also:
    • getApiVersion

      @Stability(Stable) @Nullable default String getApiVersion()
      API version to use for the service.

      Default: - use latest available API version

      See Also:
    • getAssumedRoleArn

      @Stability(Stable) @Nullable default String getAssumedRoleArn()
      Used for running the SDK calls in underlying lambda with a different role Can be used primarily for cross-account requests to for example connect hostedzone with a shared vpc.

      Example for Route53 / associateVPCWithHostedZone

      Default: - run without assuming role

    • getIgnoreErrorCodesMatching

      @Stability(Stable) @Nullable default String getIgnoreErrorCodesMatching()
      The regex pattern to use to catch API errors.

      The code property of the Error object will be tested against this pattern. If there is a match an error will not be thrown.

      Default: - do not catch errors

    • getOutputPath

      @Stability(Deprecated) @Deprecated @Nullable default String getOutputPath()
      Deprecated.
      use outputPaths instead
      (deprecated) Restrict the data returned by the custom resource to a specific path in the API response.

      Use this to limit the data returned by the custom resource if working with API calls that could potentially result in custom response objects exceeding the hard limit of 4096 bytes.

      Example for ECS / updateService: 'service.deploymentConfiguration.maximumPercent'

      Default: - return all data

    • getOutputPaths

      @Stability(Stable) @Nullable default List<String> getOutputPaths()
      Restrict the data returned by the custom resource to specific paths in the API response.

      Use this to limit the data returned by the custom resource if working with API calls that could potentially result in custom response objects exceeding the hard limit of 4096 bytes.

      Example for ECS / updateService: ['service.deploymentConfiguration.maximumPercent']

      Default: - return all data

    • getParameters

      @Stability(Stable) @Nullable default Object getParameters()
      The parameters for the service action.

      Default: - no parameters

      See Also:
    • getPhysicalResourceId

      @Stability(Stable) @Nullable default PhysicalResourceId getPhysicalResourceId()
      The physical resource id of the custom resource for this call.

      Mandatory for onCreate or onUpdate calls.

      Default: - no physical resource id

    • getRegion

      @Stability(Stable) @Nullable default String getRegion()
      The region to send service requests to.

      Note: Cross-region operations are generally considered an anti-pattern. Consider first deploying a stack in that region.

      Default: - the region where this custom resource is deployed

    • builder

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