/** * Tasks service. * @version 4.4.2 * @class TasksApi */ export class TasksApi { /** * Make the default {@link ApiClient} class available for developers to be able to extend it and bring * their own fetch methods into the SDK */ static get ApiClient(): typeof ApiClient; /** * Constructs a new TasksApi. * @alias module:api/TasksApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Cancel an ongoing task * Cancel an ongoing task for the provided taskExtId. This action is supported only if 'isCancelable' is set as True for the task. The task may continue to run for some time after the request has been made, until the backend server deems it is safe to cancel the task. Cancellation requests are idempotent and multiple such requests for the same ongoing task are supported. * @param { String } taskExtId A globally unique identifier for a task. It consists of a prefix and a UUID separated by ':'. The 'legacy' prefix can be used with a task UUID provided by previous API families. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link CancelTaskApiResponse } and HTTP response */ cancelTask(taskExtId: string, ...args: any): Promise; /** * Fetch a task * Fetches an asynchronous operation called a task for the provided external identifier. * @param { String } extId A globally unique identifier for a task. It consists of a prefix and a UUID separated by ':'. The 'legacy' prefix can be used with a task UUID provided by previous API families. * @param {Object} opts Optional parameters defined for the operation * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. If both $select and $apply query parameters are present, $select will be applied on entities within the groups. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetTaskApiResponse } and HTTP response */ getTaskById(extId: string, opts: { $select: string; }, ...args: any): Promise; /** * Fetch a job associated with a task * Fetches details of an individual job associated with a task. When a task is a batch task, it includes multiple actions, each represented as a separate job. * @param { String } taskExtId A globally unique identifier for a task. It consists of a prefix and a UUID separated by ':'. The 'legacy' prefix can be used with a task UUID provided by previous API families. * @param { String } extId A globally unique identifier for a job within a task. The identifier is a UUID. * @param {Object} opts Optional parameters defined for the operation * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. If both $select and $apply query parameters are present, $select will be applied on entities within the groups. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetTaskJobApiResponse } and HTTP response */ getTaskJobById(taskExtId: string, extId: string, opts: { $select: string; }, ...args: any): Promise; /** * List entities associated with a task * Lists entities associated with a task. * @param { String } taskExtId A globally unique identifier for a task. It consists of a prefix and a UUID separated by ':'. The 'legacy' prefix can be used with a task UUID provided by previous API families. * @param {Object} opts Optional parameters defined for the operation * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. If both $page and $apply query parameters are present, $page will be applied on entities within the groups. * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. If both $limit and $apply query parameters are present, $limit will be applied on entities within the groups. Default value of limit with $apply will be 5. * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.
* For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. If both $filter and $apply query parameters are present, $filter will be applied on entities within the groups. * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. If both $select and $apply query parameters are present, $select will be applied on entities within the groups. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListTaskEntitiesApiResponse } and HTTP response */ listTaskEntities(taskExtId: string, opts: { $page: number; $limit: number; $filter: string; $select: string; }, ...args: any): Promise; /** * List jobs associated with a task * Lists jobs associated with a task. When a task is a batch task, it includes multiple actions, each represented as a separate job. * @param { String } taskExtId A globally unique identifier for a task. It consists of a prefix and a UUID separated by ':'. The 'legacy' prefix can be used with a task UUID provided by previous API families. * @param {Object} opts Optional parameters defined for the operation * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. If both $page and $apply query parameters are present, $page will be applied on entities within the groups. * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. If both $limit and $apply query parameters are present, $limit will be applied on entities within the groups. Default value of limit with $apply will be 5. * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. If both $select and $apply query parameters are present, $select will be applied on entities within the groups. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListTaskJobsApiResponse } and HTTP response */ listTaskJobs(taskExtId: string, opts: { $page: number; $limit: number; $select: string; }, ...args: any): Promise; /** * List tasks * List of tasks in the system. The response can be further filtered/sorted using the filter and sort options provided. By default, the response would be sorted by 'createdTime' in descending order. * @param {Object} opts Optional parameters defined for the operation * @param { Number } opts.$page A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. If both $page and $apply query parameters are present, $page will be applied on entities within the groups. * @param { Number } opts.$limit A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. If both $limit and $apply query parameters are present, $limit will be applied on entities within the groups. Default value of limit with $apply will be 5. * @param { String } opts.$filter A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions.
* For example, filter **$filter=name eq 'karbon-ntnx-1.0'** would filter the result on cluster name 'karbon-ntnx1.0', filter **$filter=startswith(name, 'C')** would filter on cluster name starting with 'C'. If both $filter and $apply query parameters are present, $filter will be applied on entities within the groups. * @param { String } opts.$orderby A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, '$orderby=templateName desc' would get all templates sorted by templateName in descending order. If both $orderby and $apply query parameters are present, $orderby will be applied on entities within the groups. * @param { String } opts.$select A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. If both $select and $apply query parameters are present, $select will be applied on entities within the groups. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ListTasksApiResponse } and HTTP response */ listTasks(opts: { $page: number; $limit: number; $filter: string; $orderby: string; $select: string; }, ...args: any): Promise; #private; } import CancelTaskApiResponse from "../models/prism/v4/config/CancelTaskApiResponse"; import GetTaskApiResponse from "../models/prism/v4/config/GetTaskApiResponse"; import GetTaskJobApiResponse from "../models/prism/v4/config/GetTaskJobApiResponse"; import ListTaskEntitiesApiResponse from "../models/prism/v4/config/ListTaskEntitiesApiResponse"; import ListTaskJobsApiResponse from "../models/prism/v4/config/ListTaskJobsApiResponse"; import ListTasksApiResponse from "../models/prism/v4/config/ListTasksApiResponse"; import { ApiClient } from "../ApiClient";