Problem in the migration of instances by the APP Service


I made a function to use in APP Services, where they run Scale UP and Scale Down instances in the mongodb cluster, but when Triggers fire and execute the function, for example:
M60 (Low-CPU) it migrates to the M50 it stays as General does not maintain the (Low-CPU).

I tried to find something in this documentation but I couldn’t find it:

My Function is this:

exports = async function() {
  // Forneça projectID e clusterNames...
  const clusterName = 'cloud-prod';

  // Obter credenciais armazenadas...
  const username = context.values.get("AtlasPublicKey");
  const password = context.values.get("AtlasPrivadeKeySecret");

  // Defina o tamanho de instância desejado...
  const body =    {
      "providerSettings" : {
        "providerName" : "AWS",
        "instanceSizeName" : "M50"
  result = await context.functions.execute('modifyCluster', username, password, projectID, clusterName, body);
  if (result.error) {
    return result;

  return clusterName + " scaled down"; 

I found this doc where the available instances are mentioned, I changed it to R (Low-CPU):

Cluster Tier & API Naming Conventions
For purposes of management with the Atlas Administration API, cluster tier names that are prepended with R instead of an M (R40 for example) run a low-CPU version of the cluster. When creating or modifying a cluster with the API, be sure to specify your desired cluster class by name with the providerSettings.instanceSizeName attribute.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.