Help Center/ Koo Command Line Interface/ User Guide/ Options/ Calling APIs with AK/SK in Non-configuration Mode
Updated on 2024-06-17 GMT+08:00

Calling APIs with AK/SK in Non-configuration Mode

Add the --cli-access-key, --cli-secret-key, and --cli-security-token options in a command to call a cloud service API with an AK/SK in non-configuration mode.

By default, if only --cli-access-key and --cli-secret-key are used in a command, the AK/SK are taken as permanent ones.

hcloud RDS ListApiVersion --cli-region="ap-southeast-1" --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"
    }
  ]
}

By default, if --cli-access-key, --cli-secret-key, and --cli-security-token are used in a command, the AK/SK are taken as temporary ones.

hcloud RDS ListApiVersion --cli-region="ap-southeast-1" --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"
    }
  ]
}