Modifying a scheduling task
Function
Modify a scheduling task.
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.
URI
POST /v1/{project_id}/cluster/{cluster_id}/operational-tasks/{task_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: None Range: None Default Value: None |
| cluster_id | Yes | String | Definition: Cluster ID For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints: None Range: None Default Value: None |
| task_id | Yes | String | Definition: Task ID. You can query all tasks through the task list API. Constraints: None Range: None Default Value: None |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| task_name | No | String | Definition: Job name. Constraints: None Range: The value is not null. Default Value: None |
| description | No | String | Definition: Description about the IPv6 address or CIDR block. Constraints: None Range: None Default Value: None |
| start_time | No | String | Definition: Start time. Constraints: None Range: None Default Value: None |
| end_time | No | String | Definition: End time. Constraints: None Range: The value is not null. Default Value: None |
| white_list | No | Array of DateInfo objects | Definition: Execution plan. Constraints: None Range: The value is not null. Default Value: None |
| type | No | String | Definition: Job type Constraints: None Range: Date: one-off task; Window: periodic task; Default Value: None |
| vacuum_mode | No | String | Definition: Task mode Constraints: None Range: The value is not null. Default Value: None |
| vacuum_target | No | String | Definition Autovacuum target. Constraints N/A Range user_vacuumfull: VACUUM FULL for user tables system_vacuum: VACUUM FULL for system tables Default Value N/A |
| vacuum_threshold | No | String | Definition Expansion rate, in percentage. Constraints N/A Range You are advised to set this parameter to the current cluster space usage plus 10%. Do not set it to higher than 80%. Default Value N/A |
| vacuum_retrieving_space | No | String | Definition Reclaimable space of the target table. Constraints N/A Range Non-null Default Value N/A |
| vacuum_priority | No | String | Definition: Priority. Constraints: None Range: The value is not null. Default Value: None |
| time_zone | No | String | Definition: Time zone offset information. Constraints: None Range: -2659~+2459 Default Value: None |
| priority | No | Array of TableInfoOpen objects | Definition: Priority table information. Default Value: None |
| category | No | String | Definition: Category information. Default Value: Vacuum |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| date_type | No | String | Definition: Date type. For example, if the scheduled task is executed on the first day of each month, the value is 1th. Constraints: None Range: None Default Value: None |
| date_start | No | String | Definition: Start time, for example, 04:00:00. Constraints: None Range: None Default Value: None |
| date_end | No | String | Definition: End time, for example, 08:00:00. Constraints: None Range: None Default Value: None |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Modify related configurations.
post https://{Endpoint}/v1/169439ece752470aa5171633e9d3e47f/clusters/50aee999-9215-4dd0-a142-254ac6bf80e7/operational-tasks/rc32293bc4df4449984fb5314b490cc4
{
"category" : "VacuumFull",
"description" : "desc",
"type" : "Window",
"task_name" : "test1",
"start_time" : "2025-12-31T20:00:00Z",
"end_time" : "2026-01-01T00:00:00Z",
"white_list" : [ {
"date_type" : "31th",
"date_start" : "20:00:00",
"date_end" : "23:59:59"
}, {
"date_type" : "1th",
"date_start" : "00:00:00",
"date_end" : "00:00:00"
} ],
"vacuum_mode" : "manual",
"vacuum_target" : "",
"vacuum_threshold" : "",
"vacuum_retrieving_space" : "",
"priority" : [ {
"database_name" : null,
"schema_name" : "public",
"table_name" : "a"
} ],
"time_zone" : null
} Example Responses
Status code: 200
{ } Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Request error. |
| 401 | Authentication failed. |
| 403 | No operation permissions. |
| 404 | No resources found. |
| 500 | Internal service error. |
| 503 | Service unavailable. |
What is your overall rating for this page?
Thank 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