Class GatewayResponse
Configure the response received by clients, produced from the API Gateway backend.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayResponse : Resource, IGatewayResponse, IResource, IGatewayResponseRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class GatewayResponse Inherits Resource Implements IGatewayResponse, IResource, IGatewayResponseRef, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::ApiGateway::GatewayResponse
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 gatewayResponse = new GatewayResponse(this, "MyGatewayResponse", 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
| GatewayResponse(Construct, string, IGatewayResponseProps) | Configure the response received by clients, produced from the API Gateway backend. |
Properties
| GatewayResponseRef | A reference to a GatewayResponse resource. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromGatewayResponseId(Construct, string, string) | Reference an existing GatewayResponse given a gateway response ID. |
Constructors
GatewayResponse(Construct, string, IGatewayResponseProps)
Configure the response received by clients, produced from the API Gateway backend.
public GatewayResponse(Construct scope, string id, IGatewayResponseProps props)
Parameters
- scope Construct
- id string
- props IGatewayResponseProps
Remarks
Resource: AWS::ApiGateway::GatewayResponse
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 gatewayResponse = new GatewayResponse(this, "MyGatewayResponse", 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
GatewayResponseRef
A reference to a GatewayResponse resource.
public virtual IGatewayResponseReference GatewayResponseRef { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::GatewayResponse
ExampleMetadata: fixture=_generated
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::GatewayResponse
ExampleMetadata: fixture=_generated
Methods
FromGatewayResponseId(Construct, string, string)
Reference an existing GatewayResponse given a gateway response ID.
public static IGatewayResponse FromGatewayResponseId(Construct scope, string id, string gatewayResponseId)
Parameters
Returns
Remarks
Resource: AWS::ApiGateway::GatewayResponse
ExampleMetadata: fixture=_generated