import { ZosmfRestClient , nozOSMFVersion } from "@zowe/core-for-zowe-sdk" ; import { AbstractSession } from "@zowe/imperative" ; import { ProvisioningValidator } from "./ProvisioningValidator" ; import { noInstanceId , ProvisioningConstants } from "./ProvisioningConstants" ; import { IProvisionedInstance } from "./doc/zosmf/IProvisionedInstance" ; export class export class ListInstanceInfo { param { AbstractSession } session param { string } zOSMFVersion param { string } instanceId returns { Promise < IProvisionedInstance > } see { IProvisionedInstance } memberof public static async listInstanceCommon ( session , zOSMFVersion , instanceId ) { ProvisioningValidator . validateSession ( session ) ; ProvisioningValidator . validateNotEmptyString ( zOSMFVersion , nozOSMFVersion . message ) ; ProvisioningValidator . validateNotEmptyString ( instanceId , noInstanceId . message ) ; let resourcesQuery = `${ ProvisioningConstants . RESOURCE }/${ zOSMFVersion }/` ; resourcesQuery += `${ ProvisioningConstants . INSTANCES_RESOURCE }/${ instanceId }` ; return ZosmfRestClient . getExpectJSON < IProvisionedInstance > ( session , resourcesQuery ) ; } }