Creates a scheduled task for an OpenSearch application.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
opensearch:CreateScheduledTask |
*ScheduledTask
|
None | None |
Request syntax
POST /v4/openapi/app-groups/{appGroupIdentity}/scheduled-tasks HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| appGroupIdentity |
string |
Yes |
The name of the application. |
my_app_group_name |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
ScheduledTask |
No |
The request body. |
Request body
| Parameter | Type | Required | Example | Description |
| type | String | Yes | "wipe" | The type of the scheduled task. - wipe: data scrubbing - fork: data import and reindexing - reindex: reindexing - clear: data clearing |
| cron | String | Yes | "10 20 * * 1,2,3,4,5" | The configuration of the scheduled task. For more information, see cron field in ScheduledTask |
| enabled | Boolean | Yes | true | Specifies whether to enable the scheduled task. |
| appStrategy | String | No | delete-idle | The policy for creating a new version. - delete-idle: If two versions exist, the inactive version is deleted before a new version is created. - need-slot: If only one version exists, a new version is created. |
| filter | Object | No | The conditions that are used to clear data. | |
| filter.days | Integer | Yes | 7 | The number of days after which the data expires. Valid values: [7, 180]. |
| filter.unit | String | Yes | "s" | The unit of the expiration time. - s: seconds - ms: milliseconds |
| filter.field | String | No | "cate_id" | The field that is used to determine data expiration. |
| runNow | Boolean | No | false | Specifies whether to run the task immediately. Default value: false. |
| permanent | Boolean | No | true | Specifies whether the task is permanent. Default value: true. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| result |
object |
The information about the scheduled task. For more information, see ScheduledTask. |
{} |
| requestId |
string |
The ID of the request. |
ABCDEFGH |
Examples
Success response
JSON format
{
"result": {},
"requestId": "ABCDEFGH"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.