Amazon cloudformation 使用方法节流的UsagePlan的Cloudformation

Amazon cloudformation 使用方法节流的UsagePlan的Cloudformation,amazon-cloudformation,aws-api-gateway,amazon-api-gateway,Amazon Cloudformation,Aws Api Gateway,Amazon Api Gateway,我是cloudformation的新手,我正在尝试按照AWS文档创建一个使用方法节流的使用计划。我需要定义一个with Throttle属性 我尝试了下面的方法,但得到一个错误-属性Throttle的值必须是具有字符串(或简单类型)属性的对象 ApiUsagePlan: Type: "AWS::ApiGateway::UsagePlan" Properties: Throttle: RateLimit: 10 BurstLimit:

我是cloudformation的新手,我正在尝试按照AWS文档创建一个使用方法节流的使用计划。我需要定义一个with Throttle属性

我尝试了下面的方法,但得到一个错误-
属性Throttle的值必须是具有字符串(或简单类型)属性的对象

  ApiUsagePlan:
    Type: "AWS::ApiGateway::UsagePlan"
    Properties:
      Throttle:
        RateLimit: 10
        BurstLimit: 10
      ApiStages:
      - ApiId: !Ref ApiGatewayApi
        Stage: !Ref ApiStage
        Throttle: -------> how to define this property?
          RateLimit: 5
          BurstLimit: 5

您需要指定要限制的路径和方法。例如:

  ApiStages:
    - ApiId: !Ref ApiGatewayApi
      Stage: !Ref ApiStage
      Throttle:
        "/helloworld/ANY":
            BurstLimit: 5
            RateLimit: 5
其中,
/helloworld/ANY
必须由您自己的路径和方法替换


希望这能有所帮助。

我正在尝试做一些类似的事情,并将我的节流配置与我的资源/方法相关联。但我在节流下的那一行出现了一个错误:“myresource/mymethod”,我只是想确认这是否对您有效