Skip to main content
Storage Management/Data Storage APIs
PUTData Storage APIsSince 0.6SynchronousAuth Required

Change Data Storage State

Change Data Storage State

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

    Data Storage UUID, uniquely identifies the resource

Body Fields

  • changeprimarystoragestateObjectRequired

    changeprimarystoragestate request body object.

    • stateEventStringRequired

      Target state for the Data Storage

  • systemTagsList

    系统标签。

  • userTagsList

    User Tags

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. When the operation succeeds, this field is null. See error

    • codeStringRequired

      Error code number, a globally unique identifier for the error, for example 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 cause, the source error that caused the current error. If there is no original error, this field is null

  • inventoryPrimaryStorageInventoryRequired

    See inventory

    • uuidStringRequired

      Resource UUID, uniquely identifies the resource

    • zoneUuidStringRequired

      Data Center UUID

    • nameStringRequired

      Resource Name

    • urlStringRequired

      地址。

    • descriptionStringRequired

      Resource Description

    • totalCapacityLongRequired

      总容量。

    • availableCapacityLongRequired

      可用容量。

    • totalPhysicalCapacityLongRequired

      总物理容量。

    • availablePhysicalCapacityLongRequired

      可用物理容量。

    • systemUsedCapacityLongRequired

      系统已使用容量。

    • typeStringRequired

      类型。

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • mountPathStringRequired

      mount路径。

    • createDateTimestampRequired

      Create Time

    • lastOpDateTimestampRequired

      Last Modification Time

    • attachedClusterUuidsListRequired

      附加集群UUID。

Endpoint

PUT/zstack/v1/primary-storage/{uuid}/actions

/zstack/v1/primary-storage/{uuid}/actions

Operation ID

ChangePrimaryStorageState

Permalink

Request Example

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

Response Example

200
{ "inventory": { "name": "PS1", "url": "/Cloud_ps", "type": "LocalStorage", "state": "Disabled", "attachedClusterUuids": [ "408395dfdebb427e9453048436556a66" ] } }

Change History

This API has no change history records yet.

View all change history