Availability Sets - Create Or Update

Create or update an availability set.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}?api-version=2019-03-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

The name of the resource group.

availabilitySetName
path True
  • string

The name of the availability set.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
location True
  • string

Resource location

properties.platformFaultDomainCount
  • integer

Fault Domain count.

properties.platformUpdateDomainCount
  • integer

Update Domain count.

properties.proximityPlacementGroup

Specifies information about the proximity placement group that the availability set should be assigned to.

Minimum api-version: 2018-04-01.

properties.virtualMachines

A list of references to all virtual machines in the availability set.

sku

Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.

tags
  • object

Resource tags

Responses

Name Type Description
200 OK

OK

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Create an availability set.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet?api-version=2019-03-01
{
  "location": "westus",
  "properties": {
    "platformFaultDomainCount": 2,
    "platformUpdateDomainCount": 20
  }
}

Sample Response

{
  "sku": {
    "name": "Classic"
  },
  "name": "myAvailabilitySet",
  "properties": {
    "platformFaultDomainCount": 2,
    "platformUpdateDomainCount": 20
  },
  "location": "westus",
  "type": "Microsoft.Compute/availabilitySets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet"
}

Definitions

AvailabilitySet

Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

For more information on Azure planned maintenance, see Planned maintenance for virtual machines in Azure

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

InstanceViewStatus

Instance view status.

Sku

Describes a virtual machine scale set sku.

StatusLevelTypes

The level code.

SubResource

AvailabilitySet

Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

For more information on Azure planned maintenance, see Planned maintenance for virtual machines in Azure

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

Name Type Description
id
  • string

Resource Id

location
  • string

Resource location

name
  • string

Resource name

properties.platformFaultDomainCount
  • integer

Fault Domain count.

properties.platformUpdateDomainCount
  • integer

Update Domain count.

properties.proximityPlacementGroup

Specifies information about the proximity placement group that the availability set should be assigned to.

Minimum api-version: 2018-04-01.

properties.statuses

The resource status information.

properties.virtualMachines

A list of references to all virtual machines in the availability set.

sku

Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.

tags
  • object

Resource tags

type
  • string

Resource type

InstanceViewStatus

Instance view status.

Name Type Description
code
  • string

The status code.

displayStatus
  • string

The short localizable label for the status.

level

The level code.

message
  • string

The detailed status message, including for alerts and error messages.

time
  • string

The time of the status.

Sku

Describes a virtual machine scale set sku.

Name Type Description
capacity
  • integer

Specifies the number of virtual machines in the scale set.

name
  • string

The sku name.

tier
  • string

Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic

StatusLevelTypes

The level code.

Name Type Description
Error
  • string
Info
  • string
Warning
  • string

SubResource

Name Type Description
id
  • string

Resource Id