Class GatewayResponseProps
Properties for a new gateway response.
Inheritance
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayResponseProps : Object, IGatewayResponseProps, IGatewayResponseOptions
Syntax (vb)
Public Class GatewayResponseProps
Inherits Object
Implements IGatewayResponseProps, IGatewayResponseOptions
Remarks
ExampleMetadata: fixture=_generated
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" }
}
};
Synopsis
Constructors
Gateway |
Properties
Response |
Custom headers parameters for response. |
Rest |
Rest api resource to target. |
Status |
Http status code for response. |
Templates | Custom templates to get mapped as response. |
Type | Response type to associate with gateway response. |
Constructors
GatewayResponseProps()
public GatewayResponseProps()
Properties
ResponseHeaders
Custom headers parameters for response.
public IDictionary<string, string> ResponseHeaders { get; set; }
Property Value
System.
Remarks
Default: - no headers
RestApi
StatusCode
Http status code for response.
public string StatusCode { get; set; }
Property Value
System.
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
System.
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; }
Property Value