Skip to content

Commit

Permalink
feat(apigatewayv2): stage support detailedMetricsEnabled property (#…
Browse files Browse the repository at this point in the history
…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*
  • Loading branch information
phuhung273 authored Feb 7, 2025
1 parent 1c98881 commit 0abcacf
Show file tree
Hide file tree
Showing 20 changed files with 221 additions and 118 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"Ref": "HttpApiF5A9A8A7"
},
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 1000,
"ThrottlingRateLimit": 1000
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ new apigw.HttpStage(stack, 'HttpStageWithProperties', {
rateLimit: 1000,
burstLimit: 1000,
},
detailedMetricsEnabled: true,
description: 'My Stage',
});

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Ref": "WebSocketApi34BCF99B"
},
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 1000,
"ThrottlingRateLimit": 1000
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ new apigw.WebSocketStage(stack, 'WebSocketStage', {
rateLimit: 1000,
burstLimit: 1000,
},
detailedMetricsEnabled: true,
description: 'My Stage',
});

Expand Down
19 changes: 19 additions & 0 deletions packages/aws-cdk-lib/aws-apigatewayv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,22 @@ const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi',{
apiKeySelectionExpression: apigwv2.WebSocketApiKeySelectionExpression.HEADER_X_API_KEY,
});
```

## Common Config
Common config for both HTTP API and WebSocket API

### Route Settings
Represents a collection of route settings.

```ts
declare const api: apigwv2.HttpApi;

new apigwv2.HttpStage(this, 'Stage', {
httpApi: api,
throttle: {
rateLimit: 1000,
burstLimit: 1000,
},
detailedMetricsEnabled: true,
});
```
Loading

0 comments on commit 0abcacf

Please sign in to comment.