UNPKG

@zowe/provisioning-for-zowe-sdk

Version:

Zowe SDK to interact with the z/OS provisioning APIs

53 lines 2.95 kB
"use strict"; /* * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListInstanceInfo = void 0; const core_for_zowe_sdk_1 = require("@zowe/core-for-zowe-sdk"); const ProvisioningValidator_1 = require("./ProvisioningValidator"); const ProvisioningConstants_1 = require("./ProvisioningConstants"); /** * Get info about a provisioned instance. * @export * @class ListInstanceInfo */ class ListInstanceInfo { /** * This operation retrieves a published software service instance from the registry instances. * @param {AbstractSession} session - z/OSMF connection info * @param {string} zOSMFVersion - the URI path variable that identifies the version of the z/OSMF software services template service. * The following value is valid: 1.0. * @param {string} instanceId - the id of the provisioned software service instance. * @returns {Promise<IProvisionedInstance>} z/OSMF response object, @see {IProvisionedInstance} * @memberof ListInstanceInfo */ static listInstanceCommon(session, zOSMFVersion, instanceId) { return __awaiter(this, void 0, void 0, function* () { ProvisioningValidator_1.ProvisioningValidator.validateSession(session); ProvisioningValidator_1.ProvisioningValidator.validateNotEmptyString(zOSMFVersion, core_for_zowe_sdk_1.nozOSMFVersion.message); ProvisioningValidator_1.ProvisioningValidator.validateNotEmptyString(instanceId, ProvisioningConstants_1.noInstanceId.message); let resourcesQuery = `${ProvisioningConstants_1.ProvisioningConstants.RESOURCE}/${zOSMFVersion}/`; resourcesQuery += `${ProvisioningConstants_1.ProvisioningConstants.INSTANCES_RESOURCE}/${instanceId}`; return core_for_zowe_sdk_1.ZosmfRestClient.getExpectJSON(session, resourcesQuery); }); } } exports.ListInstanceInfo = ListInstanceInfo; //# sourceMappingURL=ListInstanceInfo.js.map