POSThttps://api.spotinst.io/azure/compute/group?accountId={ACCOUNT_ID}

Create a new Elastigroup cluster.

URL Parameters

Parameter Type Description
ACCOUNT_ID String

Your Spot accountId associated with your token.

Example: act-123abc
Request

Headers
Copied!
Downloaded!
{  
   "Content-Type": "application/json",
   "Authorization": "Bearer ${token}" 
}
Body
Copied!
Downloaded!
{
  "group": {
    "name": "TestGroup",
    "region": "westus2",
    "resourceGroupName": "testResourceGroup",
    "capacity": {
      "target": 3,
      "minimum": 2,
      "maximum": 3
    },
    "strategy": {
      "spotPercentage": 50,
      "drainingTimeout": 3,
      "fallbackToOd": true,
      "revertToSpot": {
        "performAt": "timeWindow"
      },
      "optimizationWindows": [
        "Mon:03:00-Wed:02:30"
      ],
      "signals": [
        {
          "type": "vmReady",
          "timeout": 180
        },
        {
          "type": "vmReadyToShutdown",
          "timeout": 180
        }
      ]
    },
    "scaling": {
      "up": [
        {
          "isEnabled": true,
          "policyName": "scaleUpPolicyName",
          "metricName": "Percentage CPU",
          "statistic": "average",
          "unit": "percent",
          "threshold": 2,
          "namespace": "Microsoft.Compute",
          "period": 300,
          "evaluationPeriods": 4,
          "cooldown": 300,
          "action": {
            "type": "adjustment",
            "adjustment": "1"
          },
          "operator": "gt"
        }
      ],
      "down": [
        {
          "isEnabled": true,
          "policyName": "scaleDownPolicyName",
          "metricName": "Percentage CPU",
          "statistic": "count",
          "unit": "perecnts",
          "threshold": 10,
          "namespace": "Microsoft.Compute",
          "period": 300,
          "evaluationPeriods": 6,
          "cooldown": 300,
          "action": {
            "type": "adjustment",
            "adjustment": "1"
          },
          "operator": "lte"
        }
      ]
    },
    "compute": {
      "os": "Linux",
      "vmSizes": {
        "odSizes": [
          "standard_a1_v2"
        ],
        "spotSizes": [
          "standard_a1_v2"
        ]
      },
      "launchSpecification": {
        "customData": "",
        "image": {
          "marketplace": {
            "publisher": "Canonical",
            "offer": "UbuntuServer",
            "sku": "18.04-LTS",
            "version": "latest"
          }
        },
        "network": {
          "resourceGroupName": "testResourceGroup",
          "virtualNetworkName": "testVirtualNetwork",
          "networkInterfaces": [
            {
              "isPrimary": true,
              "subnetName": "testResourceGroup",
              "assignPublicIp": true,
              "publicIpSku": "STANDARD",
              "securityGroup": {
                "name": "testSecurityGroup",
                "resourceGroupName": "testResourceGroup"
              },
              "enableIPForwarding": true,
              "additionalIpConfigurations": [
                {
                  "name": "TestIbSecodary"
                }
              ]
            },
            {
              "isPrimary": false,
              "subnetName": "testSubnet",
              "assignPublicIp": false,
              "securityGroup": {
                "name": "testSecurityGroup",
                "resourceGroupName": "testResourceGroup"
              },
              "enableIPForwarding": true,
              "additionalIpConfigurations": [
                {
                  "name": "TestIbSecodary"
                }
              ]
            }
          ]
        },
        "login": {
          "sshPublicKey": "ssh-rsa",
          "userName": "test"
        },
        "loadBalancersConfig": {
          "loadBalancers": [
            {
              "type": "loadBalancer",
              "resourceGroupName": "testResourceGroup",
              "name": "testLoadBalancer",
              "backendPoolNames": [
                "testBackendPool1",
                "testBackendPool2"
              ],
              "sku": "Standard"
            }
          ]
        },
        "tags": [
          {
            "tagKey": "creator",
            "tagValue": "tester"
          }
        ],
        "extensions": [
          {
            "name": "extensionName",
            "type": "customScript",
            "publisher": "Microsoft.Azure.Extensions",
            "apiVersion": "2.0",
            "minorVersionAutoUpgrade": true,
            "protectedSettings": {
              "script": "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob21lL25pci9uaXIudHh0Cg=="
            }
          }
        ],
        "dataDisks": [
          {
            "sizeGB": 1,
            "lun": 1,
            "type": "Standard_LRS"
          }
        ],
        "osDisk": {
          "type": "Standard_LRS",
          "sizeGB": 30
        }
      }
    },
    "health": {
      "healthCheckTypes": [
        "vmState"
      ],
      "gracePeriod": 60,
      "autoHealing": true
    },
    "scheduling": {
      "tasks": [
        {
          "isEnabled": true,
          "type": "scaleUp",
          "cronExpression": "3 * * * *",
          "adjustment": 1
        },
        {
          "isEnabled": true,
          "type": "scaleDown",
          "cronExpression": "58 * * * *",
          "adjustment": 1
        },
        {
          "isEnabled": true,
          "type": "deployment",
          "cronExpression": " 37 * * * *",
          "gracePeriod": 2,
          "batchSizePercentage": 30
        }
      ]
    }
  }
}

Body Parameters


  • name * String
    Elastigroup name
  • region * String
    The Azure region your Elastigroup will be created in.
  • resourceGroupName * String
    Name of the Resource Group for Elastigroup.
  • capacity * Object
    Capacity of Elastigroup.
  • capacity.target * Integer
    Desired number of VMs for Elastigroup to maintain.
  • capacity.minimum * Integer
    Minimum number of VMs.
  • capacity.maximum * Integer
    Maximum number of VMs.
  • scaling Object
    Scaling Policies for Elastigroup.
  • scaling.up Object
    Defines scaling up policy.
  • 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, total, minimum, maximum, count.

  • scaling.up.unit String
    Unit to measure to evaluate the selected metric:

    Valid Values: Count,Bytes Percent CountPerSecond Milliseconds BytesPerSecond Seconds

  • 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. Required with values of 60,300,900,1800,3600,7200.
    Example: 60
  • scaling.up.evaluationPeriods * Integer
    Number of consecutive periods in which the threshold must be met in order to trigger the scaling action. Minimum value: 1.
    Example: 5
  • scaling.up.cooldown * Integer
    Time (seconds) to wait after a scaling action before resuming monitoring. Minimum value: 0. multiple of 60.
  • 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", "updateCapacity."

    Example: "updateCapacity"
  • scaling.up.action.adjustment String
    Value to which the action type will be adjusted.
    Required if using "adjustment" action type.
  • scaling.up.action.target String
    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 String
    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 String
    Value to update the group mimimum capacity to. Required if using “updateCapacity” as action type and “target” and “minimum” are undefined.
  • 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 Array<Object>
    Required if scaling.up.namespace is different from "Microsoft.Compute". 2 dimensions are required:
    For example:
    “dimensions”: [ { “key” : “resourceGroupName”, “value” : “testResourceGroup” } , { “key” : “resourceName”, “value” : “testApplicationGateway” } ]
  • scaling.up.dimensions.name String
  • scaling.up.dimensions.value String
  • 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, total, minimum, maximum, count.

  • scaling.down.unit String
    Unit to measure to evaluate the selected metric:

    Valid Values: Count,Bytes Percent CountPerSecond Milliseconds BytesPerSecond Seconds

  • 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. required min(0) multiple(60)
  • 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 * String
    Value to which the action type will be adjusted.
    Required if using "adjustment" action types.
  • scaling.down.action.target * String
    Desired number of VMs. Required if using “updateCapacity” as action type and “minimum” and “maximum” are undefined.
  • scaling.down.action.minimum * String
    Lower limit of VMs that you can scale down to. Optional, required if using “updateCapacity” as action type and “target” and “maximum” are undefined.
  • scaling.down.action.maximum * String
    Upper limit of VMs that you can scale down to. Optional, required if using “updateCapacity” as action type and “target” and “minimum” are undefined.
  • 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)

    Example: lte
  • 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
  • scaling.down.dimensions Object
    Required if namespace is used, AND namespace != “Microsoft.Compute”
  • scaling.down.dimensions.resourceGrodownName String
    Azure resource group for the scaling.down.dimensions. Required if using namespace different from "Microsoft.Compute".
  • scaling.down.dimensions.resourceName String
    Azure resource the scaling.down.dimensions. Required if using namespace different from "Microsoft.Compute".
  • strategy * Object
  • strategy.spotPercentage Integer
    Percentage of Spot-VMs to maintain.

    Required if odCount isn't specified.

    Default: 100
  • strategy.onDemandCount Integer
    Number of On-Demand VMs to maintain.

    Required if spotPercentage isn't specified.

  • strategy.drainingTimeout Integer
    Time (seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation.
    Default: 120 seconds
  • strategy.revertToSpot Object
    Hold settings for strategy correction - replacing On-Demand for Spot VMs
  • strategy.revertToSpot.performAt enum: Enumeration
    Settings for maintenance strategy - possible values: timeWindow, never, always.
    Default: always
  • strategy.optimizationWindows Array<String>
    valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow
  • strategy.signals Array<Object>
    The signals defined for this group.
  • strategy.signals.timeout Integer
    The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. (Maximum is 1800 seconds, Minimum is 60 seconds)
    Default: 30 min
  • strategy.signals.type String
    The type of the signal defined for the group. Valid Values: vmReady, vmReadyToShutdown
  • health Object
    Autohealing of unhealthy VMs.
  • health.autoHealing Boolean
    Enable Autohealing of unhealthy VMs.
  • health.healthCheckTypes String
    Healthcheck to use to validate VM health. Valid Values: "vmState", "applicationGateway"
    Example: "vmState"
  • health.gracePeriod Integer
    Period of time to wait for VM to reach healthiness before monitoring for unhealthiness.
    Example: 300
  • health.unhealthyDuration Integer
    amount of time to be unhealthy before a replacement is triggered
    Example: 360
  • compute * Object
  • compute.vmSizes * Array<Object>
    Sizes of On-Demand and Spot VMs.
  • compute.vmSizes.odSizes * Array<String>
    Available On-Demand sizes.
  • compute.vmSizes.spotSizes * Array<String>
    Available Spot-VM sizes.
  • compute.os * String
    Type of operating system. Valid Values: Linux, Windows
  • compute.launchSpecification * Object
  • compute.launchSpecification.image * Object
    Image of VM. An image is a template for creating new VMs. Choose from Azure image catalogue (marketplace) or use a custom image.
  • compute.launchSpecification.image.marketplace Array<Object>
    Select an image from Azure's Marketplace image catalogue

    Required if custom image isn't specified.

  • compute.launchSpecification.image.marketplace.publisher String
    Image publisher.

    Required if marketplace image is specified.

  • compute.launchSpecification.image.marketplace.offer String
    Name of image to use.

    Required if marketplace image is specified.

  • compute.launchSpecification.image.marketplace.sku String
    Image's Stock Keeping Unit, which is the specific version of the image.

    Required if marketplace image is specified.

  • compute.launchSpecification.image.marketplace.version String
    Image's version. if version not provided we use "latest"
    Default: latest
  • compute.launchSpecification.image.custom Array<Object>
    Custom image to launch Elastigroup with.

    Required if marketplace image isn't specified.

  • compute.launchSpecification.image.custom.resourceGroupName String
    Name of Resource Group for custom image.

    Required if custom image is specified.

  • compute.launchSpecification.image.custom.name String
    Name of the custom image.

    Required if custom image is specified.

  • 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.name String
    Name of the Application Gateway/Load Balancer
  • compute.launchSpecification.loadBalancersConfig.loadBalancers.backendPoolNames 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.sku String
    if type is LoadBalancer then possible values are “Standard/Basic”; if ApplicationGateway then possible values are “Standard_Large”,“Standard_Medium”,“Standard_Small”,“Standard_v2”,“WAF_Large”,“WAF_Medium”,“WAF_v2"
    Example: lb-1ee2e3q
  • 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.shutdownScript String
    shutdown script for the group. Value should be passed as a string encoded at Base64 only
  • 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.
  • compute.launchSpecification.network * Array<Object>
    Define the Virtual Network and Subnet for your Elastigroup.
  • compute.launchSpecification.network.resourceGroupName * String
    Vnet Resource Group Name
  • compute.launchSpecification.network.virtualNetworkName * String
    Name of Vnet.
  • compute.launchSpecification.network.networkInterfaces * Array<Object>
  • compute.launchSpecification.network.networkInterfaces.isPrimary * Boolean
    Defines whether the network interface is primary or not.
  • compute.launchSpecification.network.networkInterfaces.subnetName * String
    Subnet name
  • compute.launchSpecification.network.networkInterfaces.assignPublicIp Boolean
    Assign public IP
  • compute.launchSpecification.network.networkInterfaces.publicIpSku String
    required if assignPublicIp=true values=[STANDARD/BASIC]
  • compute.launchSpecification.network.networkInterfaces.securityGroup Array<Object>
  • compute.launchSpecification.network.networkInterfaces.securityGroup.name String
    requires valid security group name. Required if security group is specified.
  • compute.launchSpecification.network.networkInterfaces.securityGroup.resourceGroupName String
    requires valid resource group name. Required if security group is specified.
  • compute.launchSpecification.network.networkInterfaces.enableIPForwarding Boolean
    Enable IP Forwarding
  • compute.launchSpecification.network.networkInterfaces.additionalIpConfigurations Array<Object>
    Additional configuration of network interface
  • compute.launchSpecification.network.networkInterfaces.additionalIpConfigurations.name String
    required if additionalConfiguration has been specified.
  • compute.launchSpecification.network.networkInterfaces.additionalIpConfigurations.privateIpAddressVersion String
    Possible values: IPv4/IPv6
    Default: IPv4
  • compute.launchSpecification.extensions Array<Object>
    List of objects for azure extensions
  • compute.launchSpecification.extensions.autoUpgradeMinorVersion * Boolean
    Required on compute.launchSpecification.extensions object
  • compute.launchSpecification.extensions.name * String
    Required on compute.launchSpecification.extensions object
  • compute.launchSpecification.extensions.protectedSettings Object
    Object for protected settings
  • compute.launchSpecification.extensions.publicSettings Object
  • compute.launchSpecification.extensions.publisher * String
    Required on compute.launchSpecification.extensions object
  • compute.launchSpecification.extensions.type * String
    Required on compute.launchSpecification.extensions object
  • compute.launchSpecification.extensions.apiVersion String
    The API version of the extension. Required if extension specified.
  • compute.launchSpecification.extensions.minorVersionAutoUpgrade Boolean
    Enable minor version upgrades of the extension. Required if extension specified.
  • compute.launchSpecification.dataDisks Array<Object>
    list of data disks to be attached to the vms in the group.
  • compute.launchSpecification.dataDisks.type enum: Enumeration
    The type of the data disk, possible values: ["Standard_LRS","Premium_LRS","StandardSSD_LRS"]. Required if dataDisks is specified.
  • compute.launchSpecification.dataDisks.lun Integer
    The lun of the data disk, Required if dataDisks is specified.
  • compute.launchSpecification.dataDisks.sizeGB Integer
    The size of the data disk in GB, Required if dataDisks is specified. Minimum value: 1 Maximum value: 1023
  • compute.launchSpecification.osDisk Object
    Specify OS disk specification other than default.
  • compute.launchSpecification.osDisk.type enum: Enumeration
    The type of the OS disk, possible values: ["Standard_LRS","Premium_LRS","StandardSSD_LRS"]. Required if dataDisks is specified.
  • compute.launchSpecification.osDisk.size Integer
    The size of the OS disk in GB, Required if dataDisks is specified. Minimum value: 1 Maximum value: 1023
  • compute.launchSpecification.customData String
    This value will hold the YML in base64 and will be added to the scaleSets
  • compute.launchSpecification.login * Array<Object>
    Set admin access for accessing your VMs. Password/SSH is required for Linux.
  • compute.launchSpecification.login.userName * String
    user name for admin access to VMs. Login can be set: * for windows: compute.launchSpecification.login.password
    for linux: compute.launchSpecification.login.sshPublicKey
    * Just user name, without pwd or SSH key
  • compute.launchSpecification.login.sshPublicKey String
    SSH for admin access to Linux VMs.

    Optional for Linux.

  • compute.launchSpecification.login.password String
    Password for admin access to Windows VMs.

    Required for Windows.

Response - Response: 200

Body
Copied!
Downloaded!
{    
  "request": {
        "id": "d9cdd020-cea0-428c-bd72-534339d43336",
        "url": "/azure/compute/group?spotinstAccountId=act-91234h4a",
        "method": "POST",
        "timestamp": "2018-06-20T09:42:23.934+0000"
  },
  "response": {
      "status": {
        "code": 200,
        "message": "OK"
      },
      "kind": "spotinst:azure:compute:group",
      "items": [
        {
          "Id": "sig-123123",
          "name": "TestGroup",
          "region": "westus2",
          "resourceGroupName": "testResourceGroup",
          "capacity": {
            "target": 3,
            "minimum": 2,
            "maximum": 3
          },
          "strategy": {
            "spotPercentage": 50,
            "drainingTimeout": 3,
            "fallbackToOd": true,
            "revertToSpot": {
              "performAt": "timeWindow"
            },
            "optimizationWindows": [
              "Mon:03:00-Wed:02:30"
            ],
            "signals": [
              {
                "type": "vmReady",
                "timeout": 180
              },
              {
                "type": "vmReadyToShutdown",
                "timeout": 180
              }
            ]
          },
          "scaling": {
            "up": [
              {
                "isEnabled": true,
                "policyName": "scaleUpPolicyName",
                "metricName": "Percentage CPU",
                "statistic": "average",
                "unit": "percent",
                "threshold": 2,
                "namespace": "Microsoft.Compute",
                "period": 300,
                "evaluationPeriods": 4,
                "cooldown": 300,
                "action": {
                  "type": "adjustment",
                  "adjustment": "1"
                },
                "operator": "gt"
              }
            ],
            "down": [
              {
                "isEnabled": true,
                "policyName": "scaleDownPolicyName",
                "metricName": "Percentage CPU",
                "statistic": "count",
                "unit": "percent",
                "threshold": 10,
                "namespace": "Microsoft.Compute",
                "period": 300,
                "evaluationPeriods": 6,
                "cooldown": 300,
                "action": {
                  "type": "adjustment",
                  "adjustment": "1"
                },
                "operator": "lte"
              }
            ]
          },
          "compute": {
            "os": "Linux",
            "vmSizes": {
              "odSizes": [
                "standard_a1_v2"
              ],
              "spotSizes": [
                "standard_a1_v2"
              ]
            },
            "launchSpecification": {
              "customData": "",
              "image": {
                "marketplace": {
                  "publisher": "Canonical",
                  "offer": "UbuntuServer",
                  "sku": "18.04-LTS",
                  "version": "latest"
                }
              },
              "network": {
                "resourceGroupName": "testResourceGroup",
                "virtualNetworkName": "testVirtualNetwork",
                "networkInterfaces": [
                  {
                    "isPrimary": true,
                    "subnetName": "testResourceGroup",
                    "assignPublicIp": true,
                    "publicIpSku": "STANDARD",
                    "securityGroup": {
                      "name": "testSecurityGroup",
                      "resourceGroupName": "testResourceGroup"
                    },
                    "enableIPForwarding": true,
                    "additionalIpConfigurations": [
                      {
                        "name": "TestIbSecodary"
                      }
                    ]
                  },
                  {
                    "isPrimary": false,
                    "subnetName": "testSubnet",
                    "assignPublicIp": false,
                    "securityGroup": {
                      "name": "testSecurityGroup",
                      "resourceGroupName": "testResourceGroup"
                    },
                    "enableIPForwarding": true,
                    "additionalIpConfigurations": [
                      {
                        "name": "TestIbSecodary"
                      }
                    ]
                  }
                ]
              },
              "login": {
                "sshPublicKey": "ssh-rsa",
                "userName": "test"
              },
              "loadBalancersConfig": {
                "loadBalancers": [
                  {
                    "type": "loadBalancer",
                    "resourceGroupName": "testResourceGroup",
                    "name": "testLoadBalancer",
                    "backendPoolNames": [
                      "testBackendPool1",
                      "testBackendPool2"
                    ],
                    "sku": "Standard"
                  }
                ]
              },
              "tags": [
                {
                  "tagKey": "creator",
                  "tagValue": "tester"
                }
              ],
              "extensions": [
                {
                  "name": "extensionName",
                  "type": "customScript",
                  "publisher": "Microsoft.Azure.Extensions",
                  "apiVersion": "2.0",
                  "minorVersionAutoUpgrade": true,
                  "protectedSettings": {
                    "script": "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob21lL25pci9uaXIudHh0Cg=="
                  }
                }
              ],
              "dataDisks": [
                {
                  "sizeGB": 1,
                  "lun": 1,
                  "type": "Standard_LRS"
                }
              ],
              "osDisk": {
                "type": "Standard_LRS",
                "sizeGB": 30
              }
            }
          },
          "health": {
            "healthCheckTypes": [
              "vmeState"
            ],
            "gracePeriod": 60,
            "autoHealing": true
          },
          "scheduling": {
            "tasks": [
              {
                "isEnabled": true,
                "type": "scaleUp",
                "cronExpression": "3 * * * *",
                "adjustment": 1
              },
              {
                "isEnabled": true,
                "type": "scaleDown",
                "cronExpression": "58 * * * *",
                "adjustment": 1
              },
              {
                "isEnabled": true,
                "type": "deployment",
                "cronExpression": " 37 * * * *",
                "gracePeriod": 2,
                "batchSizePercentage": 30
              }
            ]
          }
        }
      ],
  	"count": 1
	}
}