AwsServerlessApiGatewayRestArgs
interface AwsServerlessApiGatewayRestArgs {
customDomain?: AwsServerlessApiGatewayRestCustomDomainArgs;
description?: Input<string>;
identity: string;
routes?: Record<string, AwsServerlessApiGatewayRestRouteArgs>;
stageName?: Input<string>;
tags?: Input<Record<string, Input<string>>>;
wafAttachment?: AwsApiGatewayWafAttachmentArgs;
}Optional API Gateway REST capability configuration.
Example
CODE
const apiGatewayRest: AwsServerlessApiGatewayRestArgs = {
identity: 'orders-rest-api',
stageName: 'v1',
routes: {
'GET /health': { functionKey: 'api' },
'POST /payments': { functionKey: 'api' },
},
};Properties
customDomain: AwsServerlessApiGatewayRestCustomDomainArgs
Optional REST custom-domain settings passed through to API Gateway.
description: Input<string>
Optional API description.
identity: string
Stable logical-only identity passed to the composed AwsApiGateway REST component.
routes: Record<string, AwsServerlessApiGatewayRestRouteArgs>
Route definitions keyed by raw <METHOD> <path> route identity. Must contain at least one route unless customDomain.mappingTarget is provided.
stageName: Input<string>
Stage name. Defaults to v1.
tags: Input<Record<string, Input<string>>>
Optional tags merged with default and component-level tags.
wafAttachment: AwsApiGatewayWafAttachmentArgs
Optional WAFv2 web ACL attachment for the effective REST API stage.