Querying Information About an Instance Creation Task
Function
This API is used to query information about an instance creation task.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/dbss/audit/jobs/{resource_id}
| Parameter | Mandatory | Parameter Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| resource_id | Yes | String | Resource ID You can obtain the value from resource_id in the API for querying the instance list. |
Request Parameter
| Parameter | Mandatory | Parameter Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
Response Parameters
Status code: 200
| Parameter | Parameter Type | Description |
|---|---|---|
| jobs | Array of JobBean objects | Table for tasks of creating instances |
| Parameter | Parameter Type | Description |
|---|---|---|
| job_id | String | Task ID |
| status | String | Task status.
|
| job_type | String | Type |
| server_id | String | VM ID |
| server_name | String | VM Name |
| resource_id | String | Resource ID |
| begin_time | Long | Start time |
| end_time | Long | End time |
| charge_mode | String | Billing mode
|
| error_code | String | Error code |
| fail_reason | String | Failure cause. |
| ha_id | String | Protected instance ID. This field has been discarded. |
| ha_name | String | Protected instance name. This field has been discarded. |
Status code: 400
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 403
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 500
| Parameter | Parameter Type | Description |
|---|---|---|
| error | Object | Error message. |
| Parameter | Parameter Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Example Request
/v1/{project_id}/dbss/audit/jobs/{resource_id} Example Response
Status code: 200
Succeeded
{
"jobs": [
{
"resource_id": "2c154fdd-0d43-47b7-9cf1-5236bf6a2ca7",
"status": "SUCCESS",
"job_type": null,
"job_id": "8abf9647852a1daa01852e517e1a1a0b",
"begin_time": 1671519371000,
"end_time": 1671519417000,
"error_code": null,
"fail_reason": null,
"charge_mode": "Demand",
"server_name": "DBSS-qct-1220",
"server_id": "0aa8f621-bc19-4822-b66d-7ab9ae3c8693",
"ha_id": null,
"ha_name": null
}
]
} Status code: 400
Failed
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
} Status code: 500
Internal Server Error
{
"error" : {
"error_code" : "DBSS.XXXX",
"error_msg" : "XXX"
}
} Status Code
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Failed |
| 403 | Authentication failed. |
| 500 | Internal server error. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.