amazon-web-services - 列出文档部分 AWS apigateway
问题描述
通过Terraform
我创建了一个AWS apigateway
基于文件的swagger
文件。
在那个swagger
文件中,我添加了特定的 AWS 端点来记录 API,例如:
"x-amazon-apigateway-documentation": {
"documentationParts": [
{
"location": {
"type": "API"
},
"properties": {
"description": "This is the API description"
}
},
{
"location": {
"type": "METHOD",
"method": "GET",
"path": "/foo/{bar}"
},
"properties": {
"description": "This is the method description"
}
}
]
}
然后我发布了文档版本 1.0,AWS console
并尝试通过 HTTP 获取该文档,如下所述:
但是,不幸的是,我做不到。我正在对端点进行 GET
http://apigateway.eu-central1.amazonaws.com/restapis/<TheIdOfMyApiGateway>/documentation/parts
它甚至没有给我一个 4XX 代码,但根本没有响应或 HTTP 代码。
我做错了什么?
解决方案
我的不好是该地区的一个错字。我错过了一个破折号,正确的端点是:
http://apigateway.eu-central-1.amazonaws.com/restapis/<TheIdOfMyApiGateway>/documentation/parts
用eu-central-1代替 eu-central1
我检查AWS 区域中的区域命名
推荐阅读
- javascript - 如何配置 Django URLS 以使用所有 react-router 路径
- java - 如何再次重新评估while循环条件
- centos - 我在 VM 上安装了 CentOS,但它不起作用
- java - 从非主类到主类的布尔转换
- f# - F# 序列一次返回一项
- arduino - 当我尝试与 arduino 通信 nodemcu 时出现无效输入错误
- wordpress - wp_query 和 meta_query 用于转发器字段值
- flutter - Flutter Geo Locator 给出错误的纬度和经度
- vim - vim 的 emmet:vue 文件
- cuda - 为什么 nvcc 拒绝链接这个简单的合作组程序?