How to use the @clevercloud/client/cjs/api/application.js.update function in @clevercloud/client

To help you get started, we’ve selected a few @clevercloud/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleverCloud / clever-tools / src / models / application.js View on Github external
async function setDedicatedBuildInstance (appId, orgaId, enableSeparateBuild) {
  const app = await application.get({ id: orgaId, appId }).then(sendToApi);
  const newConfig = { ...app, separateBuild: enableSeparateBuild };
  return application.update({ id: orgaId, appId }, newConfig).then(sendToApi);
};
github CleverCloud / clever-tools / src / models / application.js View on Github external
async function setScalability (appId, orgaId, scalabilityParameters) {
  Logger.info('Scaling the app: ' + appId);

  const app = await application.get({ id: orgaId, appId }).then(sendToApi);
  const instance = _.cloneDeep(app.instance);

  instance.minFlavor = instance.minFlavor.name;
  instance.maxFlavor = instance.maxFlavor.name;

  const newConfig = mergeScalabilityParameters(scalabilityParameters, instance);

  return application.update({ id: orgaId, appId }, newConfig).then(sendToApi);
};