GatewayResponseProps Struct
Properties for a new gateway response.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
declare const responseType: apigateway.ResponseType;
declare const restApi: apigateway.RestApi;
const gatewayResponseProps: apigateway.GatewayResponseProps = {
restApi: restApi,
type: responseType,
// the properties below are optional
responseHeaders: {
responseHeadersKey: 'responseHeaders',
},
statusCode: 'statusCode',
templates: {
templatesKey: 'templates',
},
};
Properties
responseHeaders{ [key: string]: string }response_headerstyping.Mapping[str, str]responseHeadersMap<String, String>ResponseHeadersIDictionary<string, string>ResponseHeaders*map[string]*string= no headers#Custom headers parameters for response.
Rest api resource to target.
statusCodestringstatus_codestrstatusCodeStringStatusCodestringStatusCode*string= standard http status code for th…#Http status code for response.
default
Default: standard http status code for the response type.
templates{ [key: string]: string }templatestyping.Mapping[str, str]templatesMap<String, String>TemplatesIDictionary<string, string>Templates*map[string]*string= Response from api will be return…#Custom templates to get mapped as response.
default
Default: Response from api will be returned without applying any transformation.
Response type to associate with gateway response.