Get All Members in Resource Ensemble

GET/zstack/v1/iam1/resource-ensemble
GET/zstack/v1/iam1/resource-ensemble/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/iam1/resource-ensemble?uuid=14c61568f49a45759c9a75c8fea4f854
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/iam1/resource-ensemble/14c61568f49a45759c9a75c8fea4f854?uuid=14c61568f49a45759c9a75c8fea4f854

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringqueryThe UUID of the resource. Any member in the resource ensemble is acceptable 4.10.0
systemTags (Optional)ListquerySystem tags 4.10.0
userTags (Optional)ListqueryUser tags 4.10.0

API Response

Response example

{
  "inventory": {
    "masterUuid": "14c61568f49a45759c9a75c8fea4f854",
    "masterResourceName": "VM1",
    "masterResourceType": "VmInstanceVO",
    "members": [
      {
        "uuid": "c1abb7bd0de8489bb183d829c3ccde0e",
        "resourceName": "vmcdrom-VM1",
        "resourceType": "VmCdRomVO"
      },
      {},
      {}
    ]
  }
}
NameTypeDescriptionStarting Version
successbooleanWhether the request is successful4.10.0
inventoryResourceEnsembleInventoryFor details, see inventory4.10.0
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error4.10.0

inventory

NameTypeDescriptionStarting Version
masterUuidStringThe UUID of the master resource in the resource ensemble4.10.0
masterResourceNameStringThe name of the master resource in the resource ensemble4.10.0
masterResourceTypeStringThe type of the master resource in the resource ensemble4.10.0
membersListFor details, see members4.10.0

members

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource, uniquely identifying this resource4.0.0
resourceNameStringResource name4.0.0
resourceTypeStringResource type4.0.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. This field is null if there is no root cause0.6

SDK Examples

Java SDK

GetResourceEnsembleMembersAction action = new GetResourceEnsembleMembersAction();
action.uuid = "14c61568f49a45759c9a75c8fea4f854";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetResourceEnsembleMembersAction.Result res = action.call();

Python SDK

GetResourceEnsembleMembersAction action = GetResourceEnsembleMembersAction()
action.uuid = "14c61568f49a45759c9a75c8fea4f854"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetResourceEnsembleMembersAction.Result res = action.call()