Skip to main content
Resource Center/Hardware/Primary Storage Operations/XStor Block Primary Storage Operations
POSTXStor Block Primary Storage OperationsSince 4.6.0SynchronousAuth Required

AddBlockPrimaryStorage

AddBlockPrimaryStorage

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • paramObjectRequired

    param request body object.

    • vendorNameStringRequired

      The storage vendor name.

    • metadataStringRequired

      The storage metadata.

    • urlStringRequired

      Unused.

    • descriptionString

      Optional. The detailed description of the Block primary storage.

    • typeString

      Optional. The primary storage type. The type is Block here.

    • zoneUuidStringRequired

      The zone UUID.

    • resourceUuidString

      Optional. The resource UUID.

  • nameStringRequired

    The name of the Block primary storage.

  • tagUuidsList

    Optional. The tag UUID list.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

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

    • 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.

  • inventoryPrimaryStorageInventoryRequired

    For detailed version, see inventory.

    • uuidStringRequired

      The resource UUID.

    • zoneUuidStringRequired

      The zone UUID.

    • nameStringRequired

      The resource name.

    • urlStringRequired

      地址。

    • descriptionStringRequired

      The detailed information of the resource.

    • totalCapacityLongRequired

      The total capacity.

    • availableCapacityLongRequired

      The available capacity.

    • totalPhysicalCapacityLongRequired

      总物理空间

    • availablePhysicalCapacityLongRequired

      The available physical capacity.

    • systemUsedCapacityLongRequired

      The system used capacity.

    • typeStringRequired

      The primary storage type.

    • stateStringRequired

      The running state.

    • statusStringRequired

      The connection status.

    • mountPathStringRequired

      mount路径。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • attachedClusterUuidsListRequired

      The cluster attached to.

Endpoint

POST/zstack/v1/primary-storage/block

/zstack/v1/primary-storage/block

Operation ID

AddBlockPrimaryStorage

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/primary-storage/block' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"param":{"vendorName":"<vendorName>","metadata":"<metadata>","url":"<url>","description":"<description>","type":"<type>","zoneUuid":"<zoneUuid>","resourceUuid":"<resourceUuid>"},"name":"<name>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "name": "PS1", "url": "/zstack_ps", "type": "LocalStorage", "state": "Enabled", "status": "Connected", "attachedClusterUuids": [ "c6e9684e8bb93a9192c946dcd0564b39" ] } }

Change History

This API has no change history records yet.

View all change history