fbpx
PUThttps://api.spotinst.io/compute/azure/group/{GROUP_ID}?accountId={ACCOUNT_ID}

 

          Update an Elastigroup cluster

URL Parameters

Parameter Type Description
GROUP_ID * String

ID of Elastigroup to update.

Example: sig-12345
ACCOUNT_ID String

Your Spotinst accountid associated with your token

Example: act-123abc
Request

Headers
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}
Body
Copied!
Downloaded!
{
  "group": {
    "name": "spotinst-group",
    "capacity": {
      "target": 2,
      "minimum": 2,
      "maximum": 10
    },
	"scaling": {
      "up": [
        {
          	"policyName": "Healthy Host Count",
        	"metricName": "Healthy Host Count",
        	"statistic": "average",
        	"threshold": 0.75,
        	"period": 60,
        	"evaluationPeriods": 3,
        	"cooldown": 300,
            "namespace": "Microsoft.Network/applicationGateways",
             	"dimensions": [
				{
					"name": "resourceName",
					"value": "TestAppGateway"
				},
				{
					"name": "resourceGroupName",
					"value": "TestResourceGroup"
				}
				],
        	"action": {
          		"type": "adjustment", 
          		"adjustment": "2"
        	},
        "operator": "gte" 
        }
      ],
      "down": [
       {
         	"policyName": "down when 20% CPU",
        	"metricName": "Percentage CPU",
        	"statistic": "average",
        	"threshold": 0.2,
        	"period": 60,
        	"evaluationPeriods": 4,
        	"cooldown": 300,
        	"action": {
          		"type": "updateCapacity", 
          		"target": 10,
              	"minimum": 8,
              	"maximum": 10
        	},
        "operator": "lte" 
       }
     ]
    },
    "strategy": {
      "lowPriorityPercentage": 100,
      "odCount": 1,
      "drainingTimeout": 300
    },
    "compute": {
      "vmSizes": {
        "odSizes": [
          "Standard_A1",
          "Standard_A2"
        ],
        "lowPrioritySizes": [
          "Standard_A1",
          "Standard_A2"
        ]
      },
      "launchSpecification": {
        "loadBalancersConfig":{
          "loadBalancers":[
            {
              "type":"MULTAI_TARGET_SET",
              "balancerId":"lb-1ee2e3q",
              "targetSetId":"ts-3eq",
              "autoWeight": true
            },
            {
              "type":"APPLICATION_GATEWAY",
              "resourceGroupName":"myResourceGroup",
              "applicationGatewayName":"myappgateway47891",
              "backendPoolName": "backendpool490822"
            }
          ]
        },
        "managedServiceIdentities": 
        [
          {"name": "mySI2", 
           "resourceGroupName":"myResourceGroup"}
        ], 
        "tags": [
        {
          "tagKey": "env",
          "tagValue": "staging"
        },
        {
          "tagKey": "name",
          "tagValue": "sharon"
        }]
      }
    }
  }
}
  • name * String
    Elastigroup name
  • capacity * Object
    Capacity of Elastigroup.
  • capacity.target * Integer
    Desired number of instances for Elastigroup to maintain.
  • capacity.minimum * Integer
    Minimum number of instances.
  • capacity.maximum * Integer
    Maximum number of instances.
  • scaling Object
    Scaling Policies for Elastigroup.
  • scaling.up.policyName String
    Name of scaling policy.
  • scaling.up.metricName String
    Metric to monitor by Azure metric display name
  • scaling.up.statistic String
    Statistic by which to evaluate the selected metric.

    Valid Values: AVERAGE(“average”)

  • scaling.up.threshold Float
    The value at which the scaling action is triggered.
  • scaling.up.period Integer
    Amount of time (seconds) for which the threshold must be met in order to trigger the scaling action.
    Example: 60
  • scaling.up.evaluationPeriods Integer
    Number of consecutive periods in which the threshold must be met in order to trigger the scaling action.
    Example: 5
  • scaling.up.cooldown Integer
    Time (seconds) to wait after a scaling action before resuming monitoring.
  • scaling.up.action Object
    Scaling action to take when the policy is triggered.
  • scaling.up.action.type String
    Type of scaling action to take when the scaling policy is triggered.

    Valid Values: "adjustment", "setMinTarget", "updateCapacity", "percentageAdjustment".

    Example: "setMinTarget"
  • scaling.up.action.adjustment Integer
    Value to which the action type will be adjusted.
    Required if using "numeric" or "percentageAdjustment" action types.
  • scaling.up.action.minTargetCapacity Integer
    Value to adjust the capacity to. Required if using “setMinTarget” as action type
  • scaling.up.action.target Integer
    Value to update the group target capacity to. Required if using “updateCapacity” as action type and “minimum” and “maximum” are undefined.
  • scaling.up.action.minimum Integer
    Value to update the group mimimum capacity to. Required if using “updateCapacity” as action type and “target” and“maximum” are undefined.
  • scaling.up.action.maximum Integer
    Value to update the group mimimum capacity to. Required if using “updateCapacity” as action type and “target” and “minimum” are defined.
  • scaling.up.operator String
    The operator used to evaluate the threshold against the current metric value.

    Valid Values: "gt" (Greater Than),"gte" (Greater Than or Equal), "lt" (Less Than), "lte" (Less Than or Equal)

    Example: "gte"
  • scaling.up.namespace String
    Should be one of the namespaces: Microsoft.AnalysisServices/servers
    Microsoft.ApiManagement/service
    Microsoft.Automation/automationAccounts
    Microsoft.Batch/batchAccounts
    Microsoft.Cache/redis
    Microsoft.Compute
    Microsoft.CognitiveServices/accounts
    Microsoft.ContainerInstance/containerGroups
    Microsoft.ContainerService/managedClusters
    Microsoft.CustomerInsights/hubs
    Microsoft.DataFactory/datafactories
    Microsoft.DataFactory/factories
    Microsoft.DataLakeAnalytics/accounts
    Microsoft.DataLakeStore/accounts
    Microsoft.DBforMariaDB/servers
    Microsoft.DBforMySQL/servers
    Microsoft.DBforPostgreSQL/servers
    Microsoft.Devices/IotHubs
    Microsoft.Devices/provisioningServices
    Microsoft.DocumentDB/databaseAccounts
    Microsoft.EventGrid/topics
    Microsoft.EventGrid/eventSubscriptions
    Microsoft.EventGrid/extensionTopics
    Microsoft.EventHub/namespaces
    Microsoft.EventHub/clusters
    Microsoft.HDInsight/clusters
    Microsoft.Insights/AutoscaleSettings
    Microsoft.Insights/Components
    Microsoft.KeyVault/vaults
    Microsoft.Kusto/Clusters
    Microsoft.LocationBasedServices/accounts
    Microsoft.Logic/workflows
    Microsoft.NetApp/netAppAccounts/capacityPools/Volumes
    Microsoft.NetApp/netAppAccounts/capacityPools
    Microsoft.Network/networkInterfaces
    Microsoft.Network/loadBalancers
    Microsoft.Network/dnszones
    Microsoft.Network/publicIPAddresses
    Microsoft.Network/applicationGateways
    Microsoft.Network/virtualNetworkGateways
    Microsoft.Network/expressRouteCircuits
    Microsoft.Network/expressRouteCircuits/peerings
    Microsoft.Network/connections
    Microsoft.Network/trafficManagerProfiles
    Microsoft.Network/networkWatchers/connectionMonitors
    Microsoft.Network/frontdoors
    Microsoft.NotificationHubs/Namespaces/NotificationHubs
    Microsoft.OperationalInsights/workspaces
    Microsoft.PowerBIDedicated/capacities
    Microsoft.Relay/namespaces
    Microsoft.Search/searchServices
    Microsoft.ServiceBus/namespaces
    Microsoft.SignalRService/SignalR
    Microsoft.Sql/servers/databases
    Microsoft.Sql/servers/elasticPools
    Microsoft.Sql/managedInstances
    Microsoft.Storage/storageAccounts
    Microsoft.Storage/storageAccounts/blobServices
    Microsoft.Storage/storageAccounts/fileServices
    Microsoft.Storage/storageAccounts/queueServices
    Microsoft.Storage/storageAccounts/tableServices
    Microsoft.StreamAnalytics/streamingjobs
    Microsoft.TimeSeriesInsights/environments
    Microsoft.TimeSeriesInsights/environments/eventsources
    Microsoft.Web/serverfarms
    Microsoft.Web/sites (excluding functions)
    Microsoft.Web/sites (functions)
    Microsoft.Web/sites/slots
    Microsoft.Web/hostingEnvironments/multiRolePools
    Microsoft.Web/hostingEnvironments/workerPools
    Default: Microsoft.Compute
  • scaling.up.dimensions Object
    Required if namespace is used, AND namespace != “Microsoft.Compute”
  • scaling.up.dimensions.resourceGroupName String
    Azure resource group for the scaling.up.dimensions
  • scaling.up.dimensions.resourceName String
    Azure resource the scaling.up.dimensions
  • scaling.down.policyName String
    Name of scaling policy.
  • scaling.down.metricName String
    Metric to monitor by Azure metric display name
  • scaling.down.statistic String
    Statistic by which to evaluate the selected metric.

    Valid Values: AVERAGE(“average”)

  • scaling.down.threshold Float
    The value at which the scaling action is triggered.
  • scaling.down.period Integer
    Amount of time (seconds) for which the threshold must be met in order to trigger the scaling action.
  • scaling.down.evaluationPeriods Integer
    Number of consecutive periods in which the threshold must be met in order to trigger the scaling action.
  • scaling.down.cooldown Integer
    Time (seconds) to wait after a scaling action before resuming monitoring.
  • scaling.down.action Object
    Scaling action to take when the policy is triggered.
  • scaling.down.action.type String
    Type of scaling action to take when the scaling policy is triggered.

    Valid Values: "adjustment", "setMaxTarget", "updateCapacity", "percentageAdjustment".

  • scaling.down.action.adjustment Integer
    Value to which the action type will be adjusted.
    Required if using "numeric" or "percentageAdjustment" action types.
  • scaling.down.action.maxTargetCapacity Integer
    Value to adjust the capacity to. Required if using “setMinTarget” as action type.
  • scaling.down.action.target Integer
    Desired number of instances. Required if using “updateCapacity” as action type and “minimum” and “maximum” are defined.
  • scaling.down.action.minimum Integer
    Lower limit of instances that you can scale down to. Optional, required if using “updateCapacity” as action type and “target” and “maximum” are defined.
  • scaling.down.action.maximum Integer
    Upper limit of instances that you can scale down to. Optional, required if using “updateCapacity” as action type and “target” and “minimum” are defined.
  • scaling.down.operator String
    The operator used to evaluate the threshold against the current metric value.

    Valid Values: "gt" (Greater Than),"gte" (Greater Than or Equal), "lt" (Less Than), "lte" (Less Than or Equal)

  • strategy * Object
  • strategy.lowPriorityPercentage Integer
    Percentage of Low Priority instances to maintain.

    Required if odCount isn't specified.

    Default: 100
  • strategy.odCount Integer
    Number of On-Demand instances to maintain.

    Required if lowPriorityPercentage isn't specified.

  • strategy.drainingTimeout Integer
    Time (seconds) to allow the instance be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation.
    Default: 120 seconds
  • compute * Object
  • compute.vmSizes * Array<Object>
    Sizes of On-Demand and Low-Priority instances.
  • compute.vmSizes.odSizes * Array<String>
    Available On-Demand instance . sizes.
  • compute.vmSizes.lowPrioritySizes * Array<String>
    Available Low-Priority instance sizes.
  • compute.launchSpecification.loadBalancersConfig Object
    Configure a Load Balancer.
  • compute.launchSpecification.loadBalancersConfig.loadBalancers Array<Object>
    Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer.
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.type String
    The type of load balancer.
    Valid Values: "MULTAI_TARGET_SET", "APPLICATION_GATEWAY"
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.resourceGroupName String
    The Resource Group name of the Load Balancer.
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.applicationGatewayName String
    Name of the Application Gateway.
    Required if Type is APPLICATION_GATEWAY.
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.backendPoolName String
    Name of the Backend Pool to register the Elastigroup VMs to. Each Backend Pool is a separate load balancer.
    Required if Type is APPLICATION_GATEWAY.
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.balancerId String
    Required if Type is MULTAI_TARGET_SET. Add the Multai Load Balancer's ID.
    Example: lb-1ee2e3q
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.targetSetId String
    Required if Type is MULTAI_TARGET_SET. Add the Target Set to register the Elastigroup VMs to.
    Example: ts-3eq
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.compute.launchSpecification.loadBalancersConfig.loadBalancers.autoWeight Boolean
    Allocate traffic based on the number of cores per VM.
    Default: False
  • compute.launchSpecification.managedServiceIdentities Array
    Add a user-assigned managed identity to the VMs in the cluster.
  • compute.launchSpecification.managedServiceIdentities.name String
    name of the managed identity
  • compute.launchSpecification.managedServiceIdentities.resourceGroupName String
    The Resource Group that the user-assigned managed identity resides in.
  • compute.launchSpecification.tags Array<Object>
    Key-Value pairs for VMs in the Elastigroup.
  • compute.launchSpecification.tags.tagKey String
    Tag Key for Vms in Elastigroup.
  • compute.launchSpecification.tags.tagValue String
    Tag Value for VMs in Elastigroup.