/** * Upgrades service. * @version 4.3.1 * @class UpgradesApi */ export class UpgradesApi { /** * 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 UpgradesApi. * @alias module:api/UpgradesApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Perform an upgrade operation on one or more LCM entities. * Perform an upgrade operation to update one or more LCM entities to their specified target versions. Before invoking an upgrade, ensure you have: (1) run an inventory (POST /$actions/inventory) to discover entities, (2) computed recommendations (POST /$actions/compute-recommendations) to resolve dependencies and obtain validated entityUpdateSpecs, (3) optionally reviewed notifications (POST /$actions/compute-notifications) to understand the upgrade impact, and (4) run prechecks (POST /$actions/prechecks) to validate cluster readiness. Submit an UpgradeSpec containing the entityUpdateSpecs (entity UUID and target version pairs). For ESX or Hyper-V clusters, provide the managementServer credentials. Use autoHandleFlags to allow LCM to automatically power off pinned VMs during maintenance mode and restore them after the upgrade. 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; monitor the task via the Prism tasks API. Use GET /status to check whether an upgrade is already in progress. Only one upgrade can run on a cluster at a time. Requires the NTNX-Request-Id header (a UUID v4 value) for idempotency. In dark-site mode, ensure the required bundles have been uploaded (POST /bundles) before running the upgrade; images are not downloaded from the portal. * @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 { Boolean } opts.$dryrun A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link UpgradeApiResponse } and HTTP response */ performUpgrade(body: Required> & Partial, opts: { xClusterId: string; $dryrun: boolean; }, ...args: any): Promise; #private; } import UpgradeSpec from "../models/lifecycle/v4/common/UpgradeSpec"; import UpgradeApiResponse from "../models/lifecycle/v4/operations/UpgradeApiResponse"; import { ApiClient } from "../ApiClient";