Get Resource Sharing

GET/zstack/v1/iam1/resource-ensemble/view-sharing

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/view-sharing

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
resourceUuidStringqueryResource UUID 4.10.0
systemTags (Optional)ListquerySystem tags 4.10.0
userTags (Optional)ListqueryUser tags 4.10.0

API Response

Response example

{
  "uuid": "a2a658dba2fa385382bc9f29a0788815",
  "toPublic": false,
  "accounts": [
    {
      "uuid": "7ded05202370411d85e6bf20168fa08f"
    }
  ],
  "accountGroups": [
    {
      "uuid": "2347044abdbb41d6b2bfb3cd196bfe79"
    }
  ]
}
NameTypeDescriptionStarting Version
resourceUuidStringResource UUID4.10.0
masterResourceUuidStringIf the resource belongs to a resource ensemble, this value is the UUID of the master resource in the ensemble. If not, this value is null4.10.0
masterResourceTypeStringIf the resource belongs to a resource ensemble, this value is the type of the master resource in the ensemble. If not, this value is null4.10.0
toPublicbooleanWhether the resource is shared globally4.10.0
successbooleanWhether the request is successful4.10.0
accountsListFor details, see accounts4.10.0
accountGroupsListFor details, see accountGroups4.10.0
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error4.10.0

accounts

NameTypeDescriptionStarting Version
uuidStringAccount UUID4.10.0

accountGroups

NameTypeDescriptionStarting Version
uuidStringAccount group UUID4.10.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

GetResourceSharingAction action = new GetResourceSharingAction();
action.uuid = "8fa73dc3301333e0aa39de406406831f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetResourceSharingAction.Result res = action.call();

Python SDK

GetResourceSharingAction action = GetResourceSharingAction()
action.uuid = "8fa73dc3301333e0aa39de406406831f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetResourceSharingAction.Result res = action.call()