Skip to content

Commit abd4734

Browse files
authored
Merge branch 'main' into fix-34099
2 parents 53b2460 + baa4a5c commit abd4734

File tree

52 files changed

+7270
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7270
-164
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"Resources": {
3+
"MyLogGroup5C0DAD85": {
4+
"Type": "AWS::Logs::LogGroup",
5+
"Properties": {
6+
"RetentionInDays": 731
7+
},
8+
"UpdateReplacePolicy": "Retain",
9+
"DeletionPolicy": "Retain"
10+
},
311
"HttpApiF5A9A8A7": {
412
"Type": "AWS::ApiGatewayV2::Api",
513
"Properties": {
@@ -10,6 +18,15 @@
1018
"HttpStageWithPropertiesC0AABA83": {
1119
"Type": "AWS::ApiGatewayV2::Stage",
1220
"Properties": {
21+
"AccessLogSettings": {
22+
"DestinationArn": {
23+
"Fn::GetAtt": [
24+
"MyLogGroup5C0DAD85",
25+
"Arn"
26+
]
27+
},
28+
"Format": "{\"extendedRequestId\":\"$context.extendedRequestId\",\"requestTime\":\"$context.requestTime\"}"
29+
},
1330
"ApiId": {
1431
"Ref": "HttpApiF5A9A8A7"
1532
},

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

Lines changed: 20 additions & 0 deletions
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/awscdkawsapigatewayv2httpstagetestDefaultTestDeployAssert66182A52.template.json

Lines changed: 36 additions & 0 deletions
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/cdk.out

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 7 deletions
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

Lines changed: 64 additions & 3 deletions
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

Lines changed: 1 addition & 111 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
#!/usr/bin/env node
2+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
23
import * as cdk from 'aws-cdk-lib';
3-
import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
4+
import * as apigwv2 from 'aws-cdk-lib/aws-apigatewayv2';
5+
import * as apigw from 'aws-cdk-lib/aws-apigateway';
6+
import * as logs from 'aws-cdk-lib/aws-logs';
47

58
const app = new cdk.App();
69
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-http-stage');
710

8-
const httpApi = new apigw.HttpApi(stack, 'HttpApi', { createDefaultStage: false });
9-
new apigw.HttpStage(stack, 'HttpStageWithProperties', {
11+
const testLogGroup = new logs.LogGroup(stack, 'MyLogGroup');
12+
13+
const httpApi = new apigwv2.HttpApi(stack, 'HttpApi', { createDefaultStage: false });
14+
new apigwv2.HttpStage(stack, 'HttpStageWithProperties', {
1015
httpApi,
1116
throttle: {
1217
rateLimit: 1000,
1318
burstLimit: 1000,
1419
},
1520
detailedMetricsEnabled: true,
1621
description: 'My Stage',
22+
accessLogSettings: {
23+
destination: new apigwv2.LogGroupLogDestination(testLogGroup),
24+
format: apigw.AccessLogFormat.custom(JSON.stringify({
25+
extendedRequestId: apigw.AccessLogField.contextExtendedRequestId(),
26+
requestTime: apigw.AccessLogField.contextRequestTime(),
27+
})),
28+
},
1729
});
1830

19-
app.synth();
31+
new IntegTest(app, 'aws-cdk-aws-apigatewayv2-http-stage-test', {
32+
testCases: [stack],
33+
});

0 commit comments

Comments
 (0)