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 Summary
Modifier and TypeMethodDescriptionbuild()static GatewayResponse.BuilderresponseHeaders(Map<String, String> responseHeaders) Custom headers parameters for response.Rest api resource to target.statusCode(String statusCode) Http status code for response.Custom templates to get mapped as response.type(ResponseType type) Response type to associate with gateway response.
-
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
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
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
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
Rest api resource to target.- Parameters:
restApi- Rest api resource to target. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GatewayResponse>- Returns:
- a newly built instance of
GatewayResponse.
-