/** * Bundles service. * @version 4.3.1 * @class BundlesApi */ export class BundlesApi { /** * 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 BundlesApi. * @alias module:api/BundlesApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Create a new LCM bundle on the cluster (finalize after streaming to objects-lite via S3 PUT). * Create a new LCM bundle on the cluster. Bundle creation is a 2-step process. Step 1: Stream the bundle bits from the user's local setup to the objects-lite service using the AWS S3 PUT API. Use base64-encoded username and password of a Prism Admin or Super Admin user as credentials. Alternatively, if the bundle is hosted somewhere accessible (e.g., external server or Nutanix Portal), provide a URL source to avoid Step 1; LCM will download the bundle from the URL. Step 2: Finalize the bundle by calling this CreateBundle v4 API with the object key from Step 1 in the name field (or omit name when using URL source). The request body must include the bundle vendor and may include a checksum (for verification). The operation is asynchronous and returns a TaskReference; poll the task to track progress. After a bundle is successfully created, run an inventory (POST /$actions/inventory) to discover the newly available updates from the bundle's images. 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 CreateBundleApiResponse } and HTTP response */ createBundle(body: Required> & Partial, ...args: any): Promise; /** * Delete an LCM bundle from the cluster. * Delete an LCM bundle and its associated images from the cluster. This operation is asynchronous and returns a TaskReference; poll the task to confirm deletion completed. Deleting a bundle removes the upgrade images it contains, which may affect the ability to perform upgrades for the corresponding entities until new images are provided. Requires the NTNX-Request-Id header (a UUID v4 value) for idempotency. * @param { String } extId The external identifier (UUID) of the LCM bundle. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link DeleteBundleByIdApiResponse } and HTTP response */ deleteBundleById(extId: string, ...args: any): Promise; /** * Retrieve details of a specific LCM bundle. * Retrieve the full details of a specific LCM bundle by its external identifier. The response includes the bundle name, size, type (SOFTWARE, FIRMWARE, PRODUCT_META, FRAMEWORK, or IMAGE_BUNDLE), vendor, creation timestamp, contained images, checksum, and upload mode. Bundles are used primarily in dark-site deployments to deliver upgrade images to a cluster that lacks internet connectivity. * @param { String } extId The external identifier (UUID) of the LCM bundle. * @param {Object} args Additional Arguments * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link GetBundleByIdApiResponse } and HTTP response */ getBundleById(extId: string, ...args: any): Promise; /** * List all LCM bundles on the cluster. * Retrieve a paginated list of all LCM bundles present on the cluster. Supports standard query parameters for pagination ($page, $limit), filtering ($filter), sorting ($orderby), and field projection ($select). Each bundle entry includes metadata such as name, type, vendor, size, and creation time. For dark-site deployments, bundles are the primary mechanism for delivering upgrade images to the cluster. * @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 ListBundlesApiResponse } and HTTP response */ listBundles(opts: { $page: number; $limit: number; $filter: string; $orderby: string; $select: string; }, ...args: any): Promise; #private; } import Bundle from "../models/lifecycle/v4/resources/Bundle"; import CreateBundleApiResponse from "../models/lifecycle/v4/resources/CreateBundleApiResponse"; import DeleteBundleByIdApiResponse from "../models/lifecycle/v4/resources/DeleteBundleByIdApiResponse"; import GetBundleByIdApiResponse from "../models/lifecycle/v4/resources/GetBundleByIdApiResponse"; import ListBundlesApiResponse from "../models/lifecycle/v4/resources/ListBundlesApiResponse"; import { ApiClient } from "../ApiClient";