Virtual Machine Scale Sets - Create Or Update

建立或更新 VM 擴展集。

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

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

資源群組的名稱。

subscriptionId
path True

string

可唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。

vmScaleSetName
path True

string

要建立或更新的 VM 擴展集名稱。

api-version
query True

string

用戶端 API 版本。

要求標頭

名稱 必要 類型 Description
If-Match

string

轉換的ETag。 省略此值以一律覆寫目前的資源。 指定最後一個出現的 ETag 值,以防止意外覆寫並行變更。

If-None-Match

string

設定為 『*』 以允許建立新的記錄集,但為了避免更新現有的記錄集。 其他值會導致伺服器發生錯誤,因為它們不受支援。

要求本文

名稱 必要 類型 Description
location True

string

資源位置

extendedLocation

ExtendedLocation

虛擬機擴展集的擴充位置。

identity

VirtualMachineScaleSetIdentity

如果已設定,則為虛擬機擴展集的身分識別。

plan

Plan

指定用來建立虛擬機之 Marketplace 映像的相關信息。 此元素僅用於市集映像。 您必須先啟用映像以供程序設計使用,才能從 API 使用市集映射。 在 Azure 入口網站 中,尋找您想要使用的市集映射,然後按兩下 [以程序設計方式部署] [開始使用] -> 。 輸入任何必要資訊,然後按兩下 [ 儲存]。

properties.additionalCapabilities

AdditionalCapabilities

指定虛擬機擴展集中 虛擬機器 上啟用或停用的其他功能。 例如:虛擬機器 是否能夠支援使用UltraSSD_LRS記憶體帳戶類型鏈接受控數據磁碟。

properties.automaticRepairsPolicy

AutomaticRepairsPolicy

自動修復的原則。

properties.constrainedMaximumCapacity

boolean

必須設定為 True 或省略的選擇性屬性。

properties.doNotRunExtensionsOnOverprovisionedVMs

boolean

啟用 Overprovision 時,擴充功能只會在最後保留的要求 VM 數目上啟動。 因此,此屬性可確保擴充功能不會在額外的過度布建 VM 上執行。

properties.hostGroup

SubResource

指定虛擬機擴展集所在專用主機群組的相關信息。 API 版本下限:2020-06-01。

properties.orchestrationMode

OrchestrationMode

指定虛擬機擴展集的協調流程模式。

properties.overprovision

boolean

指定是否應過度布建虛擬機擴展集。

properties.platformFaultDomainCount

integer

每個放置群組的容錯網域計數。

properties.priorityMixPolicy

PriorityMixPolicy

指定在相同 VMSS Flex 實例內混合現成和一般優先順序 VM 所需的目標。

properties.proximityPlacementGroup

SubResource

指定虛擬機擴展集應指派給之鄰近放置群組的相關信息。 API 版本下限:2018-04-01。

properties.resiliencyPolicy

ResiliencyPolicy

復原原則

properties.scaleInPolicy

ScaleInPolicy

指定在虛擬機擴展集中調整 虛擬機器 時套用的原則。

properties.scheduledEventsPolicy

ScheduledEventsPolicy

ScheduledEventsPolicy。

properties.singlePlacementGroup

boolean

若為 true,則會將擴展集限制為單一放置群組,大小上限為 100 部虛擬機。 注意:如果 singlePlacementGroup 為 true,可能會將其修改為 false。 不過,如果 singlePlacementGroup 為 false,則無法修改成 true。

properties.spotRestorePolicy

SpotRestorePolicy

指定虛擬機擴展集的現成還原屬性。

properties.upgradePolicy

UpgradePolicy

升級原則。

properties.virtualMachineProfile

VirtualMachineScaleSetVMProfile

虛擬機器配置檔。

properties.zoneBalance

boolean

如果發生區域中斷,是否強制嚴格地跨 x 區域散發虛擬機。 只有在擴展集的區域屬性包含多個區域時,才能設定 zoneBalance 屬性。 如果沒有指定區域或只指定一個區域,不應設定 zoneBalance 屬性。

sku

Sku

虛擬機擴展集 SKU。

tags

object

資源標籤

zones

string[]

虛擬機擴展集區域。 注意:只有在建立擴展集時,才能設定可用性區域

回應

名稱 類型 Description
200 OK

VirtualMachineScaleSet

確定

201 Created

VirtualMachineScaleSet

建立時間

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create a custom-image scale set from an unmanaged generalized os image.
Create a platform-image scale set with unmanaged os disks.
Create a scale set from a custom image.
Create a scale set from a generalized shared image.
Create a scale set from a specialized shared image.
Create a scale set where nic config has DisableTcpStateTracking property
Create a scale set with a marketplace image plan.
Create a scale set with an azure application gateway.
Create a scale set with an azure load balancer.
Create a scale set with Application Profile
Create a scale set with automatic repairs enabled
Create a scale set with boot diagnostics.
Create a scale set with Disk Controller Type
Create a scale set with DiskEncryptionSet resource in os disk and data disk.
Create a scale set with empty data disks on each vm.
Create a scale set with ephemeral os disk provisioning in Nvme disk using placement property.
Create a scale set with ephemeral os disks using placement property.
Create a scale set with ephemeral os disks.
Create a scale set with extension time budget.
Create a scale set with Fpga Network Interfaces.
Create a scale set with Host Encryption using encryptionAtHost property.
Create a scale set with managed boot diagnostics.
Create a scale set with Network Interfaces with public ip address dns settings.
Create a scale set with OS image scheduled events enabled.
Create a scale set with password authentication.
Create a scale set with premium storage.
Create a scale set with priority mix policy
Create a scale set with ProxyAgent Settings of enabled and mode.
Create a scale set with Resilient VM Creation enabled
Create a scale set with Resilient VM Deletion enabled
Create a scale set with scaleInPolicy.
Create a scale set with Security Posture Reference
Create a scale set with SecurityType as ConfidentialVM
Create a scale set with SecurityType as ConfidentialVM and NonPersistedTPM securityEncryptionType
Create a scale set with Service Artifact Reference
Create a scale set with spot restore policy
Create a scale set with ssh authentication.
Create a scale set with terminate scheduled events enabled.
Create a scale set with Uefi Settings of secureBoot and vTPM.
Create a scale set with userData.
Create a scale set with virtual machines in different zones.
Create a scale set with vm size properties
Create a VMSS with an extension that has suppressFailures enabled
Create a VMSS with an extension with protectedSettingsFromKeyVault
Create or update a scale set with capacity reservation.

Create a custom-image scale set from an unmanaged generalized os image.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "osDisk": {
          "caching": "ReadWrite",
          "image": {
            "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd"
          },
          "createOption": "FromImage",
          "name": "osDisk"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17",
    "virtualMachineProfile": {
      "storageProfile": {
        "osDisk": {
          "osType": "Windows",
          "caching": "ReadWrite",
          "image": {
            "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd"
          },
          "createOption": "FromImage",
          "name": "osDisk"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17",
    "virtualMachineProfile": {
      "storageProfile": {
        "osDisk": {
          "osType": "Windows",
          "caching": "ReadWrite",
          "image": {
            "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd"
          },
          "createOption": "FromImage",
          "name": "osDisk"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a platform-image scale set with unmanaged os disks.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "createOption": "FromImage",
          "name": "osDisk",
          "vhdContainers": [
            "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
            "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
            "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
            "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
            "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer"
          ]
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "vhdContainers": [
            "http://{existing-storage-account-name}.blob.core.windows.net/vhds"
          ],
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "vhdContainers": [
            "http://{existing-storage-account-name}.blob.core.windows.net/vhds"
          ],
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set from a custom image.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set from a generalized shared image.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set from a specialized shared image.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set where nic config has DisableTcpStateTracking property

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "enableAcceleratedNetworking": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "primary": false,
              "enableAcceleratedNetworking": false,
              "enableIPForwarding": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "ipConfigurations": [
                {
                  "name": "{nicConfig1-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": true
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "ipConfigurations": [
                {
                  "name": "{nicConfig1-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": true
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with a marketplace image plan.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows2016",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "windows-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "plan": {
    "publisher": "microsoft-ads",
    "product": "windows-data-science-vm",
    "name": "windows2016"
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with an azure application gateway.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "applicationGatewayBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}"
                      }
                    ],
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "applicationGatewayBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool"
                      }
                    ],
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "applicationGatewayBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool"
                      }
                    ],
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with an azure load balancer.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    },
                    "publicIPAddressConfiguration": {
                      "name": "{vmss-name}",
                      "properties": {
                        "publicIPAddressVersion": "IPv4"
                      }
                    },
                    "loadBalancerInboundNatPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}"
                      }
                    ],
                    "loadBalancerBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}"
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "loadBalancerInboundNatPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool"
                      }
                    ],
                    "loadBalancerBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool"
                      }
                    ],
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "loadBalancerInboundNatPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool"
                      }
                    ],
                    "loadBalancerBackendAddressPools": [
                      {
                        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool"
                      }
                    ],
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Application Profile

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "applicationProfile": {
        "galleryApplications": [
          {
            "tags": "myTag1",
            "order": 1,
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
            "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
            "treatFailureAsDeploymentFailure": true,
            "enableAutomaticUpgrade": false
          },
          {
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "applicationProfile": {
        "galleryApplications": [
          {
            "tags": "myTag1",
            "order": 1,
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
            "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config"
          },
          {
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "applicationProfile": {
        "galleryApplications": [
          {
            "tags": "myTag1",
            "order": 1,
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
            "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config"
          },
          {
            "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with automatic repairs enabled

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "automaticRepairsPolicy": {
      "enabled": true,
      "gracePeriod": "PT10M"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "automaticRepairsPolicy": {
      "enabled": true,
      "gracePeriod": "PT10M"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "automaticRepairsPolicy": {
      "enabled": true,
      "gracePeriod": "PT10M"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with boot diagnostics.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Disk Controller Type

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        },
        "diskControllerType": "NVMe"
      },
      "userData": "RXhhbXBsZSBVc2VyRGF0YQ==",
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        },
        "diskControllerType": "NVMe"
      },
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        },
        "diskControllerType": "SCSI"
      },
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scheduledEventsPolicy": {
      "scheduledEventsAdditionalPublishingTargets": {
        "eventGridAndResourceGraph": {
          "enable": true
        }
      },
      "userInitiatedRedeploy": {
        "automaticallyApprove": true
      },
      "userInitiatedReboot": {
        "automaticallyApprove": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with DiskEncryptionSet resource in os disk and data disk.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS",
            "diskEncryptionSet": {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
            }
          },
          "createOption": "FromImage"
        },
        "dataDisks": [
          {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS",
              "diskEncryptionSet": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
              }
            },
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 0
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS",
            "diskEncryptionSet": {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
            }
          },
          "createOption": "FromImage"
        },
        "dataDisks": [
          {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS",
              "diskEncryptionSet": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
              }
            },
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 0
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS",
            "diskEncryptionSet": {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
            }
          },
          "createOption": "FromImage"
        },
        "dataDisks": [
          {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS",
              "diskEncryptionSet": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
              }
            },
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 0
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with empty data disks on each vm.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 0
          },
          {
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 1
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 0,
            "diskSizeGB": 1023
          },
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 1,
            "diskSizeGB": 1023
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Succeeded"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 0,
            "diskSizeGB": 1023
          },
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 1,
            "diskSizeGB": 1023
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with ephemeral os disk provisioning in Nvme disk using placement property.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows2016",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "windows-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "NvmeDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "plan": {
    "publisher": "microsoft-ads",
    "product": "windows-data-science-vm",
    "name": "windows2016"
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "NvmeDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "NvmeDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with ephemeral os disks using placement property.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows2016",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "windows-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "ResourceDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "plan": {
    "publisher": "microsoft-ads",
    "product": "windows-data-science-vm",
    "name": "windows2016"
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "ResourceDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local",
            "placement": "ResourceDisk"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with ephemeral os disks.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows2016",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "windows-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "plan": {
    "publisher": "microsoft-ads",
    "product": "windows-data-science-vm",
    "name": "windows2016"
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "diffDiskSettings": {
            "option": "Local"
          },
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with extension time budget.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {}
            }
          }
        ],
        "extensionsTimeBudget": "PT1H20M"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {}
            }
          }
        ],
        "extensionsTimeBudget": "PT1H20M"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {}
            }
          }
        ],
        "extensionsTimeBudget": "PT1H20M"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Fpga Network Interfaces.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          },
          {
            "name": "{fpgaNic-Name}",
            "properties": {
              "primary": false,
              "enableAcceleratedNetworking": false,
              "enableIPForwarding": false,
              "enableFpga": true,
              "ipConfigurations": [
                {
                  "name": "{fpgaNic-Name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          },
          {
            "name": "{fpgaNic-Name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": true,
              "ipConfigurations": [
                {
                  "name": "{fpgaNic-Name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          },
          {
            "name": "{fpgaNic-Name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": true,
              "ipConfigurations": [
                {
                  "name": "{fpgaNic-Name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Host Encryption using encryptionAtHost property.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows2016",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "windows-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "encryptionAtHost": true
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "plan": {
    "publisher": "microsoft-ads",
    "product": "windows-data-science-vm",
    "name": "windows2016"
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "encryptionAtHost": true
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "plan": {
    "publisher": "microsoft-ads",
    "product": "standard-data-science-vm",
    "name": "standard-data-science-vm"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "standard-data-science-vm",
          "publisher": "microsoft-ads",
          "version": "latest",
          "offer": "standard-data-science-vm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "encryptionAtHost": true
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with managed boot diagnostics.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Network Interfaces with public ip address dns settings.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "enableAcceleratedNetworking": true,
              "auxiliaryMode": "AcceleratedConnections",
              "auxiliarySku": "A1",
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "primary": false,
              "enableAcceleratedNetworking": false,
              "enableIPForwarding": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4",
                    "publicIPAddressConfiguration": {
                      "name": "publicip",
                      "properties": {
                        "idleTimeoutInMinutes": 10,
                        "dnsSettings": {
                          "domainNameLabel": "vmsstestlabel01",
                          "domainNameLabelScope": "NoReuse"
                        }
                      }
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "ipConfigurations": [
                {
                  "name": "{nicConfig1-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4",
                    "publicIPAddressConfiguration": {
                      "name": "publicip",
                      "properties": {
                        "idleTimeoutInMinutes": 10,
                        "dnsSettings": {
                          "domainNameLabel": "vmsstestlabel01",
                          "domainNameLabelScope": "TenantReuse"
                        }
                      }
                    }
                  }
                }
              ],
              "enableAcceleratedNetworking": true,
              "auxiliaryMode": "AcceleratedConnections",
              "auxiliarySku": "A1"
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "disablePasswordAuthentication": false
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{nicConfig1-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "disableTcpStateTracking": true,
              "ipConfigurations": [
                {
                  "name": "{nicConfig1-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": true,
              "auxiliaryMode": "AcceleratedConnections",
              "auxiliarySku": "A1"
            }
          },
          {
            "name": "{nicConfig2-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": false,
              "enableFpga": false,
              "disableTcpStateTracking": false,
              "ipConfigurations": [
                {
                  "name": "{nicConfig2-name}",
                  "properties": {
                    "primary": true,
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with OS image scheduled events enabled.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "osImageNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT15M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "osImageNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT15M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "osImageNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT15M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with password authentication.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with premium storage.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Premium_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Premium_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Premium_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with priority mix policy

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 10,
    "name": "Standard_A8m_v2"
  },
  "location": "westus",
  "properties": {
    "singlePlacementGroup": false,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "orchestrationMode": "Flexible",
    "priorityMixPolicy": {
      "baseRegularPriorityCount": 4,
      "regularPriorityPercentageAboveBase": 50
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 10,
    "name": "Standard_A8m_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "orchestrationMode": "Flexible",
    "priorityMixPolicy": {
      "baseRegularPriorityCount": 4,
      "regularPriorityPercentageAboveBase": 50
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 10,
    "name": "Standard_A8m_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "orchestrationMode": "Flexible",
    "priorityMixPolicy": {
      "baseRegularPriorityCount": 4,
      "regularPriorityPercentageAboveBase": 50
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with ProxyAgent Settings of enabled and mode.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "publisher": "MicrosoftWindowsServer",
          "offer": "WindowsServer",
          "sku": "2019-Datacenter",
          "version": "latest"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "proxyAgentSettings": {
          "enabled": true,
          "mode": "Enforce"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "publisher": "MicrosoftWindowsServer",
          "offer": "WindowsServer",
          "sku": "2019-Datacenter",
          "version": "latest"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "proxyAgentSettings": {
          "enabled": true,
          "mode": "Enforce"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "publisher": "MicrosoftWindowsServer",
          "offer": "WindowsServer",
          "sku": "2019-Datacenter",
          "version": "latest"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "proxyAgentSettings": {
          "enabled": true,
          "mode": "Enforce"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with Resilient VM Creation enabled

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": false,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMCreationPolicy": {
        "enabled": true
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMCreationPolicy": {
        "enabled": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMCreationPolicy": {
        "enabled": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Resilient VM Deletion enabled

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": false,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMDeletionPolicy": {
        "enabled": true
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMDeletionPolicy": {
        "enabled": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": false,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "resiliencyPolicy": {
      "resilientVMDeletionPolicy": {
        "enabled": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with scaleInPolicy.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scaleInPolicy": {
      "rules": [
        "OldestVM"
      ],
      "forceDeletion": true
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scaleInPolicy": {
      "rules": [
        "OldestVM"
      ],
      "forceDeletion": true
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "scaleInPolicy": {
      "rules": [
        "OldestVM"
      ],
      "forceDeletion": true
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Security Posture Reference

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "location": "eastus2euap",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "securityPostureReference": {
        "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "createOption": "FromImage",
          "name": "osDisk"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2",
    "virtualMachineProfile": {
      "securityPostureReference": {
        "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "eastus2euap",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2",
    "virtualMachineProfile": {
      "securityPostureReference": {
        "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "eastus2euap",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with SecurityType as ConfidentialVM

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2as_v5"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows-cvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "17763.2183.2109130127",
          "offer": "2019-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "VMGuestStateOnly"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2as_v5"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows-cvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "17763.2183.2109130127",
          "offer": "2019-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "VMGuestStateOnly"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2as_v5"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows-cvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "17763.2183.2109130127",
          "offer": "2019-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "VMGuestStateOnly"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with SecurityType as ConfidentialVM and NonPersistedTPM securityEncryptionType

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2es_v5"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "linux-cvm",
          "publisher": "UbuntuServer",
          "version": "17763.2183.2109130127",
          "offer": "2022-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "NonPersistedTPM"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": false,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2es_v5"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "linux-cvm",
          "publisher": "UbuntuServer",
          "version": "17763.2183.2109130127",
          "offer": "2022-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "NonPersistedTPM"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": false,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DC2es_v5"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "linux-cvm",
          "publisher": "UbuntuServer",
          "version": "17763.2183.2109130127",
          "offer": "2022-datacenter-cvm"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS",
            "securityProfile": {
              "securityEncryptionType": "NonPersistedTPM"
            }
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": false,
          "vTpmEnabled": true
        },
        "securityType": "ConfidentialVM"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with Service Artifact Reference

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "location": "eastus2euap",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "serviceArtifactReference": {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "createOption": "FromImage",
          "name": "osDisk"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64",
    "virtualMachineProfile": {
      "serviceArtifactReference": {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "eastus2euap",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_A1"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64",
    "virtualMachineProfile": {
      "serviceArtifactReference": {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName"
      },
      "storageProfile": {
        "imageReference": {
          "sku": "2022-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "name": "osDisk",
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic",
      "automaticOSUpgradePolicy": {
        "enableAutomaticOSUpgrade": true
      }
    },
    "provisioningState": "Creating"
  },
  "location": "eastus2euap",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with spot restore policy

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A8m_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "spotRestorePolicy": {
      "enabled": true,
      "restoreTimeout": "PT1H"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A8m_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "spotRestorePolicy": {
      "enabled": true,
      "restoreTimeout": "PT1H"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A8m_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "priority": "Spot",
      "evictionPolicy": "Deallocate",
      "billingProfile": {
        "maxPrice": -1
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "spotRestorePolicy": {
      "enabled": true,
      "restoreTimeout": "PT1H"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with ssh authentication.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "linuxConfiguration": {
          "ssh": {
            "publicKeys": [
              {
                "path": "/home/{your-username}/.ssh/authorized_keys",
                "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1"
              }
            ]
          },
          "disablePasswordAuthentication": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "16.04-LTS",
          "publisher": "Canonical",
          "version": "latest",
          "offer": "UbuntuServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "ssh": {
            "publicKeys": [
              {
                "path": "/home/{your-username}/.ssh/authorized_keys",
                "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1"
              }
            ]
          },
          "disablePasswordAuthentication": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "16.04-LTS",
          "publisher": "Canonical",
          "version": "latest",
          "offer": "UbuntuServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "linuxConfiguration": {
          "ssh": {
            "publicKeys": [
              {
                "path": "/home/{your-username}/.ssh/authorized_keys",
                "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1"
              }
            ]
          },
          "disablePasswordAuthentication": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with terminate scheduled events enabled.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "terminateNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT5M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "terminateNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT5M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "scheduledEventsProfile": {
        "terminateNotificationProfile": {
          "enable": true,
          "notBeforeTimeout": "PT5M"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with Uefi Settings of secureBoot and vTPM.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows10-tvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "18363.592.2001092016",
          "offer": "windowsserver-gen2preview-preview"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "TrustedLaunch"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  },
  "location": "westus"
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows10-tvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "18363.592.2001092016",
          "offer": "windowsserver-gen2preview-preview"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "TrustedLaunch"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D2s_v3"
  },
  "name": "{vmss-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "windows10-tvm",
          "publisher": "MicrosoftWindowsServer",
          "version": "18363.592.2001092016",
          "offer": "windowsserver-gen2preview-preview"
        },
        "osDisk": {
          "caching": "ReadOnly",
          "managedDisk": {
            "storageAccountType": "StandardSSD_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "securityProfile": {
        "uefiSettings": {
          "secureBootEnabled": true,
          "vTpmEnabled": true
        },
        "securityType": "TrustedLaunch"
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus"
}

Create a scale set with userData.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "upgradePolicy": {
      "mode": "Manual"
    },
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "userData": "RXhhbXBsZSBVc2VyRGF0YQ==",
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with virtual machines in different zones.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A1_v2"
  },
  "location": "centralus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 0
          },
          {
            "diskSizeGB": 1023,
            "createOption": "Empty",
            "lun": 1
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic"
    }
  },
  "zones": [
    "1",
    "3"
  ]
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": false,
    "overprovision": true,
    "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa",
    "zoneBalance": false,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 0,
            "diskSizeGB": 1023
          },
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 1,
            "diskSizeGB": 1023
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic"
    },
    "provisioningState": "Succeeded"
  },
  "zones": [
    "1",
    "3"
  ],
  "location": "centralus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 2,
    "name": "Standard_A1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": false,
    "overprovision": true,
    "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa",
    "zoneBalance": false,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage",
          "diskSizeGB": 512
        },
        "dataDisks": [
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 0,
            "diskSizeGB": 1023
          },
          {
            "caching": "None",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "Empty",
            "lun": 1,
            "diskSizeGB": 1023
          }
        ]
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Automatic"
    },
    "provisioningState": "Creating"
  },
  "zones": [
    "1",
    "3"
  ],
  "location": "centralus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a scale set with vm size properties

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "upgradePolicy": {
      "mode": "Manual"
    },
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "userData": "RXhhbXBsZSBVc2VyRGF0YQ==",
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "hardwareProfile": {
        "vmSizeProperties": {
          "vCPUsAvailable": 1,
          "vCPUsPerCore": 1
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a VMSS with an extension that has suppressFailures enabled

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "suppressFailures": true
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "suppressFailures": true
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "suppressFailures": true
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create a VMSS with an extension with protectedSettingsFromKeyVault

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "protectedSettingsFromKeyVault": {
                "sourceVault": {
                  "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
                },
                "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
              }
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "protectedSettingsFromKeyVault": {
                "sourceVault": {
                  "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
                },
                "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
              }
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_D1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "diagnosticsProfile": {
        "bootDiagnostics": {
          "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
          "enabled": true
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "extensionProfile": {
        "extensions": [
          {
            "name": "{extension-name}",
            "properties": {
              "autoUpgradeMinorVersion": false,
              "publisher": "{extension-Publisher}",
              "type": "{extension-Type}",
              "typeHandlerVersion": "{handler-version}",
              "settings": {},
              "protectedSettingsFromKeyVault": {
                "sourceVault": {
                  "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
                },
                "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
              }
            }
          }
        ]
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

Create or update a scale set with capacity reservation.

Sample Request

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}?api-version=2024-03-01

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "location": "westus",
  "properties": {
    "overprovision": true,
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "adminPassword": "{your-password}"
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
                    }
                  }
                }
              ]
            }
          }
        ]
      },
      "capacityReservation": {
        "capacityReservationGroup": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    }
  }
}

Sample Response

{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "capacityReservation": {
        "capacityReservationGroup": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}
{
  "sku": {
    "tier": "Standard",
    "capacity": 3,
    "name": "Standard_DS1_v2"
  },
  "name": "{vmss-name}",
  "properties": {
    "singlePlacementGroup": true,
    "overprovision": true,
    "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
    "virtualMachineProfile": {
      "storageProfile": {
        "imageReference": {
          "sku": "2016-Datacenter",
          "publisher": "MicrosoftWindowsServer",
          "version": "latest",
          "offer": "WindowsServer"
        },
        "osDisk": {
          "caching": "ReadWrite",
          "managedDisk": {
            "storageAccountType": "Standard_LRS"
          },
          "createOption": "FromImage"
        }
      },
      "osProfile": {
        "computerNamePrefix": "{vmss-name}",
        "adminUsername": "{your-username}",
        "secrets": [],
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "{vmss-name}",
            "properties": {
              "dnsSettings": {
                "dnsServers": []
              },
              "primary": true,
              "enableIPForwarding": true,
              "ipConfigurations": [
                {
                  "name": "{vmss-name}",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
                    },
                    "privateIPAddressVersion": "IPv4"
                  }
                }
              ],
              "enableAcceleratedNetworking": false
            }
          }
        ]
      },
      "capacityReservation": {
        "capacityReservationGroup": {
          "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
        }
      }
    },
    "upgradePolicy": {
      "mode": "Manual"
    },
    "provisioningState": "Creating"
  },
  "location": "westus",
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
}

定義

名稱 Description
AdditionalCapabilities

啟用或停用虛擬機或虛擬機擴展集上的功能。

AdditionalUnattendContent

指定 Windows 安裝程式所使用的 Unattend.xml 檔案中可包含的其他 XML 格式資訊。 內容是透過設定名稱、元件名稱和套用內容的傳遞來定義。

ApiEntityReference

API 實體參考。

ApiError

Api 錯誤。

ApiErrorBase

API 錯誤基底。

ApplicationProfile

包含應該提供給 VM/VMSS 的資源庫應用程式清單

AutomaticOSUpgradePolicy

用於執行自動OS升級的組態參數。

AutomaticRepairsPolicy

指定虛擬機擴展集上自動修復的組態參數。

BillingProfile

指定 Azure Spot VM 或 VMSS 的計費相關詳細數據。 API 版本下限:2019-03-01。

BootDiagnostics

開機診斷是一項偵錯功能,可讓您檢視控制台輸出和螢幕快照以診斷 VM 狀態。 您可以輕鬆地檢視主控台記錄檔的輸出。 Azure 也可讓您從 Hypervisor 查看 VM 的螢幕快照。

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

CapacityReservationProfile

容量保留配置文件的參數。

CloudError

計算服務的錯誤回應。

ComponentNames

元件名稱。 目前唯一允許的值是 Microsoft-Windows-Shell-Setup。

DeleteOptions

指定刪除 VM 時,公用 IP 會發生什麼情況

DiagnosticsProfile

指定開機診斷設定狀態。 API 版本下限:2015-06-15。

DiffDiskOptions

指定作業系統磁碟的暫時磁碟設定。

DiffDiskPlacement

指定作業系統磁碟的暫時磁碟位置。 用戶可以在要求中使用此屬性來選擇位置,例如快取磁碟、資源磁碟或 nvme 磁碟空間,以進行暫時 OS 磁碟布建。 如需暫時 OS 磁碟大小需求的詳細資訊,請參閱 Windows VM 的暫時 OS 磁碟大小需求, https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements 以及位於 https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements的 Linux VM。 NvmeDisk 的最低 API 版本:2024-03-01。

DiffDiskSettings

描述可針對操作系統磁碟指定之暫時磁碟設定的參數。 注意: 暫時磁碟設定只能針對受控磁碟指定。

DiskControllerTypes
DiskCreateOptionTypes

指定應該如何建立擴展集中的虛擬機。 唯一允許的值是: FromImage。 當您使用映像來建立虛擬機時,會使用此值。 如果您使用平臺映像,則也會使用上述的 imageReference 元素。 如果您使用市集映射,您也會使用先前所述的 plan 元素。

DiskDeleteOptionTypes

指定是否應在 VMSS Flex 刪除時刪除或卸離 OS 磁碟 (此功能僅適用於只有彈性協調流程模式的 VMSS) 。

可能的值:

刪除 如果使用此值,則會在刪除 VMSS Flex VM 時刪除 OS 磁碟。

分離 如果使用此值,則會在刪除 VMSS Flex VM 之後保留 OS 磁碟。

預設值設定為 Delete。 針對暫時OS磁碟,預設值會設定為 Delete。 使用者無法變更暫時 OS 磁碟的刪除選項。

DiskEncryptionSetParameters

描述可針對磁碟指定的客戶受控磁碟加密集資源標識符參數。 注意: 磁碟加密集資源標識碼只能指定給受控磁碟。 如需詳細資訊,請參閱 https://aka.ms/mdssewithcmkoverview

DomainNameLabelScopeTypes

功能變數名稱標籤範圍。根據功能變數名稱卷標範圍的原則所產生的哈希功能變數名稱卷標串連,vm 索引將會是將建立之 PublicIPAddress 資源的功能變數名稱卷標

EncryptionIdentity

指定 ADE 用來取得金鑰保存庫作業存取令牌的受控識別。

EventGridAndResourceGraph

指定 eventGridAndResourceGraph 相關的排程事件相關組態。

ExtendedLocation

擴充位置的複雜類型。

ExtendedLocationTypes

擴充位置的類型。

ImageReference

指定要使用之映像的相關信息。 您可以指定平臺映像、市集映像或虛擬機映像的相關信息。 當您想要使用平臺映像、市集映像或虛擬機映像,但不會用於其他建立作業時,需要此元素。 注意:映像參考發行者和供應專案只能在您建立擴展集時設定。

InnerError

內部錯誤詳細數據。

InstanceViewStatus

實例檢視狀態。

IPVersion

從 Api-Version 2019-07-01 開始提供,它代表特定 ipconfiguration 是 IPv4 或 IPv6。 預設值會採用為 IPv4。 可能的值為:'IPv4' 和 'IPv6'。

KeyVaultSecretReference

描述 金鑰保存庫 秘密的參考

LinuxConfiguration

指定虛擬機上的Linux作業系統設定。 如需支援的Linux發行版清單,請參閱 Azure-Endorsed 發行版上的Linux

LinuxPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補程序評估。 屬性 provisionVMAgent 必須為 true。

LinuxPatchSettings

指定與Linux上的VM客體修補相關的設定。

LinuxVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

LinuxVMGuestPatchAutomaticByPlatformSettings

指定在Linux修補程式設定中選取修補程式模式 AutomaticByPlatform 時要套用的其他設定。

LinuxVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與具有 OrchestrationMode 的虛擬機擴展集相關聯的虛擬機作為彈性。

可能的值包括:

ImageDefault - 會使用虛擬機的默認修補組態。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 屬性 provisionVMAgent 必須為 true

Mode

指定如果啟用此功能,ProxyAgent 將會在 上執行的模式。 ProxyAgent 會開始稽核或監視,但不會對稽核模式中的主機端點要求強制執行訪問控制,而在 [強制執行] 模式中,則會強制執行訪問控制。 默認值為 [強制] 模式。

NetworkApiVersion

會指定在具有協調流程模式 「彈性」的虛擬機擴展集網路介面設定中建立網路資源時所使用的 Microsoft.Network API 版本

NetworkInterfaceAuxiliaryMode

指定是否為網路介面資源啟用輔助模式。

NetworkInterfaceAuxiliarySku

指定是否為網路介面資源啟用輔助 SKU。

OperatingSystemTypes

此屬性可讓您指定從使用者映像或特製化 VHD 建立 VM 時,磁碟包含的 OS 類型。 可能的值為: Windows、Linux。

OrchestrationMode

指定虛擬機擴展集的協調流程模式。

OSImageNotificationProfile
PassNames

傳遞名稱。 目前唯一允許的值是 OobeSystem。

PatchSettings

指定與 Windows 上的 VM 客體修補相關的設定。

Plan

指定用來建立虛擬機之 Marketplace 映像的相關信息。 此元素僅用於市集映像。 您必須先啟用映像以供程序設計使用,才能從 API 使用市集映射。 在 Azure 入口網站 中,尋找您想要使用的市集映射,然後按兩下 [以程序設計方式部署] [開始使用] -> 。 輸入任何必要資訊,然後按兩下 [ 儲存]。

PriorityMixPolicy

指定擴展集中具有彈性協調流程模式之 Spot 和一般優先順序 VM 的目標分割。 有了這個屬性,客戶就可以指定建立為 VMSS flex 實例的一般優先順序 VM 基底數目,並在達到此基底目標之後,在現成和一般優先順序 VM 之間分割。

ProtocolTypes

指定 WinRM 接聽程式的通訊協定。 可能的值為: HTTP、https。

ProxyAgentSettings

指定建立虛擬機時的 ProxyAgent 設定。 API 版本下限:2024-03-01。

PublicIPAddressSku

描述公用IP Sku。 它只能以 OrchestrationMode 設定為彈性。

PublicIPAddressSkuName

指定公用IP SKU 名稱

PublicIPAddressSkuTier

指定公用IP SKU層

RepairAction

修復動作的類型 (取代、重新啟動、重新映像) ,用於修復擴展集中狀況不良的虛擬機。 預設值為 replace。

ResiliencyPolicy

描述復原原則 - resiliencVMCreationPolicy 和/或 resiliencVMDeletionPolicy。

ResilientVMCreationPolicy

執行復原 VM 建立時所使用的組態參數。

ResilientVMDeletionPolicy

執行復原 VM 刪除時所使用的組態參數。

ResourceIdentityType

用於虛擬機擴展集的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從虛擬機擴展集移除任何身分識別。

RollingUpgradePolicy

執行滾動升級時所使用的組態參數。

ScaleInPolicy

描述虛擬機擴展集的相應縮小原則。

ScheduledEventsAdditionalPublishingTargets
ScheduledEventsPolicy

指定重新部署、重新啟動和 ScheduledEventsAdditionalPublishingTargets Scheduled Event 相關組態。

ScheduledEventsProfile
securityEncryptionTypes

指定受控磁碟的 EncryptionType。 它設定為 DiskWithVMGuestState 以加密受控磁碟以及 VMGuestState Blob、VMGuestStateOnly 只加密 VMGuestState Blob,以及 NonPersistedTPM 表示未在 VMGuestState Blob 中保存韌體狀態。 注意: 它只能設定為機密 VM。

SecurityPostureReference

指定要用於擴展集中所有虛擬機的安全性狀態。 最低 API 版本:2023-03-01

SecurityProfile

指定虛擬機或虛擬機擴展集的安全性配置檔設定。

SecurityTypes

指定虛擬機的 SecurityType。 它必須設定為任何指定的值,才能啟用 UefiSettings。 默認行為為:除非設定此屬性,否則不會啟用 UefiSettings。

ServiceArtifactReference

指定使用 'latest' 映射版本時,用來為擴展集中的所有虛擬機設定相同映像版本的服務成品參考標識符。 API 版本下限:2022-11-01

SettingNames

指定要套用內容之設定的名稱。 可能的值為:FirstLogonCommands 和 AutoLogon。

Sku

描述虛擬機擴展集 SKU。 注意:如果擴展集目前所在的硬體上不支援新的 VM SKU,您必須先解除分配擴展集中的 VM,才能修改 SKU 名稱。

SpotRestorePolicy

指定虛擬機擴展集的 Spot-Try-Restore 屬性。 透過此屬性,客戶可以根據容量可用性和定價條件約束,啟用或停用收回的現成 VMSS VM 實例自動還原。

SshConfiguration

在 Azure 上執行的 Linux 型 VM SSH 組態

SshPublicKey

包含 SSH 憑證公鑰的相關信息,以及放置公鑰之 Linux VM 上的路徑。

StatusLevelTypes

層級程序代碼。

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,因此無法與OS磁碟搭配使用。

SubResource
TerminateNotificationProfile
UefiSettings

指定安全性設定,例如建立虛擬機時所使用的安全開機和 vTPM。 API 版本下限:2020-12-01。

UpgradeMode

指定升級至擴展集中虛擬機的模式。

可能的值包括:

手動 - 您可以控制擴充集中虛擬機更新的應用程式。 您可以使用 manualUpgrade 動作來執行此動作。

自動 -擴展集中的所有虛擬機都會同時自動更新。

UpgradePolicy

描述升級原則 - 自動、手動或滾動。

UserAssignedIdentities

與虛擬機相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。

UserInitiatedReboot

指定重新啟動相關的排程事件相關設定。

UserInitiatedRedeploy

指定重新部署相關的排程事件相關組態。

VaultCertificate

描述 金鑰保存庫 中的單一憑證參考,以及憑證應該位於 VM 上的位置。

VaultSecretGroup

描述一組相同 金鑰保存庫 的憑證。

VirtualHardDisk

描述磁碟的 URI。

VirtualMachineEvictionPolicyTypes

指定 Azure Spot 虛擬機和 Azure Spot 擴展集的收回原則。 針對 Azure Spot 虛擬機,同時支援「解除分配」和「刪除」,且最低 API 版本為 2019-03-01。 針對 Azure Spot 擴展集,同時支援 'Deallocate' 和 'Delete',且最低 api 版本為 2017-10-30-preview。

VirtualMachineExtension

描述虛擬機擴充功能。

VirtualMachineExtensionInstanceView

虛擬機擴充功能的實例檢視。

VirtualMachinePriorityTypes

指定擴展集中虛擬機的優先順序。 API 版本下限:2017-10-30-preview。

VirtualMachineScaleSet

描述虛擬機擴展集。

VirtualMachineScaleSetDataDisk

描述虛擬機擴展集數據磁碟。

VirtualMachineScaleSetExtension

描述虛擬機擴展集擴充功能。

VirtualMachineScaleSetExtensionProfile

描述虛擬機擴展集擴充功能配置檔。

VirtualMachineScaleSetHardwareProfile

指定虛擬機擴展集的硬體設定。

VirtualMachineScaleSetIdentity

虛擬機擴展集的身分識別。

VirtualMachineScaleSetIPConfiguration

描述虛擬機擴展集網路配置檔的IP組態。

VirtualMachineScaleSetIpTag

包含與公用IP位址相關聯的IP標籤。

VirtualMachineScaleSetManagedDiskParameters

描述 ScaleSet 受控磁碟的參數。

VirtualMachineScaleSetNetworkConfiguration

描述虛擬機擴展集網路配置檔的網路組態。

VirtualMachineScaleSetNetworkConfigurationDnsSettings

描述虛擬機擴展集網路設定的 DNS 設定。

VirtualMachineScaleSetNetworkProfile

描述虛擬機擴展集網路配置檔。

VirtualMachineScaleSetOSDisk

描述虛擬機擴展集作業系統磁碟。

VirtualMachineScaleSetOSProfile

描述虛擬機擴展集 OS 配置檔。

VirtualMachineScaleSetPublicIPAddressConfiguration

描述虛擬機擴展集IP組態的PublicIPAddress設定

VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings

描述虛擬機擴展集網路組態的 DNS 設定。

VirtualMachineScaleSetScaleInRules

調整虛擬機擴展集時所要遵循的規則。

可能的值包括:

預設 當虛擬機擴展集相應縮小時,如果擴展集是區域性擴展集,則擴展集會先跨區域平衡。 然後,它會盡可能跨容錯網域進行平衡。 在每個容錯網域內,選擇移除的虛擬機將是未受到相應縮小保護的最新虛擬機。

OldestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最舊虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最舊虛擬機來移除。

NewestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最新虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最新虛擬機來移除。

VirtualMachineScaleSetStorageProfile

描述虛擬機擴展集記憶體配置檔。

VirtualMachineScaleSetVMProfile

描述虛擬機擴展集虛擬機配置檔。

VMDiskSecurityProfile

指定受控磁碟的安全性配置檔設定。 注意: 它只能設定為機密 VM。

VMGalleryApplication

指定參考計算資源庫應用程式版本的必要資訊

VMSizeProperties

指定虛擬機上的 VM 大小屬性設定。

WindowsConfiguration

指定虛擬機器上的 Windows 作業系統設定。

WindowsPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補程序評估。 屬性 provisionVMAgent 必須為 true。

WindowsVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

WindowsVMGuestPatchAutomaticByPlatformSettings

指定在 Windows 修補程式設定中選取修補程式模式 AutomaticByPlatform 時要套用的其他設定。

WindowsVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與 OrchestraMode 為彈性的虛擬機擴展集相關聯的虛擬機。

可能的值包括:

手動 - 您可以控制將修補程式應用程式套用至虛擬機。 您可以在 VM 內手動套用修補程式來執行此動作。 在此模式中,自動更新會停用;屬性 WindowsConfiguration.enableAutomaticUpdates 必須為 false

AutomaticByOS - 作業系統會自動更新虛擬機。 WindowsConfiguration.enableAutomaticUpdates 屬性必須是 true。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 provisionVMAgent 和 WindowsConfiguration.enableAutomaticUpdates 屬性必須是 true

WinRMConfiguration

描述 VM 的 Windows 遠端管理設定

WinRMListener

描述 Windows 遠端管理接聽程式的通訊協議和指紋

AdditionalCapabilities

啟用或停用虛擬機或虛擬機擴展集上的功能。

名稱 類型 Description
hibernationEnabled

boolean

啟用或停用 VM 上休眠功能的旗標。

ultraSSDEnabled

boolean

旗標,可讓或停用在 VM 或 VMSS 上具有一或多個具有 UltraSSD_LRS記憶體帳戶類型的受控數據磁碟。 只有在啟用此屬性時,才能將具有記憶體帳戶類型的受控磁碟UltraSSD_LRS新增至虛擬機或虛擬機擴展集。

AdditionalUnattendContent

指定 Windows 安裝程式所使用的 Unattend.xml 檔案中可包含的其他 XML 格式資訊。 內容是透過設定名稱、元件名稱和套用內容的傳遞來定義。

名稱 類型 Description
componentName

ComponentNames

元件名稱。 目前唯一允許的值是 Microsoft-Windows-Shell-Setup。

content

string

針對指定的路徑和元件,指定新增至 unattend.xml 檔案的 XML 格式化內容。 XML 必須小於 4KB,而且必須包含要插入之設定或功能的根元素。

passName

PassNames

傳遞名稱。 目前唯一允許的值是 OobeSystem。

settingName

SettingNames

指定要套用內容之設定的名稱。 可能的值為:FirstLogonCommands 和 AutoLogon。

ApiEntityReference

API 實體參考。

名稱 類型 Description
id

string

/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... 形式的 ARM 資源標識符

ApiError

Api 錯誤。

名稱 類型 Description
code

string

錯誤碼。

details

ApiErrorBase[]

API 錯誤詳細數據

innererror

InnerError

Api 內部錯誤

message

string

錯誤訊息。

target

string

特定錯誤的目標。

ApiErrorBase

API 錯誤基底。

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息。

target

string

特定錯誤的目標。

ApplicationProfile

包含應該提供給 VM/VMSS 的資源庫應用程式清單

名稱 類型 Description
galleryApplications

VMGalleryApplication[]

指定應該提供給 VM/VMSS 的資源庫應用程式

AutomaticOSUpgradePolicy

用於執行自動OS升級的組態參數。

名稱 類型 Description
disableAutomaticRollback

boolean

是否應該停用OS映像復原功能。 預設值為 False。

enableAutomaticOSUpgrade

boolean

指出當較新版本的OS映像可用時,是否應該以滾動方式自動套用OS升級至擴展集實例。 預設值為 False。 如果 Windows 擴展集將此設定為 true,enableAutomaticUpdates 會自動設定為 false,且無法設定為 true。

osRollingUpgradeDeferral

boolean

指出自動OS升級是否應該延遲。 延後操作系統升級會透過IMDS標籤 'Platform.PendingOSUpgrade',依每個 VM 傳送進階通知,讓OS升級從滾動升級傳入。 接著,升級會延遲,直到透過ApprovRollingUpgrade呼叫核准升級為止。

useRollingUpgradePolicy

boolean

指出是否應在自動OS升級期間使用滾動升級原則。 預設值為 False。 如果未在 VMSS 上定義任何原則,自動 OS 升級將會回復為默認原則。

AutomaticRepairsPolicy

指定虛擬機擴展集上自動修復的組態參數。

名稱 類型 Description
enabled

boolean

指定是否應在虛擬機擴展集上啟用自動修復。 預設值為 false。

gracePeriod

string

因為 VM 上的狀態變更而暫停自動修復的時間量。 寬限時間會在狀態變更完成之後開始。 這有助於避免提前或意外修復。 時間持續時間應以 ISO 8601 格式指定。 允許的寬限期下限為 10 分鐘, (PT10M) ,這也是預設值。 允許的寬限期上限為 90 分鐘, (PT90M) 。

repairAction

RepairAction

修復動作類型 (取代、重新啟動、重新安裝映像) ,用於修復擴展集中狀況不良的虛擬機。 預設值為 replace。

BillingProfile

指定 Azure Spot VM 或 VMSS 的計費相關詳細數據。 API 版本下限:2019-03-01。

名稱 類型 Description
maxPrice

number

指定您願意支付 Azure Spot VM/VMSS 的最大價格。 此價格以美元為單位。

此價格將會與 VM 大小的目前 Azure Spot 價格進行比較。 此外,價格會在建立/更新 Azure Spot VM/VMSS 時進行比較,而且只有在 maxPrice 大於目前的 Azure Spot 價格時,作業才會成功。

如果目前的 Azure Spot 價格超出建立 VM/VMSS 之後的 maxPrice,maxPrice 也會用於收回 Azure Spot VM/VMSS。

可能的值包括:

- 任何大於零的十進位值。 範例:0.01538

-1 – 表示預設價格為隨選。

您可以將 maxPrice 設定為 -1,以指出基於價格考慮,不應收回 Azure Spot VM/VMSS。 此外,如果默認價格不是由您提供,則為 -1。

API 版本下限:2019-03-01。

BootDiagnostics

開機診斷是一項偵錯功能,可讓您檢視控制台輸出和螢幕快照以診斷 VM 狀態。 您可以輕鬆地檢視主控台記錄檔的輸出。 Azure 也可讓您從 Hypervisor 查看 VM 的螢幕快照。

名稱 類型 Description
enabled

boolean

是否應在虛擬機上啟用開機診斷。

storageUri

string

用來放置主控台輸出和螢幕快照的記憶體帳戶 URI。 如果未在啟用開機診斷時指定 storageUri,則會使用受控記憶體。

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體為 None。進階記憶體的 ReadOnly。

名稱 類型 Description
None

string

ReadOnly

string

ReadWrite

string

CapacityReservationProfile

容量保留配置文件的參數。

名稱 類型 Description
capacityReservationGroup

SubResource

指定容量保留群組資源標識符,此標識元應該用於配置虛擬機或擴展集 VM 實例,前提是已保留足夠的容量。 如需詳細資訊, https://aka.ms/CapacityReservation 請參閱 。

CloudError

計算服務的錯誤回應。

名稱 類型 Description
error

ApiError

Api 錯誤。

ComponentNames

元件名稱。 目前唯一允許的值是 Microsoft-Windows-Shell-Setup。

名稱 類型 Description
Microsoft-Windows-Shell-Setup

string

DeleteOptions

指定刪除 VM 時,公用 IP 會發生什麼情況

名稱 類型 Description
Delete

string

Detach

string

DiagnosticsProfile

指定開機診斷設定狀態。 API 版本下限:2015-06-15。

名稱 類型 Description
bootDiagnostics

BootDiagnostics

開機診斷是一項偵錯功能,可讓您檢視控制台輸出和螢幕快照來診斷 VM 狀態。 注意:如果指定 storageUri,請確定記憶體帳戶位於與 VM 相同的區域和訂用帳戶中。 您可以輕鬆地檢視主控台記錄的輸出。 Azure 也可讓您從 Hypervisor 查看 VM 的螢幕快照。

DiffDiskOptions

指定作業系統磁碟的暫時磁碟設定。

名稱 類型 Description
Local

string

DiffDiskPlacement

指定作業系統磁碟的暫時磁碟位置。 用戶可以在要求中使用此屬性來選擇位置,例如快取磁碟、資源磁碟或 nvme 磁碟空間,以進行暫時 OS 磁碟布建。 如需暫時 OS 磁碟大小需求的詳細資訊,請參閱 Windows VM 的暫時 OS 磁碟大小需求, https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements 以及位於 https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements的 Linux VM。 NvmeDisk 的最低 API 版本:2024-03-01。

名稱 類型 Description
CacheDisk

string

NvmeDisk

string

ResourceDisk

string

DiffDiskSettings

描述可針對操作系統磁碟指定之暫時磁碟設定的參數。 注意: 暫時磁碟設定只能針對受控磁碟指定。

名稱 類型 Description
option

DiffDiskOptions

指定作業系統磁碟的暫時磁碟設定。

placement

DiffDiskPlacement

指定作業系統磁碟的暫時磁碟位置。 可能的值為: CacheDisk、ResourceDisk、NvmeDisk。 默認行為為:如果已針對 VM 大小設定 快取Disk ,否則會使用 ResourceDiskNvmeDisk 。 請參閱 上的 https://docs.microsoft.com/azure/virtual-machines/windows/sizes Windows VM 和 Linux VM https://docs.microsoft.com/azure/virtual-machines/linux/sizes 的 VM 大小檔,以檢查哪些 VM 大小會公開快取磁碟。 NvmeDisk 的最低 API 版本:2024-03-01。

DiskControllerTypes

名稱 類型 Description
NVMe

string

SCSI

string

DiskCreateOptionTypes

指定應該如何建立擴展集中的虛擬機。 唯一允許的值是: FromImage。 當您使用映像來建立虛擬機時,會使用此值。 如果您使用平臺映像,則也會使用上述的 imageReference 元素。 如果您使用市集映射,您也會使用先前所述的 plan 元素。

名稱 類型 Description
Attach

string

Copy

string

Empty

string

FromImage

string

Restore

string

DiskDeleteOptionTypes

指定是否應在 VMSS Flex 刪除時刪除或卸離 OS 磁碟 (此功能僅適用於只有彈性協調流程模式的 VMSS) 。

可能的值:

刪除 如果使用此值,則會在刪除 VMSS Flex VM 時刪除 OS 磁碟。

分離 如果使用此值,則會在刪除 VMSS Flex VM 之後保留 OS 磁碟。

預設值設定為 Delete。 針對暫時OS磁碟,預設值會設定為 Delete。 使用者無法變更暫時 OS 磁碟的刪除選項。

名稱 類型 Description
Delete

string

Detach

string

DiskEncryptionSetParameters

描述可針對磁碟指定的客戶受控磁碟加密集資源標識符參數。 注意: 磁碟加密集資源標識碼只能指定給受控磁碟。 如需詳細資訊,請參閱 https://aka.ms/mdssewithcmkoverview

名稱 類型 Description
id

string

資源標識碼

DomainNameLabelScopeTypes

功能變數名稱標籤範圍。根據功能變數名稱卷標範圍的原則所產生的哈希功能變數名稱卷標串連,vm 索引將會是將建立之 PublicIPAddress 資源的功能變數名稱卷標

名稱 類型 Description
NoReuse

string

ResourceGroupReuse

string

SubscriptionReuse

string

TenantReuse

string

EncryptionIdentity

指定 ADE 用來取得金鑰保存庫作業存取令牌的受控識別。

名稱 類型 Description
userAssignedIdentityResourceId

string

指定與 VM 相關聯的其中一個使用者身分識別的 ARM 資源識別碼。

EventGridAndResourceGraph

指定 eventGridAndResourceGraph 相關的排程事件相關組態。

名稱 類型 Description
enable

boolean

指定已排程事件相關設定是否啟用事件方格和資源圖表。

ExtendedLocation

擴充位置的複雜類型。

名稱 類型 Description
name

string

擴充位置的名稱。

type

ExtendedLocationTypes

擴充位置的類型。

ExtendedLocationTypes

擴充位置的類型。

名稱 類型 Description
EdgeZone

string

ImageReference

指定要使用之映像的相關信息。 您可以指定平臺映像、市集映像或虛擬機映像的相關信息。 當您想要使用平臺映像、市集映像或虛擬機映像,但不會用於其他建立作業時,需要此元素。 注意:映像參考發行者和供應專案只能在您建立擴展集時設定。

名稱 類型 Description
communityGalleryImageId

string

指定 VM 部署的社群資源庫映像唯一標識碼。 這可以從社群資源庫映像 GET 呼叫擷取。

exactVersion

string

以十進位數指定,也就是用來建立虛擬機的平臺映像或市集映射版本。 這個只讀欄位與 'version' 不同,只有在 'version' 字段中指定的值為 'latest' 時。

id

string

資源標識碼

offer

string

指定用來建立虛擬機的平臺映像或 Marketplace 映像供應專案。

publisher

string

映像發行者。

sharedGalleryImageId

string

指定 VM 部署的共享資源庫映像唯一識別碼。 這可以從共用資源庫映像 GET 呼叫擷取。

sku

string

映像 SKU。

version

string

指定用來建立虛擬機的平臺映像或 Marketplace 映像版本。 允許的格式為 Major.Minor.Build 或 'latest'。 主要、次要和組建是十進位數。 指定「最新」以使用部署階段可用的最新映像版本。 即使您使用「最新」,即使有新版本可供使用,VM 映像也不會在部署時間之後自動更新。 請勿針對資源庫映射部署使用字段 'version',資源庫映射應該一律使用 'id' 字段進行部署,若要使用資源庫映射的 'latest' 版本,只要設定 '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/gallerys/{galleryName}/images/{imageName}',就不需要輸入版本。

InnerError

內部錯誤詳細數據。

名稱 類型 Description
errordetail

string

內部錯誤訊息或例外狀況傾印。

exceptiontype

string

例外狀況型別。

InstanceViewStatus

實例檢視狀態。

名稱 類型 Description
code

string

狀態碼。

displayStatus

string

狀態的簡短可當地語系化標籤。

level

StatusLevelTypes

層級程序代碼。

message

string

詳細的狀態消息,包括警示和錯誤訊息。

time

string

狀態的時間。

IPVersion

從 Api-Version 2019-07-01 開始提供,它代表特定 ipconfiguration 是 IPv4 或 IPv6。 預設值會採用為 IPv4。 可能的值為:'IPv4' 和 'IPv6'。

名稱 類型 Description
IPv4

string

IPv6

string

KeyVaultSecretReference

描述 金鑰保存庫 秘密的參考

名稱 類型 Description
secretUrl

string

參考 金鑰保存庫 秘密的 URL。

sourceVault

SubResource

包含秘密之 金鑰保存庫的相對 URL。

LinuxConfiguration

指定虛擬機上的Linux作業系統設定。 如需支援的Linux發行版清單,請參閱 Azure-Endorsed 發行版上的Linux

名稱 類型 Description
disablePasswordAuthentication

boolean

指定是否應該停用密碼驗證。

enableVMAgentPlatformUpdates

boolean

指出是否已針對Linux虛擬機啟用VMAgent Platform 匯報。 預設值為 False。

patchSettings

LinuxPatchSettings

[預覽功能]指定與Linux上的VM客體修補相關的設定。

provisionVMAgent

boolean

指出是否應該在虛擬機器上佈建虛擬機器代理程式。 當要求本文中未指定這個屬性時,預設行為是將它設定為 true。 這可確保 VM 代理程式已安裝在 VM 上,以便稍後將擴充功能新增至 VM。

ssh

SshConfiguration

指定 Linux OS 的 SSH 金鑰組態。

LinuxPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補程序評估。 屬性 provisionVMAgent 必須為 true。

名稱 類型 Description
AutomaticByPlatform

string

ImageDefault

string

LinuxPatchSettings

指定與Linux上的VM客體修補相關的設定。

名稱 類型 Description
assessmentMode

LinuxPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補評估。 屬性 provisionVMAgent 必須是 true。

automaticByPlatformSettings

LinuxVMGuestPatchAutomaticByPlatformSettings

在 Linux 上的 VM 客體修補中指定 Patch 模式 AutomaticByPlatform 的其他設定。

patchMode

LinuxVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與具有 OrchestrationMode 的虛擬機擴展集相關聯的虛擬機作為彈性。

可能的值包括:

ImageDefault - 會使用虛擬機的默認修補組態。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 屬性 provisionVMAgent 必須為 true

LinuxVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

名稱 類型 Description
Always

string

IfRequired

string

Never

string

Unknown

string

LinuxVMGuestPatchAutomaticByPlatformSettings

指定在Linux修補程式設定中選取修補程式模式 AutomaticByPlatform 時要套用的其他設定。

名稱 類型 Description
bypassPlatformSafetyChecksOnUserSchedule

boolean

可讓客戶排程修補,而不需意外升級

rebootSetting

LinuxVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

LinuxVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與具有 OrchestrationMode 的虛擬機擴展集相關聯的虛擬機作為彈性。

可能的值包括:

ImageDefault - 會使用虛擬機的默認修補組態。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 屬性 provisionVMAgent 必須為 true

名稱 類型 Description
AutomaticByPlatform

string

ImageDefault

string

Mode

指定如果啟用此功能,ProxyAgent 將會在 上執行的模式。 ProxyAgent 會開始稽核或監視,但不會對稽核模式中的主機端點要求強制執行訪問控制,而在 [強制執行] 模式中,則會強制執行訪問控制。 默認值為 [強制] 模式。

名稱 類型 Description
Audit

string

Enforce

string

NetworkApiVersion

會指定在具有協調流程模式 「彈性」的虛擬機擴展集網路介面設定中建立網路資源時所使用的 Microsoft.Network API 版本

名稱 類型 Description
2020-11-01

string

NetworkInterfaceAuxiliaryMode

指定是否為網路介面資源啟用輔助模式。

名稱 類型 Description
AcceleratedConnections

string

Floating

string

None

string

NetworkInterfaceAuxiliarySku

指定是否為網路介面資源啟用輔助 SKU。

名稱 類型 Description
A1

string

A2

string

A4

string

A8

string

None

string

OperatingSystemTypes

此屬性可讓您指定從使用者映像或特製化 VHD 建立 VM 時,磁碟包含的 OS 類型。 可能的值為: Windows、Linux。

名稱 類型 Description
Linux

string

Windows

string

OrchestrationMode

指定虛擬機擴展集的協調流程模式。

名稱 類型 Description
Flexible

string

Uniform

string

OSImageNotificationProfile

名稱 類型 Description
enable

boolean

指定是否啟用或停用OS映像排程事件。

notBeforeTimeout

string

虛擬機重新映像或其操作系統升級的時間長度,在事件自動核准之前,必須先核准 OS 映射排程事件, (逾時) 。 設定是以 ISO 8601 格式指定,而且此值必須是 15 分鐘, (PT15M)

PassNames

傳遞名稱。 目前唯一允許的值是 OobeSystem。

名稱 類型 Description
OobeSystem

string

PatchSettings

指定與 Windows 上的 VM 客體修補相關的設定。

名稱 類型 Description
assessmentMode

WindowsPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補程序評估。 屬性 provisionVMAgent 必須為 true。

automaticByPlatformSettings

WindowsVMGuestPatchAutomaticByPlatformSettings

指定 Windows 上 VM 客體修補中之修補程式模式 AutomaticByPlatform 的其他設定。

enableHotpatching

boolean

可讓客戶修補其 Azure VM,而不需要重新啟動。 針對 enableHotpatching,'provisionVMAgent' 必須設定為 true,且 'patchMode' 必須設定為 'AutomaticByPlatform'。

patchMode

WindowsVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與具有 OrchestrationMode 的虛擬機擴展集相關聯的虛擬機作為彈性。

可能的值包括:

手動 - 您可以控制將修補程式應用程式套用至虛擬機。 您可以在 VM 內手動套用修補程式來執行此動作。 在此模式中,會停用自動更新;屬性 WindowsConfiguration.enableAutomaticUpdates 必須為 false

AutomaticByOS - 作業系統會自動更新虛擬機。 屬性 WindowsConfiguration.enableAutomaticUpdates 必須為 true。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 provisionVMAgent 和 WindowsConfiguration.enableAutomaticUpdates 屬性必須為 true

Plan

指定用來建立虛擬機之 Marketplace 映像的相關信息。 此元素僅用於市集映像。 您必須先啟用映像以供程序設計使用,才能從 API 使用市集映射。 在 Azure 入口網站 中,尋找您想要使用的市集映射,然後按兩下 [以程序設計方式部署] [開始使用] -> 。 輸入任何必要資訊,然後按兩下 [ 儲存]。

名稱 類型 Description
name

string

方案標識碼。

product

string

指定市集中映像的產品。 這與 imageReference 元素下的 Offer 值相同。

promotionCode

string

促銷碼。

publisher

string

發行者標識碼。

PriorityMixPolicy

指定擴展集中具有彈性協調流程模式之 Spot 和一般優先順序 VM 的目標分割。 有了這個屬性,客戶就可以指定建立為 VMSS flex 實例的一般優先順序 VM 基底數目,並在達到此基底目標之後,在現成和一般優先順序 VM 之間分割。

名稱 類型 Description
baseRegularPriorityCount

integer

在相應放大時,將會在此擴展集中建立的一般優先順序 VM 基底數目。

regularPriorityPercentageAboveBase

integer

達到基底一般優先順序計數之後的 VM 實例百分比,預期會使用一般優先順序。

ProtocolTypes

指定 WinRM 接聽程式的通訊協定。 可能的值為: HTTP、https。

名稱 類型 Description
Http

string

Https

string

ProxyAgentSettings

指定建立虛擬機時的 ProxyAgent 設定。 API 版本下限:2024-03-01。

名稱 類型 Description
enabled

boolean

指定是否應在虛擬機或虛擬機擴展集上啟用 ProxyAgent 功能。

keyIncarnationId

integer

增加此屬性的值可讓使用者重設用來保護客體與主機之間通道的密鑰。

mode

Mode

指定啟用此功能時,ProxyAgent 將會在 上執行的模式。 ProxyAgent 會開始稽核或監視,但不會在稽核模式中對主機端點的要求強制執行訪問控制,而在 [強制執行] 模式中,則會強制執行訪問控制。 默認值為 [強制模式]。

PublicIPAddressSku

描述公用IP Sku。 它只能以 OrchestrationMode 設定為彈性。

名稱 類型 Description
name

PublicIPAddressSkuName

指定公用IP SKU 名稱

tier

PublicIPAddressSkuTier

指定公用IP SKU層

PublicIPAddressSkuName

指定公用IP SKU 名稱

名稱 類型 Description
Basic

string

Standard

string

PublicIPAddressSkuTier

指定公用IP SKU層

名稱 類型 Description
Global

string

Regional

string

RepairAction

修復動作的類型 (取代、重新啟動、重新映像) ,用於修復擴展集中狀況不良的虛擬機。 預設值為 replace。

名稱 類型 Description
Reimage

string

Replace

string

Restart

string

ResiliencyPolicy

描述復原原則 - resiliencVMCreationPolicy 和/或 resiliencVMDeletionPolicy。

名稱 類型 Description
resilientVMCreationPolicy

ResilientVMCreationPolicy

執行復原 VM 建立時所使用的組態參數。

resilientVMDeletionPolicy

ResilientVMDeletionPolicy

執行復原 VM 刪除時所使用的組態參數。

ResilientVMCreationPolicy

執行復原 VM 建立時所使用的組態參數。

名稱 類型 Description
enabled

boolean

指定是否應在虛擬機擴展集上啟用復原性 VM 建立。 預設值為 false。

ResilientVMDeletionPolicy

執行復原 VM 刪除時所使用的組態參數。

名稱 類型 Description
enabled

boolean

指定是否應在虛擬機擴展集上啟用復原性 VM 刪除。 預設值為 false。

ResourceIdentityType

用於虛擬機擴展集的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 會從虛擬機擴展集移除任何身分識別。

名稱 類型 Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

RollingUpgradePolicy

執行滾動升級時所使用的組態參數。

名稱 類型 Description
enableCrossZoneUpgrade

boolean

允許 VMSS 在建構升級批次時忽略 AZ 界限。 將 Update 網域和 maxBatchInstancePercent 納入考慮,以判斷批次大小。

maxBatchInstancePercent

integer

一個批次中滾動升級同時升級的虛擬機實例總數百分比上限。 由於這是最大,先前或未來批次中狀況不良的實例可能會導致批次中的實例百分比降低,以確保更高的可靠性。 此參數的預設值為 20%。

maxSurge

boolean

建立新的虛擬機以升級擴展集,而不是更新現有的虛擬機。 建立每個批次的新虛擬機之後,將會刪除現有的虛擬機。

maxUnhealthyInstancePercent

integer

擴展集中可同時狀況不良之虛擬機實例總數的百分比上限,可能是因為升級而發生,或是在輪流升級中止之前,在虛擬機健康情況檢查處於狀況不良狀態時找到。 啟動任何批次之前,將會先檢查此條件約束。 此參數的預設值為 20%。

maxUnhealthyUpgradedInstancePercent

integer

可發現處於狀況不良狀態的升級虛擬機實例百分比上限。 升級每個批次之後,就會進行這項檢查。 如果超過此百分比,滾動更新就會中止。 此參數的預設值為 20%。

pauseTimeBetweenBatches

string

完成一個批次中所有虛擬機的更新和啟動下一個批次之間的等候時間。 時間持續時間應以 ISO 8601 格式指定。 默認值為 0 秒, (PT0S) 。

prioritizeUnhealthyInstances

boolean

在任何狀況良好的實例之前,升級擴展集中的所有狀況不良實例。

rollbackFailedInstancesOnPolicyBreach

boolean

如果違反滾動升級原則,復原失敗實例至先前的模型。

ScaleInPolicy

描述虛擬機擴展集的相應縮小原則。

名稱 類型 Description
forceDeletion

boolean

此屬性可讓您指定在預覽版中調整虛擬機擴展集時,是否必須強制刪除移除的虛擬機。 (Preview 中的功能)

rules

VirtualMachineScaleSetScaleInRules[]

調整虛擬機擴展集時所要遵循的規則。

可能的值包括:

預設 當虛擬機擴展集相應縮小時,如果擴展集是區域性擴展集,則擴展集會先跨區域平衡。 然後,它會盡可能跨容錯網域進行平衡。 在每個容錯網域內,選擇移除的虛擬機將是未受到相應縮小保護的最新虛擬機。

OldestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最舊虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最舊虛擬機來移除。

NewestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最新虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最新虛擬機來移除。

ScheduledEventsAdditionalPublishingTargets

名稱 類型 Description
eventGridAndResourceGraph

EventGridAndResourceGraph

建立 eventGridAndResourceGraph Scheduled Event 設定時所使用的組態參數。

ScheduledEventsPolicy

指定重新部署、重新啟動和 ScheduledEventsAdditionalPublishingTargets Scheduled Event 相關組態。

名稱 類型 Description
scheduledEventsAdditionalPublishingTargets

ScheduledEventsAdditionalPublishingTargets

發佈 scheduledEventsAdditionalPublishingTargets 時所使用的組態參數。

userInitiatedReboot

UserInitiatedReboot

建立 userInitiatedReboot 排程事件設定建立時所使用的組態參數。

userInitiatedRedeploy

UserInitiatedRedeploy

建立 userInitiatedRedeploy 排程事件設定建立時所使用的組態參數。

ScheduledEventsProfile

名稱 類型 Description
osImageNotificationProfile

OSImageNotificationProfile

指定OS映像排程事件相關組態。

terminateNotificationProfile

TerminateNotificationProfile

指定終止排程事件相關組態。

securityEncryptionTypes

指定受控磁碟的 EncryptionType。 它設定為 DiskWithVMGuestState 以加密受控磁碟以及 VMGuestState Blob、VMGuestStateOnly 只加密 VMGuestState Blob,以及 NonPersistedTPM 表示未在 VMGuestState Blob 中保存韌體狀態。 注意: 它只能設定為機密 VM。

名稱 類型 Description
DiskWithVMGuestState

string

NonPersistedTPM

string

VMGuestStateOnly

string

SecurityPostureReference

指定要用於擴展集中所有虛擬機的安全性狀態。 最低 API 版本:2023-03-01

名稱 類型 Description
excludeExtensions

VirtualMachineExtension[]

套用安全性狀態時要排除的虛擬機擴充功能清單。

id

string

安全性狀態參考標識符的格式為 /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest

SecurityProfile

指定虛擬機或虛擬機擴展集的安全性配置檔設定。

名稱 類型 Description
encryptionAtHost

boolean

這個屬性可由要求中的使用者用來啟用或停用虛擬機或虛擬機擴展集的主機加密。 這會啟用所有磁碟的加密,包括主機本身的資源/暫存磁碟。 默認行為為:除非資源的此屬性設定為 true,否則將會停用主機的加密。

encryptionIdentity

EncryptionIdentity

指定 ADE 用來取得 Keyvault 作業存取令牌的受控識別。

proxyAgentSettings

ProxyAgentSettings

指定建立虛擬機時的 ProxyAgent 設定。 API 版本下限:2024-03-01。

securityType

SecurityTypes

指定虛擬機的 SecurityType。 它必須設定為任何指定的值,才能啟用 UefiSettings。 默認行為為:除非設定此屬性,否則不會啟用 UefiSettings。

uefiSettings

UefiSettings

指定建立虛擬機時所使用的安全開機和 vTPM 等安全性設定。 API 版本下限:2020-12-01。

SecurityTypes

指定虛擬機的 SecurityType。 它必須設定為任何指定的值,才能啟用 UefiSettings。 默認行為為:除非設定此屬性,否則不會啟用 UefiSettings。

名稱 類型 Description
ConfidentialVM

string

TrustedLaunch

string

ServiceArtifactReference

指定使用 'latest' 映射版本時,用來為擴展集中的所有虛擬機設定相同映像版本的服務成品參考標識符。 API 版本下限:2022-11-01

名稱 類型 Description
id

string

服務成品參考標識符的格式為 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/gallerys/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}

SettingNames

指定要套用內容之設定的名稱。 可能的值為:FirstLogonCommands 和 AutoLogon。

名稱 類型 Description
AutoLogon

string

FirstLogonCommands

string

Sku

描述虛擬機擴展集 SKU。 注意:如果擴展集目前所在的硬體上不支援新的 VM SKU,您必須先解除分配擴展集中的 VM,才能修改 SKU 名稱。

名稱 類型 Description
capacity

integer

指定擴展集中的虛擬機數目。

name

string

SKU 名稱。

tier

string

指定擴展集中的虛擬機層。

可能的值如下:

標準

基本

SpotRestorePolicy

指定虛擬機擴展集的 Spot-Try-Restore 屬性。 透過此屬性,客戶可以根據容量可用性和定價條件約束,啟用或停用收回的現成 VMSS VM 實例自動還原。

名稱 類型 Description
enabled

boolean

啟用 Spot-Try-Restore 功能,其中收回的 VMSS SPOT 實例會嘗試根據容量可用性和定價條件約束,以機率方式還原

restoreTimeout

string

以 ISO 8601 時間持續時間表示的逾時值,之後平臺將不會嘗試還原 VMSS SPOT 實例

SshConfiguration

在 Azure 上執行的 Linux 型 VM SSH 組態

名稱 類型 Description
publicKeys

SshPublicKey[]

用來向Linux型VM進行驗證的SSH公鑰清單。

SshPublicKey

包含 SSH 憑證公鑰的相關信息,以及放置公鑰之 Linux VM 上的路徑。

名稱 類型 Description
keyData

string

用來透過 ssh 向 VM 進行驗證的 SSH 公鑰憑證。 密鑰至少必須是 2048 位,且格式為 ssh-rsa。 如需建立 SSH 金鑰,請參閱 [在 Linux 和 Mac 上為 Azure 中的 Linux VM 建立 SSH 金鑰]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).

path

string

指定儲存 ssh 公鑰的已建立 VM 上的完整路徑。 如果檔案已經存在,指定的金鑰就會附加至該檔案。 範例:/home/user/.ssh/authorized_keys

StatusLevelTypes

層級程序代碼。

名稱 類型 Description
Error

string

Info

string

Warning

string

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,因此無法與OS磁碟搭配使用。

名稱 類型 Description
PremiumV2_LRS

string

Premium_LRS

string

Premium_ZRS

string

StandardSSD_LRS

string

StandardSSD_ZRS

string

Standard_LRS

string

UltraSSD_LRS

string

SubResource

名稱 類型 Description
id

string

資源標識碼

TerminateNotificationProfile

名稱 類型 Description
enable

boolean

指定是否啟用或停用 Terminate Scheduled 事件。

notBeforeTimeout

string

刪除虛擬機的可設定時間長度,在自動核准事件之前,虛擬機必須核准終止排程事件, (逾時) 。 設定必須以 ISO 8601 格式指定,預設值為 5 分鐘, (PT5M)

UefiSettings

指定安全性設定,例如建立虛擬機時所使用的安全開機和 vTPM。 API 版本下限:2020-12-01。

名稱 類型 Description
secureBootEnabled

boolean

指定是否應在虛擬機上啟用安全開機。 API 版本下限:2020-12-01。

vTpmEnabled

boolean

指定是否應在虛擬機上啟用 vTPM。 API 版本下限:2020-12-01。

UpgradeMode

指定升級至擴展集中虛擬機的模式。

可能的值包括:

手動 - 您可以控制擴充集中虛擬機更新的應用程式。 您可以使用 manualUpgrade 動作來執行此動作。

自動 -擴展集中的所有虛擬機都會同時自動更新。

名稱 類型 Description
Automatic

string

Manual

string

Rolling

string

UpgradePolicy

描述升級原則 - 自動、手動或滾動。

名稱 類型 Description
automaticOSUpgradePolicy

AutomaticOSUpgradePolicy

用於執行自動作業系統升級的組態參數。

mode

UpgradeMode

指定升級至擴展集中虛擬機的模式。

可能的值包括:

手動 - 您可以控制擴充集中虛擬機更新的應用程式。 您可以使用 manualUpgrade 宏指令來執行此動作。

自動 -擴展集中的所有虛擬機都會同時自動更新。

rollingUpgradePolicy

RollingUpgradePolicy

執行滾動升級時所使用的組態參數。

UserAssignedIdentities

與虛擬機相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。

名稱 類型 Description

UserInitiatedReboot

指定重新啟動相關的排程事件相關設定。

名稱 類型 Description
automaticallyApprove

boolean

指定重新啟動排程事件相關設定。

UserInitiatedRedeploy

指定重新部署相關的排程事件相關組態。

名稱 類型 Description
automaticallyApprove

boolean

指定重新部署排程事件相關組態。

VaultCertificate

描述 金鑰保存庫 中的單一憑證參考,以及憑證應該位於 VM 上的位置。

名稱 類型 Description
certificateStore

string

針對 Windows VM,指定應該新增憑證之虛擬機上的證書存儲。 指定的證書存儲隱含地位於LocalMachine帳戶中。 針對Linux VM,憑證檔案會放在 /var/lib/waagent 目錄底下,而 X509 憑證檔案的檔名<為 UppercaseThumbprint.crt,而<私鑰則為 UppercaseThumbprint.prv>>。 這兩個檔案都是 .pem 格式。

certificateUrl

string

這是已上傳至 金鑰保存庫 作為秘密之憑證的 URL。 如需將秘密新增至 金鑰保存庫,請參閱將密鑰或秘密新增至密鑰保存庫。 在此情況下,您的憑證必須是下列 JSON 物件的 Base64 編碼,其編碼方式為 UTF-8:

{
“data”:“”,
“dataType”:“pfx”,
“password”:“”
}
若要在虛擬機上安裝憑證,建議您使用適用於Linux的 Azure 金鑰保存庫 虛擬機擴充功能適用於 Windows 的 Azure 金鑰保存庫 虛擬機擴充功能

VaultSecretGroup

描述一組相同 金鑰保存庫 的憑證。

名稱 類型 Description
sourceVault

SubResource

包含 VaultCertificates 中所有憑證之 金鑰保存庫 的相對 URL。

vaultCertificates

VaultCertificate[]

SourceVault 中包含憑證的金鑰保存庫參考清單。

VirtualHardDisk

描述磁碟的 URI。

名稱 類型 Description
uri

string

指定虛擬硬碟的 URI。

VirtualMachineEvictionPolicyTypes

指定 Azure Spot 虛擬機和 Azure Spot 擴展集的收回原則。 針對 Azure Spot 虛擬機,同時支援「解除分配」和「刪除」,且最低 API 版本為 2019-03-01。 針對 Azure Spot 擴展集,同時支援 'Deallocate' 和 'Delete',且最低 api 版本為 2017-10-30-preview。

名稱 類型 Description
Deallocate

string

Delete

string

VirtualMachineExtension

描述虛擬機擴充功能。

名稱 類型 Description
id

string

資源標識碼

location

string

資源位置

name

string

資源名稱

properties.autoUpgradeMinorVersion

boolean

指出擴充功能是否應該在部署期間使用較新的次要版本。 不過,部署之後,除非重新部署延伸模組,否則延伸模組將不會升級次要版本,即使此屬性設定為 true 亦然。

properties.enableAutomaticUpgrade

boolean

指出如果有較新版本的擴充功能可用,平臺是否應該自動升級延伸模組。

properties.forceUpdateTag

string

延伸模組處理程式應該如何強制更新,即使延伸模組組態尚未變更也一樣。

properties.instanceView

VirtualMachineExtensionInstanceView

虛擬機擴充實例檢視。

properties.protectedSettings

object

延伸模組可以包含 protectedSettings 或 protectedSettingsFromKeyVault,或完全不包含受保護的設定。

properties.protectedSettingsFromKeyVault

KeyVaultSecretReference

以傳址方式傳遞並從金鑰保存庫取用的延伸模組受保護設定

properties.provisionAfterExtensions

string[]

延伸模組名稱的集合,之後必須布建此延伸模組。

properties.provisioningState

string

布建狀態,只會出現在回應中。

properties.publisher

string

擴充處理程序發行者的名稱。

properties.settings

object

延伸模組的 Json 格式化公用設定。

properties.suppressFailures

boolean

指出從擴充功能產生的失敗是否會隱藏 (作業失敗,例如不會連線到 VM,而不論此值為何) 。 預設值為 false。

properties.type

string

指定延伸模組的類型;例如“CustomScriptExtension”。

properties.typeHandlerVersion

string

指定文稿處理程式的版本。

tags

object

資源標籤

type

string

資源類型

VirtualMachineExtensionInstanceView

虛擬機擴充功能的實例檢視。

名稱 類型 Description
name

string

虛擬機擴充功能名稱。

statuses

InstanceViewStatus[]

資源狀態資訊。

substatuses

InstanceViewStatus[]

資源狀態資訊。

type

string

指定延伸模組的類型;範例為 「CustomScriptExtension」。。

typeHandlerVersion

string

指定文稿處理程式的版本。

VirtualMachinePriorityTypes

指定擴展集中虛擬機的優先順序。 API 版本下限:2017-10-30-preview。

名稱 類型 Description
Low

string

Regular

string

Spot

string

VirtualMachineScaleSet

描述虛擬機擴展集。

名稱 類型 Description
etag

string

Etag 是在 VMSS 的 Create/Update/Get 回應中傳回的屬性,讓客戶可以在標頭中提供它,以確保開放式更新

extendedLocation

ExtendedLocation

虛擬機擴展集的擴充位置。

id

string

資源標識碼

identity

VirtualMachineScaleSetIdentity

如果已設定,則為虛擬機擴展集的身分識別。

location

string

資源位置

name

string

資源名稱

plan

Plan

指定用來建立虛擬機之 Marketplace 映像的相關信息。 此元素僅用於市集映像。 您必須先啟用映像以程序設計方式使用,才能從 API 使用市集映射。 在 Azure 入口網站 中,尋找您想要使用的 Marketplace 映射,然後按兩下 [想要以程式設計方式部署],[開始使用] -> 。 輸入任何必要資訊,然後按兩下 [ 儲存]。

properties.additionalCapabilities

AdditionalCapabilities

指定虛擬機擴展集中 虛擬機器 上啟用或停用的其他功能。 例如:虛擬機器 是否能夠支援使用UltraSSD_LRS記憶體帳戶類型鏈接受控數據磁碟。

properties.automaticRepairsPolicy

AutomaticRepairsPolicy

自動修復的原則。

properties.constrainedMaximumCapacity

boolean

必須設定為 True 或省略的選擇性屬性。

properties.doNotRunExtensionsOnOverprovisionedVMs

boolean

啟用 Overprovision 時,擴充功能只會在最後保留的要求 VM 數目上啟動。 因此,此屬性可確保擴充功能不會在額外的過度布建 VM 上執行。

properties.hostGroup

SubResource

指定虛擬機擴展集所在專用主機群組的相關信息。 API 版本下限:2020-06-01。

properties.orchestrationMode

OrchestrationMode

指定虛擬機擴展集的協調流程模式。

properties.overprovision

boolean

指定是否應該過度布建虛擬機擴展集。

properties.platformFaultDomainCount

integer

每個放置群組的容錯網域計數。

properties.priorityMixPolicy

PriorityMixPolicy

指定在相同 VMSS Flex 實例內混合 Spot 和一般優先順序 VM 所需的目標。

properties.provisioningState

string

布建狀態,只會出現在回應中。

properties.proximityPlacementGroup

SubResource

指定虛擬機擴展集應指派的鄰近放置群組相關信息。 API 版本下限:2018-04-01。

properties.resiliencyPolicy

ResiliencyPolicy

復原原則

properties.scaleInPolicy

ScaleInPolicy

指定在虛擬機擴展集中調整 虛擬機器 時所套用的原則。

properties.scheduledEventsPolicy

ScheduledEventsPolicy

ScheduledEventsPolicy。

properties.singlePlacementGroup

boolean

若為 true,則會將擴展集限制為單一放置群組,大小上限為 100 部虛擬機。 注意:如果 singlePlacementGroup 為 true,它可能會修改為 false。 不過,如果 singlePlacementGroup 為 false,則無法修改成 true。

properties.spotRestorePolicy

SpotRestorePolicy

指定虛擬機擴展集的Spot Restore 屬性。

properties.timeCreated

string

指定虛擬機擴展集資源建立的時間。 API 版本下限:2021-11-01。

properties.uniqueId

string

指定可唯一識別虛擬機擴展集的標識碼。

properties.upgradePolicy

UpgradePolicy

升級原則。

properties.virtualMachineProfile

VirtualMachineScaleSetVMProfile

虛擬機器配置檔。

properties.zoneBalance

boolean

如果發生區域中斷,是否要強制甚至跨 x 區域的虛擬機散發。 只有在擴展集的區域屬性包含多個區域時,才能設定 zoneBalance 屬性。 如果沒有指定區域或只指定一個區域,不應設定 zoneBalance 屬性。

sku

Sku

虛擬機擴展集 SKU。

tags

object

資源標籤

type

string

資源類型

zones

string[]

虛擬機擴展集區域。 注意:只有在建立擴展集時,才能設定可用性區域

VirtualMachineScaleSetDataDisk

描述虛擬機擴展集數據磁碟。

名稱 類型 Description
caching

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體的 None。進階記憶體的 ReadOnly。

createOption

DiskCreateOptionTypes

create 選項。

deleteOption

DiskDeleteOptionTypes

指定在 VMSS Flex 刪除時應該刪除或中斷連結數據磁碟 (此功能僅適用於具有彈性協調流程模式的 VMSS) 。

可能的值:

刪除 如果使用此值,則會在刪除 VMSS Flex VM 時刪除資料磁碟。

分離 如果使用此值,則會在刪除 VMSS Flex VM 之後保留數據磁碟。

預設值設定為 Delete

diskIOPSReadWrite

integer

指定受控磁碟的 Read-Write IOPS。 只有當 StorageAccountType 是UltraSSD_LRS時,才應該使用。 如果未指定,則會根據diskSizeGB指派預設值。

diskMBpsReadWrite

integer

指定受控磁碟的每秒 MB 頻寬。 只有當 StorageAccountType 是UltraSSD_LRS時,才應該使用。 如果未指定,則會根據diskSizeGB指派預設值。

diskSizeGB

integer

指定以 GB 為單位的空白資料磁碟大小。 此元素可用來覆寫虛擬機映像中的磁碟大小。 diskSizeGB 屬性是磁碟的位元組 x 1024^3 數目,且值不能大於 1023。

lun

integer

指定數據磁碟的邏輯單元編號。 這個值是用來識別 VM 內的數據磁碟,因此對於連結至 VM 的每個數據磁碟都必須是唯一的。

managedDisk

VirtualMachineScaleSetManagedDiskParameters

受控磁碟參數。

name

string

磁碟名稱。

writeAcceleratorEnabled

boolean

指定是否應該在磁碟上啟用或停用 writeAccelerator。

VirtualMachineScaleSetExtension

描述虛擬機擴展集擴充功能。

名稱 類型 Description
id

string

資源標識碼

name

string

延伸模組的名稱。

properties.autoUpgradeMinorVersion

boolean

指出擴充功能是否應該在部署期間使用較新的次要版本。 不過,部署之後,除非重新部署延伸模組,否則延伸模組將不會升級次要版本,即使此屬性設定為 true 亦然。

properties.enableAutomaticUpgrade

boolean

指出如果有較新版本的擴充功能可用,平臺是否應該自動升級延伸模組。

properties.forceUpdateTag

string

如果提供值且與先前的值不同,即使延伸模組組態尚未變更,擴充處理程式仍會強制更新。

properties.protectedSettings

object

延伸模組可以包含 protectedSettings 或 protectedSettingsFromKeyVault,或完全不包含受保護的設定。

properties.protectedSettingsFromKeyVault

KeyVaultSecretReference

以傳址方式傳遞並從金鑰保存庫取用的延伸模組受保護設定

properties.provisionAfterExtensions

string[]

延伸模組名稱的集合,之後必須布建此延伸模組。

properties.provisioningState

string

布建狀態,只會出現在回應中。

properties.publisher

string

擴充處理程序發行者的名稱。

properties.settings

object

延伸模組的 Json 格式化公用設定。

properties.suppressFailures

boolean

指出從擴充功能產生的失敗是否會隱藏 (作業失敗,例如不會連線到 VM,而不論此值為何) 。 預設值為 false。

properties.type

string

指定延伸模組的類型;例如“CustomScriptExtension”。

properties.typeHandlerVersion

string

指定文稿處理程式的版本。

type

string

資源類型

VirtualMachineScaleSetExtensionProfile

描述虛擬機擴展集擴充功能配置檔。

名稱 類型 Description
extensions

VirtualMachineScaleSetExtension[]

虛擬機擴展集子擴充功能資源。

extensionsTimeBudget

string

指定要啟動之所有延伸模組的加註時間。 持續時間應介於 15 分鐘到 120 分鐘之間, (內含) ,且應以 ISO 8601 格式指定。 預設值為90分鐘 (PT1H30M) 。 API 版本下限:2020-06-01。

VirtualMachineScaleSetHardwareProfile

指定虛擬機擴展集的硬體設定。

名稱 類型 Description
vmSizeProperties

VMSizeProperties

指定自定義虛擬機大小的屬性。 API 版本下限:2021-11-01。 如需詳細資訊,請遵循 VM 自定義 中的指示。

VirtualMachineScaleSetIdentity

虛擬機擴展集的身分識別。

名稱 類型 Description
principalId

string

虛擬機擴展集身分識別的主體標識碼。 此屬性只會針對系統指派的身分識別提供。

tenantId

string

與虛擬機擴展集相關聯的租用戶標識碼。 此屬性只會針對系統指派的身分識別提供。

type

ResourceIdentityType

用於虛擬機擴展集的身分識別類型。 「SystemAssigned、UserAssigned」類型同時包含隱含建立的身分識別,和一組使用者指派的身分識別。 類型 『None』 將會從虛擬機擴展集移除任何身分識別。

userAssignedIdentities

UserAssignedIdentities

與虛擬機擴展集相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。

VirtualMachineScaleSetIPConfiguration

描述虛擬機擴展集網路配置檔的IP組態。

名稱 類型 Description
name

string

IP 組態名稱。

properties.applicationGatewayBackendAddressPools

SubResource[]

指定應用程式閘道後端位址池的參考數位。 擴展集可以參考多個應用程式閘道的後端位址池。 多個擴展集無法使用相同的應用程式閘道。

properties.applicationSecurityGroups

SubResource[]

指定應用程式安全組的參考陣列。

properties.loadBalancerBackendAddressPools

SubResource[]

指定負載平衡器後端位址池參考的陣列。 擴展集可以參考一個公用和一個內部負載平衡器的後端位址池。 多個擴展集無法使用相同的基本 SKU 負載平衡器。

properties.loadBalancerInboundNatPools

SubResource[]

指定負載平衡器輸入 Nat 集區的參考陣列。 擴展集可以參考一個公用和一個內部負載平衡器的輸入 nat 集區。 多個擴展集無法使用相同的基本 SKU 負載平衡器。

properties.primary

boolean

指定虛擬機有1個以上的網路介面時的主要網路介面。

properties.privateIPAddressVersion

IPVersion

從 Api-Version 2017-03-30 起提供,它代表特定 ipconfiguration 是 IPv4 或 IPv6。 預設值會視為 IPv4。 可能的值為:'IPv4' 和 'IPv6'。

properties.publicIPAddressConfiguration

VirtualMachineScaleSetPublicIPAddressConfiguration

publicIPAddressConfiguration。

properties.subnet

ApiEntityReference

指定子網的識別碼。

VirtualMachineScaleSetIpTag

包含與公用IP位址相關聯的IP標籤。

名稱 類型 Description
ipTagType

string

IP 標籤類型。 範例:FirstPartyUsage。

tag

string

與公用IP相關聯的IP標籤。 範例:SQL、記憶體等。

VirtualMachineScaleSetManagedDiskParameters

描述 ScaleSet 受控磁碟的參數。

名稱 類型 Description
diskEncryptionSet

DiskEncryptionSetParameters

指定受控磁碟的客戶受控磁碟加密集資源標識符。

securityProfile

VMDiskSecurityProfile

指定受控磁碟的安全性配置檔。

storageAccountType

StorageAccountTypes

指定受控磁碟的記憶體帳戶類型。 注意:UltraSSD_LRS只能與數據磁碟搭配使用,它不能與OS磁碟搭配使用。

VirtualMachineScaleSetNetworkConfiguration

描述虛擬機擴展集網路配置檔的網路組態。

名稱 類型 Description
name

string

網路組態名稱。

properties.auxiliaryMode

NetworkInterfaceAuxiliaryMode

指定是否啟用網路介面資源的輔助模式。

properties.auxiliarySku

NetworkInterfaceAuxiliarySku

指定是否為網路介面資源啟用輔助 SKU。

properties.deleteOption

DeleteOptions

指定刪除 VM 時網路介面會發生什麼情況

properties.disableTcpStateTracking

boolean

指定是否停用網路介面以進行 tcp 狀態追蹤。

properties.dnsSettings

VirtualMachineScaleSetNetworkConfigurationDnsSettings

要套用在網路介面上的 DNS 設定。

properties.enableAcceleratedNetworking

boolean

指定網路介面是否已啟用加速網路。

properties.enableFpga

boolean

指定網路介面是否已啟用 FPGA 網路功能。

properties.enableIPForwarding

boolean

是否在此 NIC 上啟用 IP 轉送。

properties.ipConfigurations

VirtualMachineScaleSetIPConfiguration[]

指定網路介面的IP組態。

properties.networkSecurityGroup

SubResource

網路安全組。

properties.primary

boolean

指定虛擬機有1個以上的網路介面時的主要網路介面。

VirtualMachineScaleSetNetworkConfigurationDnsSettings

描述虛擬機擴展集網路設定的 DNS 設定。

名稱 類型 Description
dnsServers

string[]

DNS 伺服器 IP 位址清單

VirtualMachineScaleSetNetworkProfile

描述虛擬機擴展集網路配置檔。

名稱 類型 Description
healthProbe

ApiEntityReference

負載平衡器探查的參考,用來判斷虛擬機擴展集中實例的健康情況。 參考的格式為:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'。

networkApiVersion

NetworkApiVersion

指定在具有協調流程模式 「彈性」的虛擬機擴展集網路介面設定中建立網路資源時所使用的 Microsoft.Network API 版本

networkInterfaceConfigurations

VirtualMachineScaleSetNetworkConfiguration[]

網路組態的清單。

VirtualMachineScaleSetOSDisk

描述虛擬機擴展集作業系統磁碟。

名稱 類型 Description
caching

CachingTypes

指定快取需求。 可能的值為: None、ReadOnly、ReadWrite。 預設值為: 標準記憶體的 None。進階記憶體的 ReadOnly。

createOption

DiskCreateOptionTypes

指定應如何建立擴展集中的虛擬機。 唯一允許的值為: FromImage。 當您使用映像來建立虛擬機時,會使用此值。 如果您使用平臺映像,則也會使用上述的 imageReference 元素。 如果您使用 Marketplace 映射,則也會使用先前所述的 plan 元素。

deleteOption

DiskDeleteOptionTypes

指定在 VMSS Flex 刪除時應該刪除或中斷連結 OS 磁碟 (此功能僅適用於具有彈性 OrchestrationMode 的 VMSS) 。

可能的值:

刪除 如果使用此值,則會在刪除 VMSS Flex VM 時刪除 OS 磁碟。

分離 如果使用此值,則會在刪除 VMSS Flex VM 之後保留 OS 磁碟。

預設值設定為 Delete。 若為暫時OS磁碟,預設值會設定為 Delete。 使用者無法變更暫時 OS 磁碟的刪除選項。

diffDiskSettings

DiffDiskSettings

指定虛擬機擴展集所使用作業系統磁碟的暫時磁碟設定。

diskSizeGB

integer

指定以 GB 為單位的空白資料磁碟大小。 此元素可用來覆寫虛擬機映像中的磁碟大小。 屬性 'diskSizeGB' 是磁碟的位元組 x 1024^3 數目,且值不能大於 1023。

image

VirtualHardDisk

指定要根據擴展集之非受控使用者映像的資訊。

managedDisk

VirtualMachineScaleSetManagedDiskParameters

受控磁碟參數。

name

string

磁碟名稱。

osType

OperatingSystemTypes

此屬性可讓您指定從使用者映像或特製化 VHD 建立 VM 時,磁碟包含的 OS 類型。 可能的值為: Windows、Linux。

vhdContainers

string[]

指定用來儲存擴展集作業系統磁碟的容器 URL。

writeAcceleratorEnabled

boolean

指定是否應該在磁碟上啟用或停用 writeAccelerator。

VirtualMachineScaleSetOSProfile

描述虛擬機擴展集 OS 配置檔。

名稱 類型 Description
adminPassword

string

指定系統管理員帳戶的密碼。

Windows) 長度下限 (: 8 個字元

Linux) 長度下限 (: 6 個字元

Windows) 長度上限 (: 123 個字元

Linux) 長度上限 (: 72 個字元

複雜度需求: 需要滿足下列 4 個條件中的 3 個
字元較低
具有大字元
具有數位
具有特殊字元 (Regex 比對 [\W_])

不允許的值: “abc@123”、“P@$$w 0rd”、“P@ssw0rd”、“P@ssword123”、“Pa$$word”、“pass@word1”、“Password!”、“Password1”、“Password22”、“iveyou!”

如需重設密碼,請參閱 如何在 Windows VM 中重設遠端桌面服務或其登入密碼

如需重設根密碼,請參閱 使用 VMAccess 擴充功能管理使用者、SSH 及檢查或修復 Azure Linux VM 上的磁碟

adminUsername

string

指定系統管理員帳戶的名稱。

僅限 Windows 的限制: 不能以 “.

不允許的值: “administrator”、“admin”、“user”、“user1”、“test”、“user2”、“test1”、“user3”、“admin1”、“1”、 “123”、“a”、“actuser”、“adm”、“admin2”、“aspnet”、“backup”、“console”、“david”、“guest”、“john”、“owner”、“root”、“server”、“sql”、“support”、“support_388945a0”、“sys”、“test2”、“test3”、“user4”、“user5”。

Linux () 長度下限: 1 個字元

Linux) 長度上限 (: 64 個字元

Windows) 最大長度 (: 20 個字元

allowExtensionOperations

boolean

指定是否應該在虛擬機擴展集上允許擴充功能作業。 只有在虛擬機擴展集上沒有擴充功能時,才能將此設定為 False。

computerNamePrefix

string

指定擴展集中所有虛擬機的計算機名稱前置詞。 計算機名稱前置詞長度必須為1到15個字元。

customData

string

指定自訂資料的 Base-64 編碼字串。 Base-64 編碼字串會解碼成二進位陣列而儲存為虛擬機器上的檔案。 二進位陣列的長度上限是 65535 個位元組。 如需針對 VM 使用 cloud-init,請參閱在建立期間使用 cloud-init 自定義 Linux VM

linuxConfiguration

LinuxConfiguration

指定虛擬機上的Linux作業系統設定。 如需支援的Linux發行版清單,請參閱 Azure-Endorsed 發行版上的Linux

requireGuestProvisionSignal

boolean

必須設定為 True 或省略的選擇性屬性。

secrets

VaultSecretGroup[]

指定應該安裝在擴展集中虛擬機上的憑證集。 若要在虛擬機上安裝憑證,建議您使用適用於Linux的 Azure 金鑰保存庫 虛擬機擴充功能適用於 Windows 的 Azure 金鑰保存庫 虛擬機擴充功能

windowsConfiguration

WindowsConfiguration

指定虛擬機器上的 Windows 作業系統設定。

VirtualMachineScaleSetPublicIPAddressConfiguration

描述虛擬機擴展集IP組態的PublicIPAddress設定

名稱 類型 Description
name

string

publicIP 位址組態名稱。

properties.deleteOption

DeleteOptions

指定刪除 VM 時公用 IP 會發生什麼事

properties.dnsSettings

VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings

要套用在 publicIP 位址 上的 DNS 設定。

properties.idleTimeoutInMinutes

integer

公用IP位址的閒置逾時。

properties.ipTags

VirtualMachineScaleSetIpTag[]

與公用IP位址相關聯的IP標籤清單。

properties.publicIPAddressVersion

IPVersion

從 Api-Version 2019-07-01 開始提供,它代表特定 ipconfiguration 是 IPv4 或 IPv6。 預設值會採用為 IPv4。 可能的值為:'IPv4' 和 'IPv6'。

properties.publicIPPrefix

SubResource

要從中配置 publicIP 位址的 PublicIPPrefix。

sku

PublicIPAddressSku

描述公用IP Sku。 它只能以 OrchestrationMode 設定為彈性。

VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings

描述虛擬機擴展集網路組態的 DNS 設定。

名稱 類型 Description
domainNameLabel

string

功能變數名稱標籤。功能變數名稱標籤和 VM 索引的串連將會是將建立之 PublicIPAddress 資源的功能變數名稱標籤

domainNameLabelScope

DomainNameLabelScopeTypes

功能變數名稱標籤範圍。根據功能變數名稱卷標範圍的原則所產生的哈希功能變數名稱卷標串連,vm 索引將會是將建立之 PublicIPAddress 資源的功能變數名稱卷標

VirtualMachineScaleSetScaleInRules

調整虛擬機擴展集時所要遵循的規則。

可能的值包括:

預設 當虛擬機擴展集相應縮小時,如果擴展集是區域性擴展集,則擴展集會先跨區域平衡。 然後,它會盡可能跨容錯網域進行平衡。 在每個容錯網域內,選擇移除的虛擬機將是未受到相應縮小保護的最新虛擬機。

OldestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最舊虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最舊虛擬機來移除。

NewestVM 當虛擬機擴展集正在相應縮小時,將會選擇未受相應縮小保護的最新虛擬機進行移除。 針對區域性虛擬機擴展集,擴展集會先跨區域進行平衡。 在每個區域中,將會選擇未受保護的最新虛擬機來移除。

名稱 類型 Description
Default

string

NewestVM

string

OldestVM

string

VirtualMachineScaleSetStorageProfile

描述虛擬機擴展集記憶體配置檔。

名稱 類型 Description
dataDisks

VirtualMachineScaleSetDataDisk[]

指定參數,用來將數據磁碟新增至擴展集中的虛擬機。 如需磁碟的詳細資訊,請參閱 關於 Azure 虛擬機的磁碟和 VHD

diskControllerType

DiskControllerTypes[]

指定為擴展集中虛擬機所設定的磁碟控制器類型。 API 版本下限:2022-08-01

imageReference

ImageReference

指定要使用之映像的相關信息。 您可以指定平臺映像、市集映像或虛擬機映像的相關信息。 當您想要使用平臺映像、市集映像或虛擬機映像,但不會用於其他建立作業時,需要此元素。

osDisk

VirtualMachineScaleSetOSDisk

指定擴展集中虛擬機所使用的操作系統磁碟相關信息。 如需磁碟的詳細資訊,請參閱 關於 Azure 虛擬機的磁碟和 VHD

VirtualMachineScaleSetVMProfile

描述虛擬機擴展集虛擬機配置檔。

名稱 類型 Description
applicationProfile

ApplicationProfile

指定應該提供給 VM/VMSS 使用的資源庫應用程式

billingProfile

BillingProfile

指定 Azure Spot VMSS 的計費相關詳細數據。 API 版本下限:2019-03-01。

capacityReservation

CapacityReservationProfile

指定擴展集的容量保留相關詳細數據。 API 版本下限:2021-04-01。

diagnosticsProfile

DiagnosticsProfile

指定開機診斷設定狀態。 API 版本下限:2015-06-15。

evictionPolicy

VirtualMachineEvictionPolicyTypes

指定 Azure Spot 虛擬機和 Azure Spot 擴展集的收回原則。 針對 Azure Spot 虛擬機,支援「解除分配」和「刪除」,而最低 API 版本為 2019-03-01。 針對 Azure Spot 擴展集,同時支援 'Deallocate' 和 'Delete',而最低 API 版本為 2017-10-30-preview。

extensionProfile

VirtualMachineScaleSetExtensionProfile

指定擴展集中虛擬機上安裝之延伸模組的設定集合。

hardwareProfile

VirtualMachineScaleSetHardwareProfile

指定擴展集的硬體配置檔相關詳細數據。 最低 api-version:2021-11-01。

licenseType

string

指定正在使用的映像或磁碟是在內部部署授權。

Windows Server 操作系統的可能值為:

Windows_Client

Windows_Server

Linux Server 操作系統的可能值為:

RHEL) 的RHEL_BYOS (

SUSE) 的SLES_BYOS (

如需詳細資訊,請參閱 適用於 Windows Server 的 Azure Hybrid Use Benefit

適用於Linux伺服器的 Azure Hybrid Use Benefit

最低 api-version:2015-06-15

networkProfile

VirtualMachineScaleSetNetworkProfile

指定擴展集中虛擬機網路介面的屬性。

osProfile

VirtualMachineScaleSetOSProfile

指定擴展集中虛擬機的作業系統設定。

priority

VirtualMachinePriorityTypes

指定擴展集中虛擬機的優先順序。 最低 api-version:2017-10-30-preview。

scheduledEventsProfile

ScheduledEventsProfile

指定排程的事件相關組態。

securityPostureReference

SecurityPostureReference

指定要用於擴展集中所有虛擬機的安全性狀態。 最低 api-version:2023-03-01

securityProfile

SecurityProfile

指定擴展集中虛擬機的安全性相關配置檔設定。

serviceArtifactReference

ServiceArtifactReference

指定使用「最新」映像版本時,用來為擴展集中的所有虛擬機設定相同映射版本的服務成品參考標識符。 最低 API 版本:2022-11-01

storageProfile

VirtualMachineScaleSetStorageProfile

指定虛擬機器磁碟的儲存體設定。

timeCreated

string

指定建立虛擬機擴展集之此 VM 設定文件的時間。 此屬性的最低 API 版本為 2024-03-01。 建立/更新至少 api-version 2024-03-01 的 VMSS VM 配置檔時,此值將會新增至 VMSS Flex VM 卷標。

userData

string

擴展集中虛擬機的 UserData,必須以 base-64 編碼。 客戶不應在此傳遞任何秘密。 最低 api-version:2021-03-01。

VMDiskSecurityProfile

指定受控磁碟的安全性配置檔設定。 注意: 它只能設定為機密 VM。

名稱 類型 Description
diskEncryptionSet

DiskEncryptionSetParameters

針對客戶受控密鑰加密的機密VM OS 磁碟和 VMGuest Blob 所使用的受控磁碟,指定客戶受控磁碟加密集資源識別碼。

securityEncryptionType

securityEncryptionTypes

指定受控磁碟的 EncryptionType。 它設定為 DiskWithVMGuestState 以加密受控磁碟以及 VMGuestState Blob、VMGuestStateOnly 只加密 VMGuestState Blob,以及 NonPersistedTPM 表示未在 VMGuestState Blob 中保存韌體狀態。 注意: 它只能設定為機密 VM。

VMGalleryApplication

指定參考計算資源庫應用程式版本的必要資訊

名稱 類型 Description
configurationReference

string

選擇性,指定 Azure Blob 的 URI,以在提供時取代套件的預設組態

enableAutomaticUpgrade

boolean

如果設定為 true,當 PIR/SIG 中有新的資源庫應用程式版本可用時,VM/VMSS 會自動更新

order

integer

選擇性,指定必須安裝套件的順序

packageReferenceId

string

指定 /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/gallerys/{galleryName}/applications/{application}/versions/{version} 形式的 GalleryApplicationVersion 資源標識符

tags

string

選擇性,指定更多泛型內容的傳遞值。

treatFailureAsDeploymentFailure

boolean

選擇性,如果為 true,VmApplication 中任何作業的任何失敗都會使部署失敗

VMSizeProperties

指定虛擬機上的 VM 大小屬性設定。

名稱 類型 Description
vCPUsAvailable

integer

指定 VM 可用的 vCPU 數目。 當要求本文中未指定這個屬性時,預設行為是將它設定為該 VM 大小的可用 vCPU 值,而該 VM 大小會在 列出區域中所有可用的虛擬機大小時公開。

vCPUsPerCore

integer

指定 vCPU 與實體核心比率。 當要求本文中未指定此屬性時,預設行為會針對在 列出區域中所有可用虛擬機大小的 API 回應中公開的 VM 大小設定為 vCPUPerCore 的值。 將此屬性設定為 1 也表示已停用超線程處理。

WindowsConfiguration

指定虛擬機器上的 Windows 作業系統設定。

名稱 類型 Description
additionalUnattendContent

AdditionalUnattendContent[]

指定可併入 Unattend.xml 檔案 (由 Windows 安裝程式使用) 的額外 Base-64 編碼 XML 格式資訊。

enableAutomaticUpdates

boolean

指出是否為 Windows 虛擬機啟用自動 匯報。 預設值為 true。 對於虛擬機擴展集,此屬性可以更新,且更新會在OS重新佈建上生效。

enableVMAgentPlatformUpdates

boolean

指出是否已針對 Windows 虛擬機啟用 VMAgent Platform 匯報。 預設值為 False。

patchSettings

PatchSettings

[預覽功能]指定與 Windows 上的 VM 客體修補相關的設定。

provisionVMAgent

boolean

指出是否應該在虛擬機器上佈建虛擬機器代理程式。 當要求本文中未指定這個屬性時,預設會設定為 true。 這可確保 VM 代理程式已安裝在 VM 上,以便稍後將擴充功能新增至 VM。

timeZone

string

指定虛擬機的時區。 例如“Pacific Standard Time”。 可能的值可以從 TimeZoneInfo.GetSystemTimeZones 傳回的時區 TimeZoneInfo.Id 值。

winRM

WinRMConfiguration

指定 Windows 遠端管理接聽程式。 藉此將啟用遠端 Windows PowerShell。

WindowsPatchAssessmentMode

指定 IaaS 虛擬機的 VM 客體修補評估模式。

可能的值包括:

ImageDefault - 您可以在虛擬機上控制修補程式評估的時間。

AutomaticByPlatform - 平臺會觸發定期修補程序評估。 屬性 provisionVMAgent 必須為 true。

名稱 類型 Description
AutomaticByPlatform

string

ImageDefault

string

WindowsVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

名稱 類型 Description
Always

string

IfRequired

string

Never

string

Unknown

string

WindowsVMGuestPatchAutomaticByPlatformSettings

指定在 Windows 修補程式設定中選取修補程式模式 AutomaticByPlatform 時要套用的其他設定。

名稱 類型 Description
bypassPlatformSafetyChecksOnUserSchedule

boolean

可讓客戶排程修補,而不需意外升級

rebootSetting

WindowsVMGuestPatchAutomaticByPlatformRebootSetting

指定所有 AutomaticByPlatform 修補程式安裝作業的重新啟動設定。

WindowsVMGuestPatchMode

指定 VM 客體修補至 IaaS 虛擬機的模式,或與 OrchestraMode 為彈性的虛擬機擴展集相關聯的虛擬機。

可能的值包括:

手動 - 您可以控制將修補程式應用程式套用至虛擬機。 您可以在 VM 內手動套用修補程式來執行此動作。 在此模式中,自動更新會停用;屬性 WindowsConfiguration.enableAutomaticUpdates 必須為 false

AutomaticByOS - 作業系統會自動更新虛擬機。 WindowsConfiguration.enableAutomaticUpdates 屬性必須是 true。

AutomaticByPlatform - 虛擬機將會由平台自動更新。 provisionVMAgent 和 WindowsConfiguration.enableAutomaticUpdates 屬性必須是 true

名稱 類型 Description
AutomaticByOS

string

AutomaticByPlatform

string

Manual

string

WinRMConfiguration

描述 VM 的 Windows 遠端管理設定

名稱 類型 Description
listeners

WinRMListener[]

Windows 遠端管理接聽程式清單

WinRMListener

描述 Windows 遠端管理接聽程式的通訊協議和指紋

名稱 類型 Description
certificateUrl

string

這是已上傳至 金鑰保存庫 為秘密之憑證的 URL。 如需將秘密新增至 金鑰保存庫,請參閱將密鑰或秘密新增至密鑰保存庫。 在此情況下,您的憑證必須是以UTF-8編碼的下列 JSON 物件的Base64編碼:

{
“data”:“”,
“dataType”:“pfx”,
“password”:“”
}
若要在虛擬機上安裝憑證,建議使用適用於Linux的 Azure 金鑰保存庫 虛擬機擴充功能適用於Windows的 Azure 金鑰保存庫 虛擬機擴充功能

protocol

ProtocolTypes

指定 WinRM 接聽程式的通訊協定。 可能的值為: HTTP、https。