Class GatewayResponseProps
Properties for a new gateway response.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayResponseProps : IGatewayResponseProps, IGatewayResponseOptions
Syntax (vb)
Public Class GatewayResponseProps 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
GatewayResponseProps() | Properties for a new gateway response. |
Properties
ResponseHeaders | Custom headers parameters for response. |
RestApi | Rest api resource to target. |
StatusCode | Http status code for response. |
Templates | Custom templates to get mapped as response. |
Type | Response type to associate with gateway response. |
Constructors
GatewayResponseProps()
Properties for a new gateway response.
public GatewayResponseProps()
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" }
}
};
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
Remarks
ExampleMetadata: fixture=_generated
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; }