UpdateBareMetal2ChassisOffering
API Request
URLs
PUT zstack/v1/baremetal2/chassis/offerings/{uuid}/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.
{
"updateBareMetal2ChassisOffering": {
"name": "new-offering-name",
"description": "new-offering-description"
},
"systemTags": [],
"userTags": []
}

Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateBareMetal2ChassisOffering":{"name":"new-offering-name","description":"new-offering-description"}}' http://localhost:8080/zstack/v1/baremetal2/chassis/offerings/530ce92eb98a345ba74cc0f7fae932aa/actions
Request Parameters
Name | Type | Location | Description | Valid Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The UUID of the bare metal chassis offering. | 4.0.0 | |
name | String | body(contained in the updateBareMetal2ChassisOffering structure) | Optional. The name of the bare metal chassis offering. | 4.0.0 | |
description | String | body(contained in the updateBareMetal2ChassisOffering structure) | Optional. The detailed description of the bare metal chassis offering. | 4.0.0 | |
systemTags | List | body | Optional. The system tags. | 4.0.0 | |
userTags | List | body | Optional. The user tags. | 4.0.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "4f1b206549984f77a170a776ed62dd52",
"name": "BM-8C-8G",
"description": "This is bare metal instance offering.",
"architecture": "x86_64",
"cpuModelName": "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz",
"cpuNum": 8.0,
"memorySize": 8.589934592E9,
"bootMode": "UEFI",
"state": "Enabled",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.0.0 |
inventory | BareMetal2ChassisOfferingInventory | See inventory. | 4.0.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.0.0 |
description | String | The brief description of the error. | 4.0.0 |
details | String | The details about the error. | 4.0.0 |
elaboration | String | The reserved field. Default value: null. | 4.0.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.0.0 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The chassis offering UUID. | 4.0.0 |
name | String | The name of the chassis offering. | 4.0.0 |
description | String | The detailed description of the chassis offering. | 4.0.0 |
architecture | String | The CPU architecture. | 4.0.0 |
cpuModelName | String | The CPU model name. | 4.0.0 |
cpuNum | Integer | The number of CPU cores. | 4.0.0 |
memorySize | Long | The memory size. | 4.0.0 |
bootMode | String | The boot mode. | 4.0.0 |
state | String | The state of the chassis offering. | 4.0.0 |
createDate | Timestamp | The time when the chassis offering was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the chassis offering was last modified. | 4.0.0 |
SDK Sample
Java
SDK
UpdateBareMetal2ChassisOfferingAction action = new UpdateBareMetal2ChassisOfferingAction();
action.uuid = "530ce92eb98a345ba74cc0f7fae932aa";
action.name = "new-offering-name";
action.description = "new-offering-description";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateBareMetal2ChassisOfferingAction.Result res = action.call();
Python
SDK
UpdateBareMetal2ChassisOfferingAction action = UpdateBareMetal2ChassisOfferingAction()
action.uuid = "530ce92eb98a345ba74cc0f7fae932aa"
action.name = "new-offering-name"
action.description = "new-offering-description"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateBareMetal2ChassisOfferingAction.Result res = action.call()