Class GatewayResponse.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.GatewayResponse.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<GatewayResponse>
Enclosing class:
GatewayResponse

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

    • create

      @Stability(Stable) public static GatewayResponse.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of GatewayResponse.Builder.
    • type

      @Stability(Stable) public GatewayResponse.Builder type(ResponseType type)
      Response type to associate with gateway response.

      Parameters:
      type - Response type to associate with gateway response. This parameter is required.
      Returns:
      this
      See Also:
    • responseHeaders

      @Stability(Stable) public GatewayResponse.Builder responseHeaders(Map<String,String> responseHeaders)
      Custom headers parameters for response.

      Default: - no headers

      Parameters:
      responseHeaders - Custom headers parameters for response. This parameter is required.
      Returns:
      this
    • statusCode

      @Stability(Stable) public GatewayResponse.Builder statusCode(String statusCode)
      Http status code for response.

      Default: - standard http status code for the response type.

      Parameters:
      statusCode - Http status code for response. This parameter is required.
      Returns:
      this
    • templates

      @Stability(Stable) public GatewayResponse.Builder templates(Map<String,String> templates)
      Custom templates to get mapped as response.

      Default: - Response from api will be returned without applying any transformation.

      Parameters:
      templates - Custom templates to get mapped as response. This parameter is required.
      Returns:
      this
    • restApi

      @Stability(Stable) public GatewayResponse.Builder restApi(IRestApi restApi)
      Rest api resource to target.

      Parameters:
      restApi - Rest api resource to target. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public GatewayResponse build()
      Specified by:
      build in interface software.amazon.jsii.Builder<GatewayResponse>
      Returns:
      a newly built instance of GatewayResponse.