Updated on 2023-08-02 GMT+08:00

Creating an AK/SK

Function

This API is used to create an AK/SK.

URI

POST /v1/apm2/access-keys

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

descp

No

String

Description.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

ak

String

AK to be created or deleted.

sk

String

SK to be created or deleted.

Example Requests

Create an AK/SK and set the description to "test".

/v1/apm2/access-keys

{
  "descp" : "test"
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "ak" : "vca******04j",
  "sk" : "ktns******6iq6t9m"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

401

Unauthorized: No permissions.

403

Forbidden: Access forbidden.

404

Not Found: The requested resource is not found.

Error Codes

See Error Codes.