Can you create Usage Plan with Cloud Formation?

馋奶兔 提交于 2019-12-07 19:57:55

问题


just like in the title. I can deploy stuff on AWS using only Cloud Formation. Now I try to secure my API Gateway with API Keys and looks like I need a Usage Plan for it. It doesn't seem to be covered by the documentation right here: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html

Have any of you had a similar problem and if yes, how did you solved it?


回答1:


AWS has today released the ability to create AWS::ApiGateway::UsagePlan using cloud formation templates

Unfortunately there isn't currently a method of Adding API Keys to a UsagePlan through CloudFormation, this has to be done manually.




回答2:


For anyone reading, this is now supported via the AWS::ApiGateway::UsagePlanKey (docs) resource type in CloudFormation. From that page:

The AWS::ApiGateway::UsagePlanKey resource associates an Amazon API Gateway API key with an API Gateway usage plan. This association determines which users the usage plan is applied to.



来源:https://stackoverflow.com/questions/39910734/can-you-create-usage-plan-with-cloud-formation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!