Skip to content

Commit 0abcacf

Browse files
authored
feat(apigatewayv2): stage support detailedMetricsEnabled property (#33267)
### Issue # (if applicable) Closes #33222 ### Reason for this change Missing detailedMetricsEnabled property ### Description of changes Stage support `detailedMetricsEnabled` property ### Describe any new or updated permissions being added ### Description of how you validated changes Unit + Integration test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1c98881 commit 0abcacf

20 files changed

+221
-118
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/aws-cdk-aws-apigatewayv2-http-stage.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/aws-cdk-aws-apigatewayv2-http-stage.template.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"Ref": "HttpApiF5A9A8A7"
1515
},
1616
"DefaultRouteSettings": {
17+
"DetailedMetricsEnabled": true,
1718
"ThrottlingBurstLimit": 1000,
1819
"ThrottlingRateLimit": 1000
1920
},

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/manifest.json

+14-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.js.snapshot/tree.json

+25-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/http/integ.stage.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ new apigw.HttpStage(stack, 'HttpStageWithProperties', {
1212
rateLimit: 1000,
1313
burstLimit: 1000,
1414
},
15+
detailedMetricsEnabled: true,
1516
description: 'My Stage',
1617
});
1718

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/aws-cdk-aws-apigatewayv2-websocket-stage.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/aws-cdk-aws-apigatewayv2-websocket-stage.template.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"Ref": "WebSocketApi34BCF99B"
1616
},
1717
"DefaultRouteSettings": {
18+
"DetailedMetricsEnabled": true,
1819
"ThrottlingBurstLimit": 1000,
1920
"ThrottlingRateLimit": 1000
2021
},

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/manifest.json

+14-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.js.snapshot/tree.json

+25-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2/test/websocket/integ.stage.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ new apigw.WebSocketStage(stack, 'WebSocketStage', {
1313
rateLimit: 1000,
1414
burstLimit: 1000,
1515
},
16+
detailedMetricsEnabled: true,
1617
description: 'My Stage',
1718
});
1819

packages/aws-cdk-lib/aws-apigatewayv2/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -475,3 +475,22 @@ const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi',{
475475
apiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression.HEADER_X_API_KEY,
476476
});
477477
```
478+
479+
## Common Config
480+
Common config for both HTTP API and WebSocket API
481+
482+
### Route Settings
483+
Represents a collection of route settings.
484+
485+
```ts
486+
declare const api: apigwv2.HttpApi;
487+
488+
new apigwv2.HttpStage(this, 'Stage', {
489+
httpApi: api,
490+
throttle: {
491+
rateLimit: 1000,
492+
burstLimit: 1000,
493+
},
494+
detailedMetricsEnabled: true,
495+
});
496+
```

0 commit comments

Comments
 (0)