Get Bare Metal Chassis Power Status
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal/chassis/1fcf1caf5dae30f08ff995620a5bdffd/powerstatusParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | UUID of the resource, uniquely identifying the resource | 2.6.0 | |
| systemTags (Optional) | List | query | System Tag | 2.6.0 | |
| userTags (Optional) | List | query | User Tag | 2.6.0 |
API Response
Response Example
{
"status": "ON"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| status | String | Power status | 2.6.0 |
| success | boolean | 2.6.0 | |
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 2.6.0 |
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
GetBaremetalChassisPowerStatusAction action = new GetBaremetalChassisPowerStatusAction();
action.uuid = "1fcf1caf5dae30f08ff995620a5bdffd";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetBaremetalChassisPowerStatusAction.Result res = action.call();Python SDK
action = GetBaremetalChassisPowerStatusAction()
action.uuid = "1fcf1caf5dae30f08ff995620a5bdffd"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()