AddAttributesToIAM2VirtualID
API Request
URLs
POST zstack/v1/iam2/virtual-ids/{uuid}/attributes
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": {
"attributes": [
{
"name": "some-attribute-name",
"value": "attribute-value"
}
]
},
"systemTags": [],
"userTags": []
}

Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 2.4.0 | |
attributes | List | body (contained in the params structure) | The attributes. | 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
AddAttributesToIAM2VirtualIDAction action = new AddAttributesToIAM2VirtualIDAction();
action.uuid = "94d943b468573d9d9cdfd5472a6235dc";
action.attributes = asList([name:some-attribute-name, value:attribute-value]);
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddAttributesToIAM2VirtualIDAction.Result res = action.call();
Python
SDK
AddAttributesToIAM2VirtualIDAction action = AddAttributesToIAM2VirtualIDAction()
action.uuid = "94d943b468573d9d9cdfd5472a6235dc"
action.attributes = [[name:some-attribute-name, value:attribute-value]]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddAttributesToIAM2VirtualIDAction.Result res = action.call()