Skip to main content
Resource Center/Resource Pool/Affinity Group Operations
GETAffinity Group OperationsSince 4.0.0SynchronousAuth Required

GetCandidateVMForAttachingAffinityGroup

GetCandidateVMForAttachingAffinityGroup

Execution Availability

Try It Out

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

Query Parameters

Request Inputs

Query Parameters

  • affinityGroupUuidStringRequired

    The UUID of the affinity group.

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

  • inventoriesListRequired

    For more information, see inventories.

Endpoint

GET/zstack/v1/VM/attachingGroup

/zstack/v1/VM/attachingGroup

Operation ID

GetCandidateVMForAttachingAffinityGroup

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/VM/attachingGroup?affinityGroupUuid=<affinityGroupUuid>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "ac1d56dec1d93a29a6cb43d7aff178a3", "name": "Test-VM", "description": "web server VM", "zoneUuid": "892fe4676f283785970b18b6c0f556f4", "clusterUuid": "440f315c2b0c3561850f610f7d200959", "imageUuid": "72da4314ad063029a40ebec8e1204c70", "hostUuid": "2cac9cfdc7d030bb8cfd80bb9d922e48", "lastHostUuid": "c60aa755fe2d30fb80d4029e9d337ee9", "instanceOfferingUuid": "3ce1eb11a41030499e3e74685a568dbb", "rootVolumeUuid": "e6cf673fb915361caa4ab93e03c6e3a6", "platform": "Linux", "defaultL3NetworkUuid": "aff87442d7d535a2a46914f6a312c285", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8.589934592E9, "cpuNum": 1.0, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "state": "Stopped" } ] }

Change History

This API has no change history records yet.

View all change history