Function
This API is used to obtain information about allowed, not allowed, and current operations of a specified task.
Constraints
This API can be used only in certain regions. For details, see Endpoints.
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 and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permissions are required for calling this API.
URI
GET /v5/{project_id}/jobs/{job_id}/actions
Table 1 URI parameters Parameter | Mandatory | Type | Description |
|---|
project_id | Yes | String | Project ID of a tenant in a region. For details, see Obtaining a Project ID. |
job_id | Yes | String | Task ID. |
Response Parameters
Status code: 200
Table 3 Response body parameters Parameter | Type | Description |
|---|
job_action | Object | Collection of allowed and not allowed operations. For details, see Table 4. |
Table 4 Data structure description of field job_actionParameter | Type | Description |
|---|
available_actions | Array of strings | The collection of operation commands that can be executed for a task. The value can be: - CREATE: indicates the operation command for creating a task.
- CHOOSE_OBJECT: indicates the operation command for selecting objects during the incremental task editing.
- PRE_CHECK: indicates the operation command for pre-check.
- CHANGE_MODE: indicates the operation command for changing the task mode.
- FREE_RESOURCE: indicates the operation command for releasing resources.
- MODIFY_DB_CONFIG: indicates the operation command for modifying database configurations.
- RESET_DB_PWD: indicates the operation command for resetting the password of the source or destination database.
- MODIFY_CONFIGURATION: indicates the operation command for modifying task configurations.
- PAUSE: indicates the operation command for pausing a task.
- START: indicates the operation command for starting a task.
- CHANGE: indicates the operation command for modifying a task.
- RETRY: indicates the operation command for retrying a task.
- RESET: indicates the operation command for resetting a task.
- DELETE: indicates the operation command for deleting a task.
- QUERY_PRE_CHECK: indicates the operation command for performing a pre-check.
- SWITCH_OVER: indicates the operation command for performing a DR switchover.
- START_INCR: indicates the operation command for starting an incremental Cassandra task.
- MODIFY_TASK_NUMBER: indicates the operation command for modifying the number of Cassandra threads.
- CONTINUE_JOB: indicates the operation command for resuming a failed or stopped task from Oracle to GaussDB distributed.
- STOP_JOB: indicates the operation command for stopping a task from Oracle to GaussDB distributed.
- CONTINUE_CAPTURE: indicates the operation command for starting data capture.
- STOP_CAPTURE: indicates the operation command for stopping data capture.
- CONTINUE_APPLY: indicates the operation command for starting data replay.
- STOP_APPLY: indicates the operation command for stopping data replay.
- PAY_ORDER: indicates the operation command for paying a yearly/monthly order.
- UNSUBSCRIBE: indicates the operation command for unsubscribing from a yearly/monthly subscription.
- TO_PERIOD: indicates the operation command for changing the billing mode from pay-per-use to yearly/monthly.
- TO_RENEW: indicates the operation command for renewing a yearly/monthly subscription.
- ORDER_INFO: indicates the operation command for querying order details.
- CHANGE_FLAVOR: indicates the operation command for changing task specifications.
- CLONE: indicates the operation command for cloning a task.
|
unavailable_actions | Array of strings | The collection of operation commands that cannot be executed for a task. The value can be: - CREATE: indicates the operation command for creating a task.
- CHOOSE_OBJECT: indicates the operation command for selecting objects during the incremental task editing.
- PRE_CHECK: indicates the operation command for pre-check.
- CHANGE_MODE: indicates the operation command for changing the task mode.
- FREE_RESOURCE: indicates the operation command for releasing resources.
- MODIFY_DB_CONFIG: indicates the operation command for modifying database configurations.
- RESET_DB_PWD: indicates the operation command for resetting the password of the source or destination database.
- MODIFY_CONFIGURATION: indicates the operation command for modifying task configurations.
- PAUSE: indicates the operation command for pausing a task.
- START: indicates the operation command for starting a task.
- CHANGE: indicates the operation command for modifying a task.
- RETRY: indicates the operation command for retrying a task.
- RESET: indicates the operation command for resetting a task.
- DELETE: indicates the operation command for deleting a task.
- QUERY_PRE_CHECK: indicates the operation command for performing a pre-check.
- SWITCH_OVER: indicates the operation command for performing a DR switchover.
- START_INCR: indicates the operation command for starting an incremental Cassandra task.
- MODIFY_TASK_NUMBER: indicates the operation command for modifying the number of Cassandra threads.
- CONTINUE_JOB: indicates the operation command for resuming a failed or stopped task from Oracle to GaussDB distributed.
- STOP_JOB: indicates the operation command for stopping a task from Oracle to GaussDB distributed.
- CONTINUE_CAPTURE: indicates the operation command for starting data capture.
- STOP_CAPTURE: indicates the operation command for stopping data capture.
- CONTINUE_APPLY: indicates the operation command for starting data replay.
- STOP_APPLY: indicates the operation command for stopping data replay.
- PAY_ORDER: indicates the operation command for paying a yearly/monthly order.
- UNSUBSCRIBE: indicates the operation command for unsubscribing from a yearly/monthly subscription.
- TO_PERIOD: indicates the operation command for changing the billing mode from pay-per-use to yearly/monthly.
- TO_RENEW: indicates the operation command for renewing a yearly/monthly subscription.
- ORDER_INFO: indicates the operation command for querying order details.
- CHANGE_FLAVOR: indicates the operation command for changing task specifications.
- CLONE: indicates the operation command for cloning a task.
|
current_action | String | The current operation. |
Status code: 422
Table 5 Response body parameters Parameter | Type | Description |
|---|
error_code | String | Error code. Minimum length: 12 Maximum length: 12 |
error_msg | String | Error message. Minimum length: 1 Maximum length: 512 |
Example Request
Obtaining the operation information about a specified task
https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/actions Example Response
Status code: 200
OK
{
"job_action": {
"available_actions": [
"CREATE",
"CHOOSE_OBJECT",
"PRE_CHECK"
],
"unavailable_actions": [
"START",
"QUICK_START",
"CHANGE",
"RETRY"
],
"current_action": "SWITCH_OVER"
}
} Status code: 400
Bad Request
{
"error_code": "DRS.10000001",
"error_msg": "Failed."
}