Created
February 1, 2020 06:11
-
-
Save asishrs/6b0de41f031c215452d74f12d8d93f45 to your computer and use it in GitHub Desktop.
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
ApiKey: | |
Type: AWS::ApiGateway::ApiKey | |
Properties: | |
Name: !Join ["", [{"Ref": "AWS::StackName"}, "-apikey"]] | |
Description: !Join ["", [{"Ref": "AWS::StackName"}, "api key"]] | |
Enabled: true | |
GenerateDistinctId: false | |
ApiUsagePlan: | |
Type: "AWS::ApiGateway::UsagePlan" | |
DependsOn: ApiGatewayStage | |
Properties: | |
ApiStages: | |
- ApiId: !Ref ApiGatewayRestApi | |
Stage: !Ref "apiStageName" | |
Description: !Join [" ", [{"Ref": "AWS::StackName"}, "usage plan"]] | |
UsagePlanName: !Join ["", [{"Ref": "AWS::StackName"}, "-usage-plan"]] | |
ApiUsagePlanKey: | |
Type: "AWS::ApiGateway::UsagePlanKey" | |
Properties: | |
KeyId: !Ref ApiKey | |
KeyType: API_KEY | |
UsagePlanId: !Ref ApiUsagePlan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment