Util.actionUserParameter = function()

in pipeline/local_modules/pipeline_utils/pipeline_utils.js [359:369]


Util.actionUserParameter = function (event, paramName) {
  var jobData = Util.jobData(event);
  if (jobData["actionConfiguration"]["configuration"]["UserParameters"] === undefined) {
    throw Error("CodePipeline JobData does not have 'UserParameters' specified for the action. Expected to find parameter: " + paramName);
  }
  var userParameters = JSON.parse(jobData.actionConfiguration.configuration.UserParameters);
  if (paramName in userParameters == false) {
    throw Error("Cannot find parameter: " + paramName + " in UserParameters: " + JSON.stringify(userParameters));
  }
  return userParameters[paramName];
}