Skip to main content
Resource Center/Resource Pool/VM Instance Operations
GETVM Instance OperationsSince 2.1SynchronousAuth Required

GetCandidatePrimaryStoragesForCreatingVm

GetCandidatePrimaryStoragesForCreatingVm

Execution Availability

Try It Out

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

Query Parameters

Request Inputs

Query Parameters

  • imageUuidStringRequired

    The image UUID.

  • l3NetworkUuidsListRequired

    The L3 network UUID.

  • rootDiskOfferingUuidString

    Optional. The UUID of the disk offering used by the root volume. This parameter is required if the image type is ISO.

  • rootDiskSizeLong

    Optional. The size of the root volume. You need to specify this parameter only when you set imageUuid to ISO and do not specify rootDiskOfferingUuid.

  • dataDiskOfferingUuidsList

    Optional. The UUID of the disk offering used by the data volume.

Responses

200 OK

On success, this API returns the following response structure.

  • dataVolumePrimaryStoragesMap

    The primary storages that are available to the data volume. Each primary storage corresponds to a data disk offering.

  • successbooleanRequired

    Whether the operation succeeds.

  • rootVolumePrimaryStoragesListRequired

    See rootVolumePrimaryStorages.

    • uuidStringRequired

      The resource UUID.

    • zoneUuidStringRequired

      The zone UUID.

    • nameStringRequired

      The resource name.

    • urlStringRequired

      地址。

    • descriptionStringRequired

      The detailed description of the resource.

    • totalCapacityLongRequired

      总容量。

    • availableCapacityLongRequired

      可用容量。

    • totalPhysicalCapacityLongRequired

      总物理容量。

    • availablePhysicalCapacityLongRequired

      可用物理容量。

    • systemUsedCapacityLongRequired

      系统已使用容量。

    • typeStringRequired

      类型。

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • mountPathStringRequired

      mount路径。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • attachedClusterUuidsListRequired

      附加集群UUID。

  • errorErrorCodeRequired

    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.

Endpoint

GET/zstack/v1/vm-instances/candidate-storages

/zstack/v1/vm-instances/candidate-storages

Operation ID

GetCandidatePrimaryStoragesForCreatingVm

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/vm-instances/candidate-storages?imageUuid=<imageUuid>&l3NetworkUuids=<l3NetworkUuids>&rootDiskOfferingUuid=<rootDiskOfferingUuid>&rootDiskSize=1&dataDiskOfferingUuids=<dataDiskOfferingUuids>&dataDiskSizes=<dataDiskSizes>&zoneUuid=<zoneUuid>&clusterUuid=<clusterUuid>&defaultL3NetworkUuid=<defaultL3NetworkUuid>&systemTags=<systemTags>&userTags=<userTags>&instanceOfferingUuid=<instanceOfferingUuid>' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "rootVolumePrimaryStorages": [ { "uuid": "90087c635c70381baf16eb6dd5f8cfdc", "name": "example", "url": "/zstack_ps", "description": "example", "totalCapacity": 322122547200, "availableCapacity": 214748364800, "totalPhysicalCapacity": 322122547200, "availablePhysicalCapacity": 214748364800, "type": "LocalStorage", "state": "Enabled", "status": "Connected", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "attachedClusterUuids": [ "f1d9f91b4b8b35f7b4435f86b79793be" ] } ], "dataVolumePrimaryStorages": { "d180546cd56b3677bffd7d338ba2666c": [ { "uuid": "b5e92f8dbf223a1eac8fd101f63112b6", "name": "example", "url": "/opt/zstack/nfsprimarystorage/prim-b5e92f8dbf223a1eac8fd101f63112b6", "description": "example", "totalCapacity": 322122547200, "availableCapacity": 214748364800, "totalPhysicalCapacity": 322122547200, "availablePhysicalCapacity": 214748364800, "type": "NFS", "state": "Enabled", "status": "Connected", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "attachedClusterUuids": [ "1d76e995472839f989472c71dbb450c0" ] } ] } }

Change History

This API has no change history records yet.

View all change history