Querying the Resource Task List
Function
This API is used to query the resource task list.
Calling Method
For details, see Calling APIs.
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 |
|---|---|---|---|---|---|
| vpn:vpnGateways:listResourceJobs | list | - | - | - | - |
URI
GET /v5/{project_id}/vpn-gateways/jobs
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| resource_id | String | No | Specifies a resource ID. |
| limit | Integer | No | Specifies the number of records returned on each page during pagination query. |
| marker | String | No |
|
Request
Response
- Response parameters
Returned status code 200: successful query
Table 3 Parameters in the response body Parameter
Type
Description
jobs
Array of Job objects
Specifies task information.
total_count
Integer
Specifies the total number of gateways.
page_info
PageInfo object
Specifies pagination query information.
request_id
String
Specifies a request ID.
Table 4 Job Parameter
Type
Description
id
String
- Specifies a task ID.
- The value is a UUID containing 36 characters.
resource_id
String
- Specifies a VPN gateway resource ID.
- The value is a UUID containing 36 characters.
job_type
String
- Specifies a task type.
- The value can be upgrade or rollback.
status
String
- Specifies the status of the VPN gateway.
- Value range:
- init: Initialization is in progress.
- running: A task is in progress.
- upgrading: The upgrade is in progress.
- pending_upgrade_confirm: The upgrade is to be committed.
- success: The upgrade is successful.
- rolling_back: The rollback is in progress.
- rollback_success: The rollback is successful.
- fail: The upgrade fails.
expected_time_seconds
Integer
- Specifies the expected remaining execution time.
- Unit: seconds
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
finished_at
String
- Specifies the end time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
Table 5 SubJob Parameter
Type
Description
id
String
- Specifies a task ID.
- The value is a UUID containing 36 characters.
job_type
String
- Specifies a task type.
- Value range:
- prepare_resource
- upgrade_worker_1
- upgrade_worker_2
- migrate_traffic_1
- migrate_traffic_2
- migrate_network_1
- migrate_network_2
- service_ready_check_1
- service_ready_check_2
entity
SubJobEntity object
- Specifies resource information.
status
String
- Specifies the task status.
- Value range:
- init: Initialization is in progress.
- running: A task is in progress.
- upgrading: The upgrade is in progress.
- success: The upgrade is successful.
- fail: The upgrade fails.
expected_time_seconds
Integer
- Specifies the expected duration of the execution.
- Unit: seconds
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
finished_at
String
- Specifies the end time.
- The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
error_message
String
- Indicates error information.
- Example response
{ "request_id": "7c938e41c510f1bf53b4cb3d142b841c", "jobs": [ { "id": "5968875c-8c28-447c-bd36-7b4917e5b742", "resource_id": "f8576538-0ffa-45d7-97f5-9783e0228cb5", "job_type": "upgrade", "status": "success", "created_at": "2026-03-18T15:08:53.679462Z", "finished_at": "2026-03-18T15:10:26.953831Z", "sub_jobs": [ { "id": "ae7e8440-ce63-4fd0-98ae-84209fa4219d", "job_type": "prepare_resource", "entity": {}, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.200096878Z", "finished_at": "2026-03-18T15:09:38.104329871Z" }, { "id": "c36cc41e-dc09-4e1f-9033-55bfc46628e0", "job_type": "migrate_traffic_1", "entity": { "ip_address": "192.168.1.2" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.47287635Z", "finished_at": "2026-03-18T15:09:50.056544567Z" }, { "id": "046158d6-9565-4696-b291-d86a4f76a387", "job_type": "migrate_network_1", "entity": { "ip_address": "192.168.1.2" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.513965159Z", "finished_at": "2026-03-18T15:10:02.279932603Z" }, { "id": "4f57ac3f-3052-4e17-a195-17a7d7e47b62", "job_type": "service_ready_check_1", "entity": { "ip_address": "192.168.1.2" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.556529748Z", "finished_at": "2026-03-18T15:10:02.502339602Z" }, { "id": "41b9976e-5ff2-49db-8449-3abf804d9a57", "job_type": "migrate_traffic_2", "entity": { "ip_address": "192.168.1.20" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.594430844Z", "finished_at": "2026-03-18T15:10:14.503148811Z" }, { "id": "2505809a-bf52-4905-80fb-64ce2a204946", "job_type": "migrate_network_2", "entity": { "ip_address": "192.168.1.20" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.631862559Z", "finished_at": "2026-03-18T15:10:26.675384941Z" }, { "id": "5b56c1e4-d564-4089-811b-60effd36b062", "job_type": "service_ready_check_2", "entity": { "ip_address": "192.168.1.20" }, "status": "success", "expected_time_seconds": 0, "created_at": "2026-03-18T15:08:53.669949909Z", "finished_at": "2026-03-18T15:10:26.876399281Z" } ] } ], "total_count": 1, "page_info": { "current_count": 1 } }
Status Codes
For details, see Status 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