a _bo@s4ddlZddlmZmZmZmZGdddeZdS)N) SKIP_IN_PATHNamespacedClient _make_path query_paramsc@sVeZdZeddddddddd d Zedddddd d Zedddd dZdS) TasksClientactionsZdetailedZgroup_bynodesZparent_task_idtimeoutZwait_for_completionNcs|jjdd||dIdHS)a Returns a list of tasks. .. warning:: This API is **experimental** so may include breaking changes or be removed in a future version :arg actions: A comma-separated list of actions that should be returned. Leave empty to return all. :arg detailed: Return detailed task information (default: false) :arg group_by: Group tasks by nodes or parent/child relationships Valid choices: nodes, parents, none Default: nodes :arg nodes: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes :arg parent_task_id: Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. :arg timeout: Explicit operation timeout :arg wait_for_completion: Wait for the matching tasks to complete (default: false) GETz/_tasksparamsheadersN) transportperform_request)selfr rrG/tmp/pip-target-4jja1joz/lib/python/opensearchpy/_async/client/tasks.pylist!s!zTasksClient.listcs"|jjdtd|d||dIdHS)a Cancels a task, if it can be cancelled through an API. .. warning:: This API is **experimental** so may include breaking changes or be removed in a future version :arg task_id: Cancel the task with specified task id (node_id:task_number) :arg actions: A comma-separated list of actions that should be cancelled. Leave empty to cancel all. :arg nodes: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes :arg parent_task_id: Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. :arg wait_for_completion: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false POST_tasksZ_cancelr N)rrrrtask_idr rrrrcancelFs  zTasksClient.cancelcs8|tvrtjdtdd|jjdtd|||dIdHS)a Returns information about a task. .. warning:: This API is **experimental** so may include breaking changes or be removed in a future version :arg task_id: Return the task with specified id (node_id:task_number) :arg timeout: Explicit operation timeout :arg wait_for_completion: Wait for the matching tasks to complete (default: false) zxCalling client.tasks.get() without a task_id is deprecated and will be removed in v8.0. Use client.tasks.list() instead.)category stacklevelr rr N)rwarningswarnDeprecationWarningrrrrrrrgeteszTasksClient.get)NN)NNN)NNN)__name__ __module__ __qualname__rrrr rrrrr s   r)rutilsrrrrrrrrrs