Class CancelTasksDescriptor
Descriptor for Cancel
https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling
Inheritance
CancelTasksDescriptor
Inherited Members
Namespace: OpenSearch .Client
Assembly: OpenSearch.Client.dll
Syntax
public class CancelTasksDescriptor : RequestDescriptorBase<CancelTasksDescriptor, CancelTasksRequestParameters, ICancelTasksRequest>, IDescriptor, ICancelTasksRequest, IRequest<CancelTasksRequestParameters>, IRequest
Constructors
| Edit this page View SourceCancelTasksDescriptor()
/_tasks/_cancel
Declaration
public CancelTasksDescriptor()
CancelTasksDescriptor(TaskId)
/_tasks/{task_id}/_cancel
Declaration
public CancelTasksDescriptor(TaskId taskId)
Parameters
Type | Name | Description |
---|---|---|
Task |
taskId | Optional, accepts null |
Methods
| Edit this page View SourceActions(params string[])
A comma-separated list of actions that should be returned. Keep empty to return all.
Declaration
public CancelTasksDescriptor Actions(params string[] actions)
Parameters
Type | Name | Description |
---|---|---|
string[] | actions |
Returns
Type | Description |
---|---|
Cancel |
Nodes(params string[])
A comma-separated list of node IDs or names used to limit the returned information. Use _local
to return information from the node you're connecting to, specify the node name to get information from a specific node, or keep the parameter empty to get information from all nodes.
Declaration
public CancelTasksDescriptor Nodes(params string[] nodes)
Parameters
Type | Name | Description |
---|---|---|
string[] | nodes |
Returns
Type | Description |
---|---|
Cancel |
ParentTaskId(string)
Returns tasks with a specified parent task ID (node_id:task_number
). Keep empty or set to -1 to return all.
Declaration
public CancelTasksDescriptor ParentTaskId(string parenttaskid)
Parameters
Type | Name | Description |
---|---|---|
string | parenttaskid |
Returns
Type | Description |
---|---|
Cancel |
TaskId(TaskId)
The task ID.
Declaration
public CancelTasksDescriptor TaskId(TaskId taskId)
Parameters
Type | Name | Description |
---|---|---|
Task |
taskId |
Returns
Type | Description |
---|---|
Cancel |
WaitForCompletion(bool?)
Waits for the matching task to complete. When true
, the request is blocked until the task has completed.
Declaration
public CancelTasksDescriptor WaitForCompletion(bool? waitforcompletion = true)
Parameters
Type | Name | Description |
---|---|---|
bool? | waitforcompletion |
Returns
Type | Description |
---|---|
Cancel |