【问题标题】:How to get the list of repository from AWS CodeCommit using AWS REST API call in Postman tool?如何使用 Postman 工具中的 AWS REST API 调用从 AWS CodeCommit 获取存储库列表?
【发布时间】:2020-06-25 11:25:02
【问题描述】:

我必须使用 AWS REST API 来处理各种云服务。最初,我正在尝试使用邮递员工具从 AWS CodeCommit 中获取存储库列表。我正在关注此链接https://docs.aws.amazon.com/codecommit/latest/APIReference/API_ListRepositories.html 来完成我的任务。我在设置此 API 调用的授权时遇到问题。我已经提供了访问和密钥以及区域。我无法获取存储库列表,而是面临503 网络问题。

更新

我正面临以下错误消息

{
  "Output": {
    "__type": "com.amazon.coral.service#UnknownOperationException"
  },
  "Version": "1.0"
}

【问题讨论】:

    标签: amazon-web-services postman aws-codecommit aws-rest-api


    【解决方案1】:
    1. 在 Postman 中,选择 POST 方法并将 URL 设置为“https://codecommit.us-east-1.amazonaws.com/”
    2. 转到标题并添加
    • “Content-Type”键和“application/x-amz-json-1.1”作为值
    • “X-Amz-Target”键和“CodeCommit_20150413.ListRepositories”作为值
    • “主机”键和“codecommit.us-east-1.amazonaws.com”作为值
    1. 转到“授权”选项卡并配置 AWS 签名类型,如下所示:
    • 访问密钥:xxxxxxxxxxxxxxx
    • 密钥:xxxxxxxxxxxxxxx
    • AWS 区域:us-east-1
    1. 转到“正文”选项卡并输入{}

    2. 点击“发送”进行测试

    注意:请确保在上述所有位置使用正确的区域(以 us-east-1 为例)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-22
      • 2020-06-03
      • 2015-10-28
      • 2018-06-07
      • 1970-01-01
      • 2021-10-15
      • 2016-05-14
      相关资源
      最近更新 更多