ChangeIAM2OrganizationParent
API Request
URLs
PUT zstack/v1/iam2/organizations/{parentUuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"changeIAM2OrganizationParent": {
"childrenUuids": [
"b71dcc43656f399c82b09a379d1d6a74",
"220c9c0ec8a53c37b9c680b0deed7563"
]
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"changeIAM2OrganizationParent":{"childrenUuids":["b71dcc43656f399c82b09a379d1d6a74","220c9c0ec8a53c37b9c680b0deed7563"]}}' http://localhost:8080/zstack/v1/iam2/organizations/4fef501c5ba331f496907f642f609ea3/actions
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
parentUuid | String | url | 2.4.0 | ||
childrenUuids | List | body (contained in the changeIAM2OrganizationParent structure) | 2.4.0 | ||
systemTags | List | body | Optional. The system tags. | 2.4.0 | |
userTags | List | body | Optional. The user tags. | 2.4.0 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API
failed, the returned JSON structure includes an error field. For
example,
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
SDK Sample
Java
SDK
ChangeIAM2OrganizationParentAction action = new ChangeIAM2OrganizationParentAction();
action.parentUuid = "4fef501c5ba331f496907f642f609ea3";
action.childrenUuids = asList("b71dcc43656f399c82b09a379d1d6a74","220c9c0ec8a53c37b9c680b0deed7563");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeIAM2OrganizationParentAction.Result res = action.call();
Python
SDK
ChangeIAM2OrganizationParentAction action = ChangeIAM2OrganizationParentAction()
action.parentUuid = "4fef501c5ba331f496907f642f609ea3"
action.childrenUuids = [b71dcc43656f399c82b09a379d1d6a74, 220c9c0ec8a53c37b9c680b0deed7563]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ChangeIAM2OrganizationParentAction.Result res = action.call()