-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-websocket-iam-authorizer
- Loading branch information
Showing
186 changed files
with
7,916 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/@aws-cdk/aws-apigateway/test/integ.restapi-metrics.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; | ||
import * as cdk from '@aws-cdk/core'; | ||
import * as integ from '@aws-cdk/integ-tests'; | ||
import * as apigw from '../lib'; | ||
|
||
const app = new cdk.App(); | ||
const stack = new cdk.Stack(app, 'restapi-metrics'); | ||
const restApi = new apigw.RestApi(stack, 'Api'); | ||
const stage = restApi.deploymentStage; | ||
const method = restApi.root.addMethod('GET'); | ||
|
||
new cloudwatch.Alarm(stack, 'RestApiAlarm', { | ||
metric: restApi.metricClientError(), | ||
evaluationPeriods: 1, | ||
threshold: 1, | ||
}); | ||
|
||
new cloudwatch.Alarm(stack, 'MethodAlarm', { | ||
metric: method.metricServerError(stage), | ||
evaluationPeriods: 1, | ||
threshold: 1, | ||
}); | ||
|
||
new cloudwatch.Alarm(stack, 'StageAlarm', { | ||
metric: stage.metricCount(), | ||
evaluationPeriods: 1, | ||
threshold: 1, | ||
}); | ||
|
||
new integ.IntegTest(app, 'MetricsTest', { | ||
testCases: [stack], | ||
}); | ||
|
||
app.synth(); |
Oops, something went wrong.