Skip to main content
Storage Management/Data Storage APIs/Distributed Storage Related Interfaces
POSTDistributed Storage Related InterfacesSince 4.7.11SynchronousAuth Required

Create Block Volume

Create Block Volume

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • nameStringRequired

    Resource name

  • descriptionString

    Resource description

  • sizeLongRequired

    Capacity

  • primaryStorageUuidStringRequired

    Primary Storage UUID

  • accessPathIdIntegerRequired

    Access path ID

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • inventoryBlockVolumeInventoryRequired

    For details, see inventory

    • iscsiPathStringRequired

      iscsi路径。

    • vendorStringRequired

      No description provided.

    • uuidStringRequired

      Resource UUID, uniquely identifies the resource

    • nameStringRequired

      Resource name

    • descriptionStringRequired

      Resource description

    • primaryStorageUuidStringRequired

      Primary Storage UUID

    • vmInstanceUuidStringRequired

      VM instance UUID

    • diskOfferingUuidStringRequired

      Disk offering UUID

    • rootImageUuidStringRequired

      根镜像UUID。

    • installPathStringRequired

      安装路径。

    • typeStringRequired

      类型。

    • formatStringRequired

      数据格式或导出格式。

    • sizeLongRequired

      返回记录数。

    • actualSizeLongRequired

      实际大小。

    • deviceIdIntegerRequired

      设备ID。

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

    • isShareableBooleanRequired

      是否可分享。

    • volumeQosStringRequired

      No description provided.

    • lastDetachDateTimestampRequired

      最近一次detach时间。

    • lastVmInstanceUuidStringRequired

      最近一次云主机实例UUID。

  • errorErrorCodeRequired

    Error code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error

    • codeStringRequired

      Error code number, globally unique identifier for the error, such as 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 triggered the current error. If there is no original error, this field is null

Endpoint

POST/zstack/v1/block-volumes

/zstack/v1/block-volumes

Operation ID

CreateBlockVolume

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/block-volumes' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","description":"<description>","size":1,"primaryStorageUuid":"<primaryStorageUuid>","accessPathId":1,"accessPathIqn":"<accessPathIqn>","burstTotalBw":1,"burstTotalIops":1,"maxTotalBw":1,"maxTotalIops":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": {} }

Change History

This API has no change history records yet.

View all change history