Querying Task Execution Statuses (discarded)
Function
Queries the job execution status.
job_id, which is returned after the creation of an Application Streaming server starts. job_id can be used for querying the job execution status.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:jobs:get
Read
-
-
-
-
URI
GET /v1/{project_id}/job/{job_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Unique ID of a project |
| job_id | Yes | String | Job ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| job | JobDetail object | Job details. |
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Job ID. |
| job_type | Integer | Task type. The value is fixed to 1. |
| job_status | Integer | Task execution status. 0: failed (If a subscription fails, CBC refunds the fee to the customer after confirming the subscription status. If a change fails, an O&M service ticket is generated, and the fee will not be refunded to the customer.) 1: successful (Request handling succeeded.) 2: handling 3: initializing |
| sub_jobs | Array of SubJobInfo objects | Subjob information. |
| begin_time | String | Start time for handling a job. |
| end_time | String | End time for handling a job. |
| expected_end_time | String | Estimated job processing end time of the cloud service. This parameter is valid only for jobs. |
| execute_code | String | Result code for job execution. |
| execute_message | String | Description of the execution result of the job and subjobs. |
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Subjob ID. |
| job_type | Integer | Job type. The value is fixed to 2, indicating a subjob. |
| job_status | Integer | Job status. Options: 0: failed. 1: successful. 2: processing. 3: initializing. |
| entities | Array of JobResourceInfo objects | The cloud service/resource object to be processed in a subjob. This field is mandatory for object creation and specification change, and optional for scenarios such as freezing, unfreezing, and deletion. |
| begin_time | String | Job start time. |
| end_time | String | Job end time. |
| expected_end_time | String | Estimated job processing end time of the cloud service. This parameter is valid only for jobs. |
| execute_code | String | Result code for job execution. |
| execute_message | String | Description of the execution result of the job and subjobs. |
| Parameter | Type | Description |
|---|---|---|
| resource_id | String | Resource instance ID is displayed on the cloud service console. The value is globally unique and cannot be changed. The value contains up to 64 characters. Note: In specification change scenarios (including upgrading and downgrading), only the specifications are adjusted. Other information (such as resource ID and resource name) and running service data of the resource instance remain unchanged. |
| resource_name | String | Resource name. This field is mandatory in the scenario where a resource is created or a new resource name is available. |
| cloud_service_type | String | Cloud service type code. This field is mandatory in new purchase and specification change scenarios. |
| resource_type | String | Resource type code. This parameter is mandatory in new purchase and specification change scenarios. -hws.resource.type.workspace.volume: Workspace desktop disk -hws.resource.type.workspace.desktop: Workspace desktop -hws.resource.type.workspace.appstream: Workspace Application Streaming -hws.resource.type.workspace.appstreamsession: Workspace Application Streaming multi-session |
| resource_spec_code | String | Resource specification code. This field is mandatory in new purchase and specification change scenarios. |
| spec_type | Map<String,Object> | Type of the specification that needs to be displayed and used for operations. Use multiple key-value pairs to specify different specification types. For example, the bandwidth can be shared or exclusive (shareable:true/false), and a disk can be system disk or data disk (root:true/false). This field is mandatory for shared bandwidth and shared disk setting. |
| spec_size | Double | Specification size, such as the bandwidth and data disk size. |
| measure | Integer | specSize unit code, for example, GB and M. This field is mandatory when specSize is set. |
| processed_time | String | Processing time. |
| is_main_resource | Integer | Whether the resource specified by resourceId is a primary resource. This parameter is used only in service enabling scenario. 1: yes. 0: no. |
| main_resources | Array of RelativeResource objects | Primary resource specified by resourceId. Primary resource to which the resource is attached, bound, included, or associated. For example, the primary resource of an IP address or a data disk can be a cloud server. If resourceId is attached to multiple resources, there will be multiple primary resources. For example, a shared disk is mounted to multiple cloud servers. If no primary resource is associated, leave this field empty, for example, when a data disk is not mounted to any cloud server. |
| extend_params | String | expireTime: expiration time, used for Domain Name Service (DNS). UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. Example: 2016-06-28T00:00:00Z. |
| old_resource_id | String | This field is used only for ECS or BMS OS change. The resource ID changes with the cloud server OS. Enter the resource ID that was used before the change. This field is invalid if the resource ID does not change. |
| old_cloud_service_type | String | This field is used only for ECS or BMS OS change. Specifically, the cloud service type code changes with the cloud server OS. Enter the cloud service type code that was used before the change. This field is invalid if the cloud service type does not change. |
| old_resource_type | String | This parameter is used only for ECS or BMS OS change. The resource type code changes with the cloud server OS. Enter the old resource type code before the change. This field does not exist if the resource type does not change. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 405
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 503
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
GET /v1/29dfe82ada564ac2b927e1ff036d9a9b/job/575768277444198400
Example Responses
Status code: 200
Response to a successful request.
{
"job" : {
"job_id" : "575768277444198400",
"job_type" : 1,
"job_status" : 0,
"sub_jobs" : [ {
"job_id" : "575768277481947136",
"job_type" : 2,
"job_status" : 0,
"entities" : [ ],
"begin_time" : "2023-06-06T02:30:06Z",
"end_time" : "2023-06-06T02:45:49Z"
} ],
"begin_time" : "2023-06-06T02:30:06Z",
"end_time" : "2023-06-06T02:45:49Z",
"expected_end_time" : "2023-06-06T15:55:57Z",
"execute_code" : "",
"execute_message" : ""
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request. |
| 400 | The request cannot be understood by the server due to malformed syntax. |
| 401 | Authentication failed. |
| 403 | Permissions required. |
| 404 | Resources not found. |
| 405 | The method specified in the request is not allowed. |
| 500 | An internal service error occurred. For details, see the error code description. |
| 503 | Service unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot