-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(apigatewayv2): graduate to stable 🚀 (#28094)
We are excited to graduate the `@aws-cdk/aws-apigatewayv2-alpha`, `@aws-cdk/aws-apigatewayv2-authorizers-alpha`, and `@aws-cdk/aws-apigatewayv2-integrations-alpha` modules to STABLE. They now live on as: - `aws-cdk-lib/aws-apigatewayv2` - `aws-cdk-lib/aws-apigatewayv2-authorizers` - `aws-cdk-lib/aws-apigatewayv2-integrations` **Deprecated properties removed**: - `httpApiId` has been removed in `aws-apigatewayv2`. Use `apiId` instead. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
cd12ce4
commit 187f67b
Showing
227 changed files
with
63,698 additions
and
59 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/auth-handler/index.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,9 @@ | ||
/* eslint-disable no-console */ | ||
|
||
export const handler = async (event: AWSLambda.APIGatewayProxyEventV2) => { | ||
const key = event.headers['x-api-key']; | ||
|
||
return { | ||
isAuthorized: key === '123', | ||
}; | ||
}; |
19 changes: 19 additions & 0 deletions
19
...apigatewayv2-authorizers/test/http/integ.iam.js.snapshot/IntegApiGatewayV2Iam.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
244 changes: 244 additions & 0 deletions
244
...igatewayv2-authorizers/test/http/integ.iam.js.snapshot/IntegApiGatewayV2Iam.template.json
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,244 @@ | ||
{ | ||
"Resources": { | ||
"User00B015A1": { | ||
"Type": "AWS::IAM::User" | ||
}, | ||
"UserDefaultPolicy1F97781E": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "execute-api:Invoke", | ||
"Effect": "Allow", | ||
"Resource": [ | ||
{ | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":execute-api:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":", | ||
{ | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"/*/*/books/*" | ||
] | ||
] | ||
}, | ||
{ | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":execute-api:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":", | ||
{ | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"/*/*/foo" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"PolicyName": "UserDefaultPolicy1F97781E", | ||
"Users": [ | ||
{ | ||
"Ref": "User00B015A1" | ||
} | ||
] | ||
} | ||
}, | ||
"UserAccessEC42ADF7": { | ||
"Type": "AWS::IAM::AccessKey", | ||
"Properties": { | ||
"UserName": { | ||
"Ref": "User00B015A1" | ||
} | ||
} | ||
}, | ||
"HttpApiF5A9A8A7": { | ||
"Type": "AWS::ApiGatewayV2::Api", | ||
"Properties": { | ||
"Name": "HttpApi", | ||
"ProtocolType": "HTTP" | ||
} | ||
}, | ||
"HttpApiDefaultStage3EEB07D6": { | ||
"Type": "AWS::ApiGatewayV2::Stage", | ||
"Properties": { | ||
"ApiId": { | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"StageName": "$default", | ||
"AutoDeploy": true | ||
} | ||
}, | ||
"HttpApiANYfooexamplecom903F7A9F": { | ||
"Type": "AWS::ApiGatewayV2::Integration", | ||
"Properties": { | ||
"ApiId": { | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"IntegrationType": "HTTP_PROXY", | ||
"IntegrationMethod": "GET", | ||
"IntegrationUri": "https://www.example.com/", | ||
"PayloadFormatVersion": "1.0" | ||
} | ||
}, | ||
"HttpApiANYfooD178456F": { | ||
"Type": "AWS::ApiGatewayV2::Route", | ||
"Properties": { | ||
"ApiId": { | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"RouteKey": "ANY /foo", | ||
"AuthorizationType": "AWS_IAM", | ||
"Target": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"integrations/", | ||
{ | ||
"Ref": "HttpApiANYfooexamplecom903F7A9F" | ||
} | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"HttpApiANYbooksbookexamplecom5C333C98": { | ||
"Type": "AWS::ApiGatewayV2::Integration", | ||
"Properties": { | ||
"ApiId": { | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"IntegrationType": "HTTP_PROXY", | ||
"IntegrationMethod": "GET", | ||
"IntegrationUri": "https://www.example.com/", | ||
"PayloadFormatVersion": "1.0" | ||
} | ||
}, | ||
"HttpApiANYbooksbook2F78361C": { | ||
"Type": "AWS::ApiGatewayV2::Route", | ||
"Properties": { | ||
"ApiId": { | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
"RouteKey": "ANY /books/{book}", | ||
"AuthorizationType": "AWS_IAM", | ||
"Target": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"integrations/", | ||
{ | ||
"Ref": "HttpApiANYbooksbookexamplecom5C333C98" | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"Outputs": { | ||
"API": { | ||
"Value": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"https://", | ||
{ | ||
"Ref": "HttpApiF5A9A8A7" | ||
}, | ||
".execute-api.", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
".", | ||
{ | ||
"Ref": "AWS::URLSuffix" | ||
}, | ||
"/" | ||
] | ||
] | ||
} | ||
}, | ||
"TESTACCESSKEYID": { | ||
"Value": { | ||
"Ref": "UserAccessEC42ADF7" | ||
} | ||
}, | ||
"TESTSECRETACCESSKEY": { | ||
"Value": { | ||
"Fn::GetAtt": [ | ||
"UserAccessEC42ADF7", | ||
"SecretAccessKey" | ||
] | ||
} | ||
}, | ||
"TESTREGION": { | ||
"Value": { | ||
"Ref": "AWS::Region" | ||
} | ||
} | ||
}, | ||
"Parameters": { | ||
"BootstrapVersion": { | ||
"Type": "AWS::SSM::Parameter::Value<String>", | ||
"Default": "/cdk-bootstrap/hnb659fds/version", | ||
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
} | ||
}, | ||
"Rules": { | ||
"CheckBootstrapVersion": { | ||
"Assertions": [ | ||
{ | ||
"Assert": { | ||
"Fn::Not": [ | ||
{ | ||
"Fn::Contains": [ | ||
[ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5" | ||
], | ||
{ | ||
"Ref": "BootstrapVersion" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
} | ||
] | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.iam.js.snapshot/cdk.out
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...mework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.iam.js.snapshot/integ.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.