文档首页/ 华为云命令行工具服务 KooCLI/ 用户指南/ 选项说明/ 以无配置方式AKSK调用云服务API
更新时间:2024-04-18 GMT+08:00
分享

以无配置方式AKSK调用云服务API

KooCLI支持在命令中添加“--cli-access-key”,“--cli-secret-key”和“--cli-security-token”选项,以无配置方式AKSK调用云服务API。

当命令中仅使用“--cli-access-key”和“--cli-secret-key”时,默认识别该AK,SK为永久AK/SK:

hcloud RDS ListApiVersion --cli-region="cn-north-4" --cli-access-key=******** --cli-secret-key=********
{
  "versions": [
    {
      "id": "v3",
      "links": [],
      "status": "CURRENT",
      "updated": "2019-01-15T12:00:00Z"
    },
    {
      "id": "v1",
      "links": [],
      "status": "DEPRECATED",
      "updated": "2017-02-07T17:34:02Z"
    }
  ]
}

当命令中同时使用“--cli-access-key”,“--cli-secret-key”和“--cli-security-token”时,默认识别该AK,SK为临时AK/SK:

hcloud RDS ListApiVersion --cli-region="cn-north-4" --cli-access-key=******** --cli-secret-key=******** --cli-security-token=********
{
  "versions": [
    {
      "id": "v3",
      "links": [],
      "status": "CURRENT",
      "updated": "2019-01-15T12:00:00Z"
    },
    {
      "id": "v1",
      "links": [],
      "status": "DEPRECATED",
      "updated": "2017-02-07T17:34:02Z"
    }
  ]
}

相关文档