/** * Recommendations service. * @version 4.3.1 * @class RecommendationsApi */ export class RecommendationsApi { /** * 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 RecommendationsApi. * @alias module:api/RecommendationsApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Compute upgrade recommendations for a set of LCM entities. * Compute upgrade recommendations for a set of LCM entities. Recommendations resolve inter-entity dependencies, identify additional entities that must be co-upgraded, and produce a validated list of entityUpdateSpecs ready for use in prechecks (POST /$actions/prechecks) and upgrades (POST /$actions/upgrade). Submit a RecommendationSpec containing one of four input types: entity types (SOFTWARE/FIRMWARE) for broad recommendations, target entities for entity-class/model-based selection, entity update specs for specific UUID-to-version mappings, or deploy specs for pre-deployment planning. 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. Once the task completes successfully, retrieve the resource identifier from the task's completion_details field and use GET /recommendations/{extId} to fetch the computed recommendation results. The result resource is valid for 1 hour from creation. Requires the NTNX-Request-Id header (a UUID v4 value) for idempotency. In dark-site mode, recommendations are limited to updates available from uploaded bundles. * @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 ComputeRecommendationsApiResponse } and HTTP response */ computeRecommendations(body: Required> & Partial, opts: { xClusterId: string; }, ...args: any): Promise; /** * Retrieve a computed upgrade recommendation result by its resource identifier. * Retrieve the computed upgrade recommendation result by its resource identifier. The resource identifier is obtained from the completion_details field of the task returned by POST /$actions/compute-recommendations. The result includes the resolved entityUpdateSpecs (entity UUID and target version pairs), any entities that were skipped, modified, or added during dependency resolution, and deployable version information. The recommendation result is valid for 1 hour from the time it was computed. Use the entityUpdateSpecs from the result as input to POST /$actions/prechecks and POST /$actions/upgrade. * @param { String } extId The resource identifier (UUID) of the computed upgrade recommendation. Obtained from the completion_details of the task returned by POST /$actions/compute-recommendations. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetRecommendationByIdApiResponse } and HTTP response */ getRecommendationById(extId: string, ...args: any): Promise; #private; } import RecommendationSpec from "../models/lifecycle/v4/resources/RecommendationSpec"; import ComputeRecommendationsApiResponse from "../models/lifecycle/v4/operations/ComputeRecommendationsApiResponse"; import GetRecommendationByIdApiResponse from "../models/lifecycle/v4/resources/GetRecommendationByIdApiResponse"; import { ApiClient } from "../ApiClient";