用途
该技能面向 AWS API Gateway 的日常管理,覆盖 REST API 与 HTTP API 两类接口的查询与部署操作。
主要能力
- 列出 REST API:使用 aws apigateway get-rest-apis,并以表格形式输出 id、name、createdDate。
- 列出 HTTP API(v2):使用 aws apigatewayv2 get-apis,输出 ApiId、Name、ApiEndpoint、ProtocolType。
- 列出 REST API 的资源:使用 aws apigateway get-resources,指定 --rest-api-id,输出 id、path、resourceMethods。
- 列出 REST API 的阶段:使用 aws apigateway get-stages,输出 stageName、deploymentId、lastUpdatedDate。
- 列出 HTTP API(v2)的阶段:使用 aws apigatewayv2 get-stages,输出 StageName、AutoDeploy。
- 创建部署:使用 aws apigateway create-deployment,指定 --rest-api-id 与 --stage-name,并附带描述。
- 查看使用计划:使用 aws apigateway get-usage-plans,输出 id、name、throttle、quota。
使用方式
按资料提供的 AWS CLI 命令执行,命令中保留 --query、--output 与 jq 管道以格式化输出。REST API(v1)使用 apigateway 前缀,HTTP API(v2)使用 apigatewayv2 前缀。
注意事项
资料明确提示:在创建部署或修改阶段之前应先确认。
限制
关于权限、区域配置、错误处理、费用与配额细节,资料暂未提供。