AddIAM2VirtualIDsToGroup
API Request
URLs
POST zstack/v1/iam2/projects/groups/{groupUuid}/virtual-ids
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.
{
"params": {
"virtualIDUuids": [
"28e44658cba33e57b96da2c430cbbefe",
"f9450427d6b03c2cb992c80a3a64efaa"
]
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"virtualIDUuids":["28e44658cba33e57b96da2c430cbbefe","f9450427d6b03c2cb992c80a3a64efaa"]}}' http://localhost:8080/zstack/v1/iam2/projects/groups/2a5a0fe00543339f8c424e069df8c956/virtual-ids
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
virtualIDUuids | List | body (contained in the params structure) | 2.4.0 | ||
groupUuid | String | url | 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
AddIAM2VirtualIDsToGroupAction action = new AddIAM2VirtualIDsToGroupAction();
action.virtualIDUuids = asList("28e44658cba33e57b96da2c430cbbefe","f9450427d6b03c2cb992c80a3a64efaa");
action.groupUuid = "2a5a0fe00543339f8c424e069df8c956";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddIAM2VirtualIDsToGroupAction.Result res = action.call();
Python
SDK
AddIAM2VirtualIDsToGroupAction action = AddIAM2VirtualIDsToGroupAction()
action.virtualIDUuids = [28e44658cba33e57b96da2c430cbbefe, f9450427d6b03c2cb992c80a3a64efaa]
action.groupUuid = "2a5a0fe00543339f8c424e069df8c956"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddIAM2VirtualIDsToGroupAction.Result res = action.call()