Skip to content

elasticsearch cancel-tasks

Cancel a long-running task

Description

If a long-running task supports cancellation, it can be cancelled with the cancel-tasks

Synopsis

elasticsearch cancel-tasks
    [--site <site>]
    [--cluster <cluster>]
    [--task_id <task_id>]
    [--actions <actions>]
    [--node_id <node_id>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

cluster - (string)

     Name of elastic search cluster
     Example: --cluster "elastic-default"
     Default: elastic-default      Attributes: optional

task_id - (string)

     Task Id to cancel
     Example: --task_id "oTUltX4IQMOUUVeiohTt8A:124"
     Default: _None_      Attributes: optional

actions - (string)

     Used to cancel multiple tasks of same action at a time
     Example: --actions "cluster:*, *search"
     Default: _None_      Attributes: optional, multiple allowed

node_id - (string)

     Node IDs or names used to limit tasks to cancel
     Example: --node_id "node-1"
     Default: _None_      Attributes: optional, multiple allowed

Examples

elasticsearch cancel-tasks --task_id "oTUltX4IQMOUUVeiohTt8A:124" --actions "cluster:, search" --node_id "node-1"

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "elasticsearch"
Service Instance cluster
Namespace
Object Type "task"
Object ID

Please see Access Control for details.