/** * Entities service. * @version 4.3.1 * @class EntitiesApi */ export class EntitiesApi { /** * 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 EntitiesApi. * @alias module:api/EntitiesApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Export the entity inventory as a downloadable file. * Export the entity inventory information of connected clusters as a downloadable file. The exported file contains the full list of LCM entities (software and firmware) discovered across one or more clusters, including their versions, locations, and available updates. The operation is asynchronous and returns a TaskReference. Once the task completes successfully, the URL to download the exported file is available in the completion_details field of the task. Submit an ExportInventorySpec with the desired file format (CSV). Requires the NTNX-Request-Id header (a UUID v4 value) for idempotency. * @param { Required> & Partial } body specification * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link ExportInventoryApiResponse } and HTTP response */ exportInventory(body: Required> & Partial, ...args: any): Promise; /** * Retrieve details of a single LCM entity by its identifier. * Retrieve the full details of a single LCM entity by its external identifier. The response includes the entity class, model, type (SOFTWARE or FIRMWARE), current installed version, target upgrade version (if set), available versions with dependency and release-note information, location (node or cluster scope), device identifier, hardware vendor, and sub-entity details. Entities are populated by the inventory operation (POST /$actions/inventory); if no inventory has been run, this endpoint returns a 404. To plan an upgrade for this entity, use POST /$actions/compute-recommendations. * @param { String } extId The external identifier (UUID) of the LCM entity to retrieve. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetEntityByIdApiResponse } and HTTP response */ getEntityById(extId: string, ...args: any): Promise; /** * List all LCM entities discovered on the cluster. * Retrieve a paginated list of all LCM entities discovered on the cluster. Supports standard query parameters for pagination ($page, $limit), filtering ($filter), sorting ($orderby), and field projection ($select). Each entity includes its class, model, type, current version, available upgrade versions, and location. Entities are populated by the inventory operation (POST /$actions/inventory); if no inventory has been run, the list will be empty. Use this endpoint to browse available updates before computing recommendations (POST /$actions/compute-recommendations) or performing an upgrade (POST /$actions/upgrade). * @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 ListEntitiesApiResponse } and HTTP response */ listEntities(opts: { $page: number; $limit: number; $filter: string; $orderby: string; $select: string; }, ...args: any): Promise; /** * Pre-stage upgrade images on the cluster for a set of entities. * Pre-stage upgrade images on the cluster before performing an upgrade. Preloading downloads the required images from the LCM repository (or catalog) to the cluster nodes so that they are immediately available when the upgrade is executed, reducing upgrade downtime. Submit a PreloadSpec containing entity update specifications (entity UUID and target version pairs) identifying which entities' images to preload. When operating from Prism Central, supply the X-Cluster-Id header to target a specific Prism Element cluster; if omitted, the operation targets the Prism Central cluster itself. The operation is asynchronous and returns a TaskReference; poll the task to track download progress. After preloading, the isImagePresent field on the entity's available versions (GET /entities) will reflect that images are ready. Requires the NTNX-Request-Id header (a UUID v4 value) for idempotency. * @param { Required> & Partial } body specification * @param {Object} opts Optional parameters defined for the operation * @param { String } opts.xClusterId The cluster UUID on which the resource is present or the operation is being performed. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link PreloadArtifactsApiResponse } and HTTP response */ preloadArtifacts(body: Required> & Partial, opts: { xClusterId: string; }, ...args: any): Promise; #private; } import ExportInventorySpec from "../models/lifecycle/v4/resources/ExportInventorySpec"; import ExportInventoryApiResponse from "../models/lifecycle/v4/resources/ExportInventoryApiResponse"; import GetEntityByIdApiResponse from "../models/lifecycle/v4/resources/GetEntityByIdApiResponse"; import ListEntitiesApiResponse from "../models/lifecycle/v4/resources/ListEntitiesApiResponse"; import PreloadSpec from "../models/lifecycle/v4/common/PreloadSpec"; import PreloadArtifactsApiResponse from "../models/lifecycle/v4/operations/PreloadArtifactsApiResponse"; import { ApiClient } from "../ApiClient";