Class GatewayResponseProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
Properties for a new gateway response.
public class GatewayResponseProps : IGatewayResponseProps, IGatewayResponseOptions
- Inheritance
-
GatewayResponseProps
- Implements
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
ResponseType responseType;
RestApi restApi;
var gatewayResponseProps = new GatewayResponseProps {
RestApi = restApi,
Type = responseType,
// the properties below are optional
ResponseHeaders = new Dictionary<string, string> {
{ "responseHeadersKey", "responseHeaders" }
},
StatusCode = "statusCode",
Templates = new Dictionary<string, string> {
{ "templatesKey", "templates" }
}
};
Remarks
ExampleMetadata: fixture=_generated
Constructors
GatewayResponseProps()
public GatewayResponseProps()
Properties
ResponseHeaders
Custom headers parameters for response.
public IDictionary<string, string>? ResponseHeaders { get; set; }
Property Value
Remarks
Default: - no headers
RestApi
Rest api resource to target.
public IRestApi RestApi { get; set; }
Property Value
StatusCode
Http status code for response.
public string? StatusCode { get; set; }
Property Value
Remarks
Default: - standard http status code for the response type.
Templates
Custom templates to get mapped as response.
public IDictionary<string, string>? Templates { get; set; }
Property Value
Remarks
Default: - Response from api will be returned without applying any transformation.
Type
Response type to associate with gateway response.
public ResponseType_ Type { get; set; }