Skip to main content
Operations Management/Access Control/AccessKey Operations
POSTAccessKey OperationsSince 3.2.0SynchronousAuth Required

CreateAccessKey

CreateAccessKey

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • accountUuidStringRequired

      The account UUID.

    • userUuidStringRequired

      The user UUID.

    • descriptionString

      Optional. The detailed description of the resource.

    • AccessKeyIDString

      Optional. The generated AccessKey ID.

    • AccessKeySecretString

      Optional. The generated AccessKey Secret.

    • resourceUuidString

      Optional.

  • systemTagsList

    Optional.

  • userTagsList

    Optional.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryAccessKeyInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • descriptionStringRequired

      The detailed description of the resource.

    • accountUuidStringRequired

      The account UUID.

    • userUuidStringRequired

      The user UUID.

    • AccessKeyIDStringRequired

      访问密钥ID。

    • AccessKeySecretStringRequired

      访问密钥。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • stateAccessKeyStateRequired

      See state.

      • nameStringRequired

        The resource name.

      • ordinalintRequired

        No description provided.

Endpoint

POST/zstack/v1/accesskeys

/zstack/v1/accesskeys

Operation ID

CreateAccessKey

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/accesskeys' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"accountUuid":"<accountUuid>","userUuid":"<userUuid>","description":"<description>","AccessKeyID":"<AccessKeyID>","AccessKeySecret":"<AccessKeySecret>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "01f82a92a3f83136b3a5fa13b0f1dde6", "accountUuid": "bc81e5aad7363ebaa904ee81edbfdd1f", "userUuid": "20e90349268736d7950284d122f64213", "AccessKeyID": "1234567890abcdedfhij", "AccessKeySecret": "1234567890abcdedfhij1234567890abcdedfhij", "state": "Enabled" } }

Change History

This API has no change history records yet.

View all change history