-
Couldn't load subscription status.
- Fork 2.4k
Description
Description:
HTTP APIs need to support RouteSettings and DefaultRouteSettings when ApiGateway releases support for these properties in HTTP APIs.
DefaultRouteSettings:
DefaultRouteSettings looks like it should be a pass-through property to CloudFormation. We will enable it as a new top-level property of the AWS::Serverless::HttpApi resource.
Example:
Resources:
HttpApi:
Type: AWS::Serverless::HttpApi
Properties:
DefaultRouteSettings:
DataTraceEnabled: ...
DetailedMetricsEnabled: ...
LoggingLevel: ...
ThrottlingBurstLimit: ...
ThrottlingRateLimit: ...RouteSettings:
These settings are set per route in an API. We will add support for the RouteSettings property in the AWS::Serverless::Api resource, so template authors can add their route settings there. We will also merge and override values in the RouteSettings property with any values in the event-level RouteSettings property for a given path.
Example:
Api Level:
Api:
Type: AWS::Serverless::HttpApi
Properties:
RouteSettings:
"/path":
DataTraceEnabled: ...
DetailedMetricsEnabled: ...
LoggingLevel: ...
ThrottlingBurstLimit: ...
ThrottlingRateLimit: ...Event Level:
Anything added at the event level will be merged with the API-level configuration, if present. In case of collisions, the event-level configuration will override the api-level configuration.
Events:
HttpApiEvent:
Type: HttpApi
Properties:
Method: get
Path: /path
RouteSettings: # adds this to RouteSettings in the `AWS::ApiGatewayV2::Stage` resource under the Path/Method this event is configured for.
DataTraceEnabled: ...
DetailedMetricsEnabled: ...
LoggingLevel: ...
ThrottlingBurstLimit: ...
ThrottlingRateLimit: ...