UpdateVmCustomSpecification
API Request
URLs
PUT zstack/v1/vm-custom-specifications/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In the example above,
{
"updateVmCustomSpecification": {
"description": "description"
},
"systemTags": [],
"userTags": []
}
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateVmCustomSpecification":{"description":"description"}}' \
http://localhost:8080/zstack/v1/vm-custom-specifications/ff0a9e874342368bb28daaf2c9b3cc00/actionsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | UUID of the resource, uniquely identifying the resource | 4.10.18 | |
| name (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Resource name | 4.10.18 | |
| description (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Detailed description of the resource | 4.10.18 | |
| hostname (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Host Name | 4.10.18 | |
| rootPassword (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Administrator Password | 4.10.18 | |
| generateSID (Optional) | Boolean | body(included in the updateVmCustomSpecification structure) |
Whether to Generate SID | 4.10.18 | |
| domainMode (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Domain Join Mode |
|
4.10.18 |
| domainName (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Domain Name or Workgroup Name | 4.10.18 | |
| domainUsername (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Domain Username | 4.10.18 | |
| domainPassword (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Domain User Password | 4.10.18 | |
| organization (Optional) | String | body(included in the updateVmCustomSpecification structure) |
Organization Unit | 4.10.18 | |
| systemTags (Optional) | List | body | System Tag | 4.10.18 | |
| userTags (Optional) | List | body | User Tag | 4.10.18 |
API Response
Response Example
{
"inventory": {
"uuid": "ff0a9e874342368bb28daaf2c9b3cc00",
"vmInstanceUuid": "ff01ec80fd11327cba7519b66119d900",
"name": "custom-specification-for-vm-1",
"description": "Test",
"platform": "Windows",
"hostname": "vm-1",
"rootPassword": "password",
"generateSID": true,
"domainMode": "Domain",
"domainName": "zsv.test",
"domainUsername": "test",
"domainPassword": "password",
"organization": "OU\u003dzsv,DC\u003dzsv,DC\u003dtest"
}
}#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource, uniquely identifying the resource | 4.10.18 |
| vmInstanceUuid | String | Virtual Machine UUID | 4.10.18 |
| name | String | Resource name | 4.10.18 |
| description | String | Detailed description of the resource | 4.10.18 |
| platform | String | Virtual Machine Operating System Platform Type | 4.10.18 |
| hostname | String | Host Name | 4.10.18 |
| generateSID | Boolean | Whether to Generate SID | 4.10.18 |
| domainName | String | Domain Name or Workgroup Name | 4.10.18 |
| domainUsername | String | Domain Username | 4.10.18 |
| organization | String | Organization Unit | 4.10.18 |
| createDate | Timestamp | Create time | 4.10.18 |
| lastOpDate | Timestamp | Last modification time | 4.10.18 |
| domainMode | VmCustomSpecificationDomainMode | For details, see domainMode | 4.10.18 |
#domainMode
| Name | Type | Description | Starting Version |
|---|---|---|---|
| WorkGroup | VmCustomSpecificationDomainMode | Workgroup | 4.10.18 |
| Domain | VmCustomSpecificationDomainMode | Domain | 4.10.18 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field, default is null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
Java SDK
UpdateVmCustomSpecificationAction action = new UpdateVmCustomSpecificationAction();
action.uuid = "ff0a9e874342368bb28daaf2c9b3cc00";
action.description = "description";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateVmCustomSpecificationAction.Result res = action.call();Python SDK
action = UpdateVmCustomSpecificationAction()
action.uuid = "ff0a9e874342368bb28daaf2c9b3cc00"
action.description = "description"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()