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

GetCandidateZonesClustersHostsForCreatingVm

GetCandidateZonesClustersHostsForCreatingVm

Execution Availability

Try It Out

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

Query Parameters

Request Inputs

Query Parameters

  • instanceOfferingUuidString

    Optional. The instance offering UUID.

  • imageUuidStringRequired

    The image UUID.

  • l3NetworkUuidsListRequired

    The L3 network list.

  • rootDiskOfferingUuidString

    Optional. The disk offering of the root volume. This parameter is required only when the image type specified in imageUuid is ISO.

  • dataDiskOfferingUuidsList

    Optional. The disk offering list.

Body Fields

  • cpuNumint

    Optional. The CPU count.

  • memorySizelong

    Optional. The memory size. Unit: Byte.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    Whether the operation succeeds.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, 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.

  • zonesListRequired

    See zones.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The detailed description of the resource.

    • stateStringRequired

      当前状态。

    • typeStringRequired

      类型。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

  • clustersListRequired

    See clusters.

    • nameStringRequired

      The resource name.

    • uuidStringRequired

      The resource UUID.

    • descriptionStringRequired

      The detailed description of the resource.

    • stateStringRequired

      The cluster state.

    • hypervisorTypeStringRequired

      The hypervisor type.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • zoneUuidStringRequired

      The zone UUID.

    • typeStringRequired

      The reserved field.

  • hostsListRequired

    See hosts.

    • zoneUuidStringRequired

      The zone UUID.

    • nameStringRequired

      The resource name.

    • uuidStringRequired

      The resource UUID.

    • clusterUuidStringRequired

      The cluster UUID.

    • descriptionStringRequired

      The detailed description of the resource.

    • managementIpStringRequired

      管理IP。

    • hypervisorTypeStringRequired

      No description provided.

    • stateStringRequired

      当前状态。

    • statusStringRequired

      状态信息。

    • totalCpuCapacityLongRequired

      总CPU容量。

    • availableCpuCapacityLongRequired

      可用CPU容量。

    • totalMemoryCapacityLongRequired

      总内存容量。

    • availableMemoryCapacityLongRequired

      可用内存容量。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

Endpoint

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

/zstack/v1/vm-instances/candidate-destinations

Operation ID

GetCandidateZonesClustersHostsForCreatingVm

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/vm-instances/candidate-destinations?instanceOfferingUuid=<instanceOfferingUuid>&imageUuid=<imageUuid>&l3NetworkUuids=<l3NetworkUuids>&rootDiskOfferingUuid=<rootDiskOfferingUuid>&dataDiskOfferingUuids=<dataDiskOfferingUuids>&zoneUuid=<zoneUuid>&clusterUuid=<clusterUuid>&defaultL3NetworkUuid=<defaultL3NetworkUuid>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"cpuNum":1,"memorySize":1}'

Response Example

200
{ "zones": [ { "uuid": "b145bc2ad8f14810a6eec0f28508ca14", "name": "zone" } ], "clusters": [ { "name": "cluster1", "uuid": "49adbf0f48a14b899b0e6f7928556313", "hypervisorType": "KVM", "createDate": "May 11, 2017 1:23:06 PM", "lastOpDate": "May 11, 2017 1:23:06 PM", "zoneUuid": "b68fec24ba0f492c94c2e046072c16f0" } ], "hosts": [ { "zoneUuid": "b145bc2ad8f14810a6eec0f28508ca14", "name": "example", "uuid": "e1a5cb10bcbc48b4ab6dd4e648ef5960", "clusterUuid": "d5b32ea0ae1444d3b8b5a6b9d759af54", "description": "example", "managementIp": "192.168.0.1", "hypervisorType": "KVM", "state": "Enabled", "status": "Connected", "totalCpuCapacity": 4.0, "availableCpuCapacity": 2.0, "totalMemoryCapacity": 4.0, "availableMemoryCapacity": 4.0, "createDate": "May 11, 2017 1:23:06 PM", "lastOpDate": "May 11, 2017 1:23:06 PM" } ] }

Change History

This API has no change history records yet.

View all change history