Class AwsSdkCall.Builder

java.lang.Object
software.amazon.awscdk.customresources.AwsSdkCall.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AwsSdkCall>
Enclosing interface:
AwsSdkCall

@Stability(Stable) public static final class AwsSdkCall.Builder extends Object implements software.amazon.jsii.Builder<AwsSdkCall>
A builder for AwsSdkCall
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • action

      @Stability(Stable) public AwsSdkCall.Builder action(String action)
      Sets the value of AwsSdkCall.getAction()
      Parameters:
      action - The service action to call. This parameter is required. This is the name of an AWS API call, in one of the following forms:

      • An API call name as found in the API Reference documentation (GetObject)
      • The API call name starting with a lowercase letter (getObject)
      • The AWS SDK for JavaScript v3 command class name (GetObjectCommand)
      Returns:
      this
    • service

      @Stability(Stable) public AwsSdkCall.Builder service(String service)
      Sets the value of AwsSdkCall.getService()
      Parameters:
      service - The service to call. This parameter is required. This is the name of an AWS service, in one of the following forms:

      • An AWS SDK for JavaScript v3 package name (@aws-sdk/client-api-gateway)
      • An AWS SDK for JavaScript v3 client name (api-gateway)
      • An AWS SDK for JavaScript v2 constructor name (APIGateway)
      • A lowercase AWS SDK for JavaScript v2 constructor name (apigateway)
      Returns:
      this
    • apiVersion

      @Stability(Stable) public AwsSdkCall.Builder apiVersion(String apiVersion)
      Sets the value of AwsSdkCall.getApiVersion()
      Parameters:
      apiVersion - API version to use for the service.
      Returns:
      this
    • assumedRoleArn

      @Stability(Stable) public AwsSdkCall.Builder assumedRoleArn(String assumedRoleArn)
      Parameters:
      assumedRoleArn - 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. Region controls where assumeRole call is made.

      Example for Route53 / associateVPCWithHostedZone

      Returns:
      this
    • ignoreErrorCodesMatching

      @Stability(Stable) public AwsSdkCall.Builder ignoreErrorCodesMatching(String ignoreErrorCodesMatching)
      Parameters:
      ignoreErrorCodesMatching - 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.
      Returns:
      this
    • logging

      @Stability(Stable) public AwsSdkCall.Builder logging(Logging logging)
      Sets the value of AwsSdkCall.getLogging()
      Parameters:
      logging - A property used to configure logging during lambda function execution. Note: The default Logging configuration is all. This configuration will enable logging on all logged data in the lambda handler. This includes:

      • The event object that is received by the lambda handler
      • The response received after making a API call
      • The response object that the lambda handler will return
      • SDK versioning information
      • Caught and uncaught errors
      Returns:
      this
    • outputPaths

      @Stability(Stable) public AwsSdkCall.Builder outputPaths(List<String> outputPaths)
      Sets the value of AwsSdkCall.getOutputPaths()
      Parameters:
      outputPaths - 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']

      Returns:
      this
    • parameters

      @Stability(Stable) public AwsSdkCall.Builder parameters(Object parameters)
      Sets the value of AwsSdkCall.getParameters()
      Parameters:
      parameters - The parameters for the service action.
      Returns:
      this
    • physicalResourceId

      @Stability(Stable) public AwsSdkCall.Builder physicalResourceId(PhysicalResourceId physicalResourceId)
      Parameters:
      physicalResourceId - The physical resource id of the custom resource for this call. Mandatory for onCreate call. In onUpdate, you can omit this to passthrough it from request.
      Returns:
      this
    • region

      @Stability(Stable) public AwsSdkCall.Builder region(String region)
      Sets the value of AwsSdkCall.getRegion()
      Parameters:
      region - 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.
      Returns:
      this
    • build

      @Stability(Stable) public AwsSdkCall build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<AwsSdkCall>
      Returns:
      a new instance of AwsSdkCall
      Throws:
      NullPointerException - if any required attribute was not provided