2016-10-12 13 views
1

我有一个API密钥,并希望它通过使用以下模板cloudformation我的使用计划相关联,但它不工作:UsagePlanKeys cloudformation

"usagePlanKey": 
    { 
    "Type": "AWS::ApiGateway::UsagePlanKey", 
    "Properties":{ 
    "UsagePlanId":{"Ref":"usagePlan"}, 
    "KeyId":{"Ref":"ApiKey"}, 
    "KeyType":"API_KEY" 
    } 

我可以创建一个资源,如果它尚未实现通过AWS?

回答

0

您不能创建没有在CloudFormation得到落实类型,为CloudFormation ApiGateway服务资源支持当前的列表是:

  • AWS :: ApiGateway ::帐户
  • AWS :: ApiGateway :: ApiKey
  • AWS :: ApiGateway ::授权者
  • AWS :: ApiGateway :: BasePathMapping
  • AWS :: ApiGateway :: ClientCertificate
  • AWS :: ApiGateway ::部署
  • AWS :: ApiGateway ::方法
  • AWS :: ApiGateway ::模型
  • AWS :: ApiGateway ::资源
  • AWS :: ApiGateway :: RESTAPI
  • AWS :: ApiGateway ::舞台
  • AWS :: ApiGateway :: UsagePlan

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html

这里有一个类似的问题;

Can you create Usage Plan with Cloud Formation?

看来,目前的解决方案包括具有API密钥手动添加到使用计划