Name

sn_capi.CAPIMidResolver

Description

Wrapper script to invoke CloudMidSelectionApi

Script

var CAPIMidResolver = Class.create();

CAPIMidResolver.prototype = {
  initialize: function(parameters) {
  	this.parameters = parameters;
  },

  resolveMid : function() {
  	/*
  	 * Call the CloudMidSelectionApi with the right inputs
  	 * The following parameters are provided to this script include
  	 * apiName - Name of the API that was set in the context for which we need a MID server to execute
  	 * provider - Cloud Provider that CAPI is working against
  	 * locationName - Region Name/Datacenter name (optional value)
  	 * invocationContext - JSON representing all the input parameters to the API being executed
  	 */
  	return new global.CloudMidSelectionApi().selectMid(appName, provider, locationName, invocationContext);
  },
  
  type: 'CAPIMidResolver'
};

var midResolver = new CAPIMidResolver();
var scriptOutput = midResolver.resolveMid();

Sys ID

3ec6ec68db59130089453a2b7c961976

Offical Documentation

Official Docs: