jay*_*yli 9 throttling amazon-web-services aws-cloudformation aws-api-gateway aws-cdk
关于 API 网关使用计划的 AWS 文档都暗示它们是使用/附加到 API 密钥创建的,但没有说明如果没有 API 密钥它将如何运行。我有一个未经授权的 API,我想对其应用限制。我可以创建使用计划,将其附加到资源,而不将 API 密钥与其关联吗?它会起作用吗?
上下文:我正在尝试使用 CloudFormation 的 Java SDK 来定义堆栈,但我无法弄清楚如何以编程方式指定特定于资源的节流阀。我还将接受一个答案,该答案告诉我如何在不使用控制台的情况下执行此操作。
Pat*_*ron -2
您可以像这样配置您ThrottleSettings的:AWS::ApiGateway::UsagePlan
Resources:\n UsagePlan:\n Type: AWS::ApiGateway::UsagePlan\n Properties:\n ThrottleSettings:\n BurstLimit:\n RateLimit:\nRun Code Online (Sandbox Code Playgroud)\n\n来自 API Gateway 有关Throttling API Requests for Better Throughput的文档:
\n\n\n\nAmazon API Gateway 提供两种基本类型的与限制相关的设置:
\n\n\n
\n- \n
Server-side throttling limits are applied across all clients. These limit settings exist to prevent your API\xe2\x80\x94 and your account \xe2\x80\x94 from\n being overwhelmed by too many requests.
- \n
Per-client throttling limits are applied to clients that use API keys associated with your usage policy as client identifier.
| 归档时间: |
|
| 查看次数: |
1322 次 |
| 最近记录: |