Skip to main content
System Management/Security Settings Interfaces/Create AccessKey (CreateAccessKey)
PUTCreate AccessKey (CreateAccessKey)Since 4.0.0SynchronousAuth Required

Enable or Disable AccessKey

Enable or Disable AccessKey

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    AccessKey UUID. Uniquely identifies the resource

Body Fields

  • changeaccesskeystateObjectRequired

    changeaccesskeystate request body object.

    • stateEventStringRequired

      Enable or disable

  • systemTagsList

    系统标签。

  • userTagsList

    用户标签。

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. This field is null when the operation succeeds. See error

    • codeStringRequired

      Error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field. Defaults to null

    • opaqueLinkedHashMapRequired

      Reserved field. Defaults to null

    • causeErrorCodeRequired

      Root error. The source error that caused this error. Null if no root cause exists

  • inventoryAccessKeyInventoryRequired

    See inventory

    • uuidStringRequired

      The UUID of the resource. Uniquely identifies the resource

    • descriptionStringRequired

      Detailed description of the resource

    • accountUuidStringRequired

      Account UUID

    • userUuidStringRequired

      User UUID

    • AccessKeyIDStringRequired

      访问密钥ID。

    • AccessKeySecretStringRequired

      访问密钥。

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

    • stateAccessKeyStateRequired

      See state

      • nameStringRequired

        Resource name

      • ordinalintRequired

        No description provided.

Endpoint

PUT/zstack/v1/accesskeys/{uuid}/actions

/zstack/v1/accesskeys/{uuid}/actions

Operation ID

ChangeAccessKeyState

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/accesskeys/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"changeaccesskeystate":{"stateEvent":"<stateEvent>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "defe79b1a43f35818dc6d3959b571773", "accountUuid": "d0c06c8d19f439b1b8f481dbdf3e3a3c", "userUuid": "b622d5d01ef63237878023e93ade5003", "AccessKeyID": "1234567890abcdedfhij", "AccessKeySecret": "1234567890abcdedfhij1234567890abcdedfhij", "state": "Enabled" } }

Change History

This API has no change history records yet.

View all change history