Virtual Machines - Create Or Update

仮想マシンを作成または更新する操作。 一部のプロパティは、仮想マシンの作成時にのみ設定できます。

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

URI パラメーター

Name In Required Type Description
resourceGroupName
path True
  • string

リソース グループの名前。

subscriptionId
path True
  • string

サブスクリプションを一意に識別するサブスクリプション資格情報Microsoft Azure。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。

vmName
path True
  • string

仮想マシンの名前。

api-version
query True
  • string

クライアント API のバージョン。

要求本文

Name Required Type Description
location True
  • string

リソースの場所

extendedLocation

仮想マシンの拡張された場所。

identity

構成されている場合は、仮想マシンの ID。

plan

仮想マシンの作成に使用するマーケットプレース イメージに関する情報を指定します。 この要素は、Marketplace イメージにのみ使用されます。 API からマーケットプレース イメージを使用する前に、プログラムで使用するためにイメージを有効にする必要があります。 Azure portalで、使用するマーケットプレース イメージを見つけて、[プログラムでデプロイする] をクリックします。はじめにします>。 必要な情報を入力し、[ 保存] をクリックします。

properties.additionalCapabilities

仮想マシンで有効または無効にする追加の機能を指定します。

properties.applicationProfile

VM/VMSS で使用できるようにする必要があるギャラリー アプリケーションを指定します。

properties.availabilitySet

仮想マシンを割り当てる必要がある可用性セットに関する情報を指定します。 同じ可用性セットで指定された仮想マシンは、可用性を最大化するために別々のノードに割り当てられます。 可用性セットの詳細については、「可用性 セットの概要」を参照してください。

Azure の計画メンテナンスの詳細については、「Azure でのVirtual Machinesのメンテナンスと更新」を参照してください。

現時点では、VM は作成時にのみ可用性セットに追加できます。 VM が追加される可用性セットは、可用性セット リソースと同じリソース グループの下に存在する必要があります。 既存の VM を可用性セットに追加することはできません。

このプロパティは、null 以外の properties.virtualMachineScaleSet 参照と共に存在できません。

properties.billingProfile

Azure Spot 仮想マシンの課金関連の詳細を指定します。

最小 api-version: 2019-03-01。

properties.capacityReservation

仮想マシンの割り当てに使用される容量予約に関する情報を指定します。

最小 api-version: 2021-04-01。

properties.diagnosticsProfile

ブート診断設定の状態を指定します。

最小 api-version: 2015-06-15。

properties.evictionPolicy

Azure Spot 仮想マシンと Azure Spot スケール セットの削除ポリシーを指定します。

Azure Spot 仮想マシンの場合、"割り当て解除" と "削除" の両方がサポートされ、api バージョンの最小値は 2019-03-01 です。

Azure Spot スケール セットでは、"割り当て解除" と "削除" の両方がサポートされ、最小 api-version は 2017-10-30-preview です。

properties.extensionsTimeBudget
  • string

すべての拡張機能が開始される時間を指定します。 期間は 15 分から 120 分 (含む) で、ISO 8601 形式で指定する必要があります。 既定値は 90 分 (PT1H30M) です。

最小 api-version: 2020-06-01

properties.hardwareProfile

仮想マシンのハードウェア設定を指定します。

properties.host

仮想マシンが存在する専用ホストに関する情報を指定します。

最小 api-version: 2018-10-01。

properties.hostGroup

仮想マシンが存在する専用ホスト グループに関する情報を指定します。

最小 api-version: 2020-06-01。

注: ユーザーは、host プロパティと hostGroup プロパティの両方を指定できません。

properties.licenseType
  • string

使用されているイメージまたはディスクがオンプレミスでライセンスされていることを指定します。

Windows サーバー オペレーティング システムで使用できる値は次のとおりです。

Windows_Client

Windows_Server

Linux Server オペレーティング システムで使用できる値は次のとおりです。

RHEL_BYOS (RHEL の場合)

SLES_BYOS (SUSE の場合)

詳細については、「Windows Server の Azure ハイブリッド使用特典」を参照してください。

Linux Server の Azure ハイブリッド使用特典

最小 api-version: 2015-06-15

properties.networkProfile

仮想マシンのネットワーク インターフェイスを指定します。

properties.osProfile

仮想マシンの作成時に使用されるオペレーティング システムの設定を指定します。 一部の設定は、VM がプロビジョニングされると変更できません。

properties.platformFaultDomain
  • integer

仮想マシンを作成するスケール セットの論理障害ドメインを指定します。 既定では、仮想マシンは、使用可能な障害ドメイン間で最適なバランスを維持する障害ドメインに自動的に割り当てられます。

  • これは、この仮想マシンの 'virtualMachineScaleSet' プロパティが設定されている場合にのみ適用されます。
  • 参照される仮想マシン スケール セットには、'platformFaultDomainCount' 1 が > 必要です。
  • このプロパティは、仮想マシンが作成された後は更新できません。
  • 障害ドメインの割り当ては、仮想マシン インスタンス ビューで表示できます。

    最小 api-version: 2020‐12-01

  • properties.priority

    仮想マシンの優先度を指定します。

    最小 api-version: 2019-03-01

    properties.proximityPlacementGroup

    仮想マシンを割り当てる必要がある近接配置グループに関する情報を指定します。

    最小 api-version: 2018-04-01。

    properties.scheduledEventsProfile

    スケジュールされたイベント関連の構成を指定します。

    properties.securityProfile

    仮想マシンのセキュリティ関連プロファイル設定を指定します。

    properties.storageProfile

    仮想マシンのストレージ設定を指定します。

    properties.userData
    • string

    VM の UserData。これは base-64 でエンコードする必要があります。 顧客はここにシークレットを渡すべきではありません。

    最小 api-version: 2021-03-01

    properties.virtualMachineScaleSet

    仮想マシンを割り当てる必要がある仮想マシン スケール セットに関する情報を指定します。 同じ仮想マシン スケール セットで指定された仮想マシンは、可用性を最大化するために異なるノードに割り当てられます。 現時点では、VM は作成時にのみ仮想マシン スケール セットに追加できます。 既存の VM を仮想マシン スケール セットに追加することはできません。

    このプロパティは、null 以外の properties.availabilitySet 参照と共に存在できません。

    最小 api-version: 2019-03-01

    tags
    • object

    リソース タグ

    zones
    • string[]

    仮想マシン ゾーン。

    応答

    Name Type Description
    200 OK

    [OK]

    201 Created

    作成済み

    Other Status Codes

    操作に失敗した理由を説明するエラー応答。

    セキュリティ

    azure_auth

    OAuth2 FlowをAzure Active Directoryする

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

    Scopes

    Name Description
    user_impersonation ユーザー アカウントを偽装する

    Create a custom-image vm from an unmanaged generalized os image.
    Create a Linux vm with a patch setting assessmentMode of ImageDefault.
    Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.
    Create a Linux vm with a patch setting patchMode of ImageDefault.
    Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform.
    Create a platform-image vm with unmanaged os and data disks.
    Create a VM from a community gallery image
    Create a vm from a custom image.
    Create a vm from a generalized shared image.
    Create a VM from a shared gallery image
    Create a vm from a specialized shared image.
    Create a vm in a Virtual Machine Scale Set with customer assigned platformFaultDomain.
    Create a vm in an availability set.
    Create a vm with a marketplace image plan.
    Create a vm with an extensions time budget.
    Create a vm with Application Profile.
    Create a vm with boot diagnostics.
    Create a vm with DiskEncryptionSet resource id in the os disk and data disk.
    Create a vm with empty data disks.
    Create a vm with ephemeral os disk provisioning in Cache disk using placement property.
    Create a vm with ephemeral os disk provisioning in Resource disk using placement property.
    Create a vm with ephemeral os disk.
    Create a VM with HibernationEnabled
    Create a vm with Host Encryption using encryptionAtHost property.
    Create a vm with managed boot diagnostics.
    Create a VM with network interface configuration
    Create a vm with password authentication.
    Create a vm with premium storage.
    Create a vm with Scheduled Events Profile
    Create a VM with securityType ConfidentialVM with Customer Managed Keys
    Create a VM with securityType ConfidentialVM with Platform Managed Keys
    Create a vm with ssh authentication.
    Create a VM with Uefi Settings of secureBoot and vTPM.
    Create a VM with UserData
    Create a VM with VM Size Properties
    Create a Windows vm with a patch setting assessmentMode of ImageDefault.
    Create a Windows vm with a patch setting patchMode of AutomaticByOS.
    Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.
    Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true.
    Create a Windows vm with a patch setting patchMode of Manual.
    Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform.
    Create or update a VM with capacity reservation

    Create a custom-image vm from an unmanaged generalized os image.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "osDisk": {
            "name": "myVMosdisk",
            "image": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd"
            },
            "osType": "Windows",
            "createOption": "FromImage",
            "caching": "ReadWrite",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd"
            }
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "osDisk": {
            "name": "myVMosdisk",
            "image": {
              "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Windows",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd"
            }
          },
          "dataDisks": []
        },
        "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "osDisk": {
            "name": "myVMosdisk",
            "image": {
              "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Windows",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd"
            }
          },
          "dataDisks": []
        },
        "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Linux vm with a patch setting assessmentMode of ImageDefault.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Linux vm with a patch setting patchMode of ImageDefault.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "provisionVMAgent": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a platform-image vm with unmanaged os and data disks.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": [
            {
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "lun": 0,
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd"
              }
            },
            {
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "lun": 1,
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd"
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "caching": "ReadWrite"
          },
          "dataDisks": [
            {
              "name": "dataDisk0",
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "caching": "None",
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd"
              },
              "lun": 0
            },
            {
              "name": "dataDisk1",
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "caching": "None",
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd"
              },
              "lun": 1
            }
          ]
        },
        "vmId": "5230a749-2f68-4830-900b-702182d32e63",
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "vhd": {
              "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "caching": "ReadWrite"
          },
          "dataDisks": [
            {
              "name": "dataDisk0",
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "caching": "None",
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd"
              },
              "lun": 0
            },
            {
              "name": "dataDisk1",
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "caching": "None",
              "vhd": {
                "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd"
              },
              "lun": 1
            }
          ]
        },
        "vmId": "5230a749-2f68-4830-900b-702182d32e63",
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm from a custom image.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm from a generalized shared image.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm from a specialized shared image.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "dataDisks": []
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm in a Virtual Machine Scale Set with customer assigned platformFaultDomain.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "virtualMachineScaleSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}"
        },
        "platformFaultDomain": 1
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "virtualMachineScaleSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss"
        },
        "platformFaultDomain": 1,
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "virtualMachineScaleSet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss"
        },
        "platformFaultDomain": 1,
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm in an availability set.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "availabilitySet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}"
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "availabilitySet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "availabilitySet": {
          "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with a marketplace image plan.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows2016",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "windows-data-science-vm"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a vm with an extensions time budget.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        },
        "extensionsTimeBudget": "PT30M"
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "extensionsTimeBudget": "PT30M",
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "extensionsTimeBudget": "PT30M",
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with Application Profile.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "{image_sku}",
            "publisher": "{image_publisher}",
            "version": "latest",
            "offer": "{image_offer}"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "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": false,
              "enableAutomaticUpgrade": false
            },
            {
              "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "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": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "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"
            }
          ]
        },
        "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "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": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "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"
            }
          ]
        },
        "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with boot diagnostics.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with DiskEncryptionSet resource id in the os disk and data disk.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "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}"
              }
            },
            "name": "myVMosdisk",
            "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
            },
            {
              "caching": "ReadWrite",
              "managedDisk": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
                "storageAccountType": "Standard_LRS",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              },
              "diskSizeGB": 1023,
              "createOption": "Attach",
              "lun": 1
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS",
              "diskEncryptionSet": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskencryptionset-name}"
              }
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "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
            },
            {
              "caching": "ReadWrite",
              "managedDisk": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
                "storageAccountType": "Standard_LRS",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              },
              "diskSizeGB": 1023,
              "createOption": "Attach",
              "lun": 1
            }
          ]
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "linuxConfiguration": {
            "disablePasswordAuthentication": false
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
          },
          "osDisk": {
            "name": "myVMosdisk",
            "diskSizeGB": 30,
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "osType": "Linux"
          },
          "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
            },
            {
              "caching": "ReadWrite",
              "managedDisk": {
                "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
                "storageAccountType": "Standard_LRS",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              },
              "diskSizeGB": 1023,
              "createOption": "Attach",
              "lun": 1
            }
          ]
        },
        "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with empty data disks.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          },
          "dataDisks": [
            {
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "lun": 0
            },
            {
              "diskSizeGB": 1023,
              "createOption": "Empty",
              "lun": 1
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "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
            }
          ]
        },
        "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0",
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": [
            {
              "caching": "None",
              "managedDisk": {
                "storageAccountType": "Standard_LRS"
              },
              "createOption": "Empty",
              "lun": 0,
              "diskSizeGB": 1023,
              "toBeDetached": false
            },
            {
              "caching": "None",
              "managedDisk": {
                "storageAccountType": "Standard_LRS"
              },
              "createOption": "Empty",
              "lun": 1,
              "diskSizeGB": 1023,
              "toBeDetached": false
            }
          ]
        },
        "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0",
        "hardwareProfile": {
          "vmSize": "Standard_D2_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with ephemeral os disk provisioning in Cache disk using placement property.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows2016",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "windows-data-science-vm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local",
              "placement": "CacheDisk"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local",
              "placement": "CacheDisk"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local",
              "placement": "CacheDisk"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a vm with ephemeral os disk provisioning in Resource disk using placement property.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "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",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local",
              "placement": "ResourceDisk"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local",
              "placement": "ResourceDisk"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a vm with ephemeral os disk.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "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",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "diffDiskSettings": {
              "option": "Local"
            },
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a VM with HibernationEnabled

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2022-03-01
    
    {
      "location": "eastus2euap",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "additionalCapabilities": {
          "hibernationEnabled": true
        },
        "storageProfile": {
          "imageReference": {
            "publisher": "MicrosoftWindowsServer",
            "offer": "WindowsServer",
            "sku": "2019-Datacenter",
            "version": "latest"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "vmOSdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "{vm-name}",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "{vm-name}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "publisher": "MicrosoftWindowsServer",
            "offer": "WindowsServer",
            "sku": "2019-Datacenter",
            "version": "latest"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "vmOSdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "additionalCapabilities": {
          "hibernationEnabled": true
        },
        "provisioningState": "Updating"
      },
      "name": "{vm-name}",
      "location": "eastus2euap"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "{vm-name}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "publisher": "MicrosoftWindowsServer",
            "offer": "WindowsServer",
            "sku": "2019-Datacenter",
            "version": "latest"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "vmOSdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "additionalCapabilities": {
          "hibernationEnabled": true
        },
        "provisioningState": "Creating"
      },
      "name": "{vm-name}",
      "location": "eastus2euap"
    }

    Create a vm with Host Encryption using encryptionAtHost property.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "securityProfile": {
          "encryptionAtHost": true
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows2016",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "windows-data-science-vm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "encryptionAtHost": true
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "encryptionAtHost": true
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a vm with managed boot diagnostics.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true
          }
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a VM with network interface configuration

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkApiVersion": "2020-11-01",
          "networkInterfaceConfigurations": [
            {
              "name": "{nic-config-name}",
              "properties": {
                "primary": true,
                "deleteOption": "Delete",
                "ipConfigurations": [
                  {
                    "name": "{ip-config-name}",
                    "properties": {
                      "primary": true,
                      "publicIPAddressConfiguration": {
                        "name": "{publicIP-config-name}",
                        "sku": {
                          "name": "Basic",
                          "tier": "Global"
                        },
                        "properties": {
                          "deleteOption": "Detach",
                          "publicIPAllocationMethod": "Static"
                        }
                      }
                    }
                  }
                ]
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with password authentication.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with premium storage.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a vm with Scheduled Events Profile

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        },
        "scheduledEventsProfile": {
          "terminateNotificationProfile": {
            "notBeforeTimeout": "PT10M",
            "enable": true
          }
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "scheduledEventsProfile": {
          "terminateNotificationProfile": {
            "notBeforeTimeout": "PT10M",
            "enable": true
          }
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "scheduledEventsProfile": {
          "terminateNotificationProfile": {
            "notBeforeTimeout": "PT10M",
            "enable": true
          }
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a VM with securityType ConfidentialVM with Customer Managed Keys

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState",
                "diskEncryptionSet": {
                  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
                }
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a VM with securityType ConfidentialVM with Platform Managed Keys

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState"
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState"
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows-cvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "17763.2183.2109130127",
            "offer": "2019-datacenter-cvm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS",
              "securityProfile": {
                "securityEncryptionType": "DiskWithVMGuestState"
              }
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "ConfidentialVM"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DC2as_v5"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a vm with ssh authentication.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "{image_sku}",
            "publisher": "{image_publisher}",
            "version": "latest",
            "offer": "{image_offer}"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "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": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "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": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "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": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "16.04-LTS",
            "publisher": "Canonical",
            "version": "latest",
            "offer": "UbuntuServer"
          },
          "osDisk": {
            "osType": "Linux",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a VM with Uefi Settings of secureBoot and vTPM.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "TrustedLaunch"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows10-tvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "18363.592.2001092016",
            "offer": "windowsserver-gen2preview-preview"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows10-tvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "18363.592.2001092016",
            "offer": "windowsserver-gen2preview-preview"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "TrustedLaunch"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows10-tvm",
            "publisher": "MicrosoftWindowsServer",
            "version": "18363.592.2001092016",
            "offer": "windowsserver-gen2preview-preview"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "StandardSSD_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "securityProfile": {
          "uefiSettings": {
            "secureBootEnabled": true,
            "vTpmEnabled": true
          },
          "securityType": "TrustedLaunch"
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_D2s_v3"
        },
        "provisioningState": "Creating"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    Create a VM with UserData

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "vmOSdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "{vm-name}",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        },
        "userData": "RXhhbXBsZSBVc2VyRGF0YQ=="
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "{vm-name}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "vmOSdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "{vm-name}",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "{vm-name}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "vmOSdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "{vm-name}",
      "location": "westus"
    }

    Create a VM with VM Size Properties

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D4_v3",
          "vmSizeProperties": {
            "vCPUsAvailable": 1,
            "vCPUsPerCore": 1
          }
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
            "enabled": true
          }
        },
        "userData": "U29tZSBDdXN0b20gRGF0YQ=="
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D4_v3",
          "vmSizeProperties": {
            "vCPUsAvailable": 1,
            "vCPUsPerCore": 1
          }
        },
        "provisioningState": "Updating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            }
          },
          "dataDisks": []
        },
        "diagnosticsProfile": {
          "bootDiagnostics": {
            "storageUri": "http://nsgdiagnostic.blob.core.windows.net",
            "enabled": true
          }
        },
        "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
        "hardwareProfile": {
          "vmSize": "Standard_D4_v3",
          "vmSizeProperties": {
            "vCPUsAvailable": 1,
            "vCPUsPerCore": 1
          }
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with a patch setting assessmentMode of ImageDefault.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": false,
            "patchSettings": {
              "assessmentMode": "ImageDefault"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with a patch setting patchMode of AutomaticByOS.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByOS"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByOS"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByOS"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform",
              "automaticByPlatformSettings": {
                "rebootSetting": "Never"
              }
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "enableHotpatching": true
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "enableHotpatching": true
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "enableHotpatching": true
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with a patch setting patchMode of Manual.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "Manual"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "Manual"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": false,
            "patchSettings": {
              "patchMode": "Manual"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform.

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_D1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "caching": "ReadWrite",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            },
            "name": "myVMosdisk",
            "createOption": "FromImage"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "type": "Microsoft.Compute/virtualMachines",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true,
            "patchSettings": {
              "patchMode": "AutomaticByPlatform",
              "assessmentMode": "AutomaticByPlatform"
            }
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "2016-Datacenter",
            "publisher": "MicrosoftWindowsServer",
            "version": "latest",
            "offer": "WindowsServer"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadWrite",
            "createOption": "FromImage",
            "name": "myVMosdisk",
            "managedDisk": {
              "storageAccountType": "Premium_LRS"
            }
          },
          "dataDisks": []
        },
        "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "name": "myVM",
      "location": "westus"
    }

    Create or update a VM with capacity reservation

    Sample Request

    PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM?api-version=2022-03-01
    
    {
      "location": "westus",
      "plan": {
        "publisher": "microsoft-ads",
        "product": "windows-data-science-vm",
        "name": "windows2016"
      },
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "storageProfile": {
          "imageReference": {
            "sku": "windows2016",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "windows-data-science-vm"
          },
          "osDisk": {
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          }
        },
        "capacityReservation": {
          "capacityReservationGroup": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
          }
        },
        "osProfile": {
          "adminUsername": "{your-username}",
          "computerName": "myVM",
          "adminPassword": "{your-password}"
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
              "properties": {
                "primary": true
              }
            }
          ]
        }
      }
    }
    
    

    Sample Response

    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "capacityReservation": {
          "capacityReservationGroup": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }
    {
      "name": "myVM",
      "properties": {
        "osProfile": {
          "adminUsername": "{your-username}",
          "secrets": [],
          "computerName": "myVM",
          "windowsConfiguration": {
            "provisionVMAgent": true,
            "enableAutomaticUpdates": true
          }
        },
        "capacityReservation": {
          "capacityReservationGroup": {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
              "properties": {
                "primary": true
              }
            }
          ]
        },
        "storageProfile": {
          "imageReference": {
            "sku": "standard-data-science-vm",
            "publisher": "microsoft-ads",
            "version": "latest",
            "offer": "standard-data-science-vm"
          },
          "osDisk": {
            "osType": "Windows",
            "caching": "ReadOnly",
            "managedDisk": {
              "storageAccountType": "Standard_LRS"
            },
            "createOption": "FromImage",
            "name": "myVMosdisk"
          },
          "dataDisks": []
        },
        "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85",
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"
        },
        "provisioningState": "Creating"
      },
      "plan": {
        "publisher": "microsoft-ads",
        "product": "standard-data-science-vm",
        "name": "standard-data-science-vm"
      },
      "type": "Microsoft.Compute/virtualMachines",
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
      "location": "westus"
    }

    定義

    AdditionalCapabilities

    仮想マシンまたは仮想マシン スケール セットの機能を有効または無効にします。

    AdditionalUnattendContent

    Windows セットアップで使用される、Unattend.xml ファイルに含めることができる追加の XML 形式の情報を指定します。 コンテンツは、名前、コンポーネント名、およびコンテンツが適用されるパスを設定することによって定義されます。

    ApiError

    API エラー。

    ApiErrorBase

    API エラーベース。

    ApplicationProfile

    VM/VMSS で使用できるようにする必要があるギャラリー アプリケーションの一覧が含まれています

    AvailablePatchSummary

    使用可能なパッチの概要に関する仮想マシン インスタンス ビューのプロパティについて説明します。

    BillingProfile

    Azure スポット VM または VMSS の課金関連の詳細を指定します。

    最小 API バージョン: 2019-03-01。

    BootDiagnostics

    ブート診断は、コンソール出力とスクリーンショットを表示して VM の状態を診断できるデバッグ機能です。

    コンソール ログの出力を簡単に表示できます。

    また、Azure では、ハイパーバイザーから VM のスクリーンショットを表示することもできます。

    BootDiagnosticsInstanceView

    仮想マシンのブート診断のインスタンス ビュー。

    CachingTypes

    キャッシュの要件を指定します。

    設定可能な値は、次のとおりです。

    なし

    ReadOnly

    ReadWrite

    既定値: Standard Storage の場合 はなし 。 プレミアム ストレージの ReadOnly

    CapacityReservationProfile

    容量予約プロファイルのパラメーター。

    CloudError

    コンピューティング サービスからのエラー応答。

    ComponentNames

    コンポーネントの名前。 現在、許容される値は Microsoft-Windows-Shell-Setup のみです。

    DataDisk

    データ ディスクについて説明します。

    DeleteOptions

    VM が削除されたときのパブリック IP アドレスの動作を指定する

    DiagnosticsProfile

    ブート診断設定の状態を指定します。

    最小 API バージョン: 2015-06-15。

    DiffDiskOptions

    オペレーティング システム ディスクのエフェメラル ディスク設定を指定します。

    DiffDiskPlacement

    オペレーティング システム ディスクのエフェメラル ディスクの配置を指定します。 このプロパティは、要求のユーザーが、エフェメラル OS ディスク プロビジョニング用のキャッシュ ディスクまたはリソース ディスク領域などの場所を選択するために使用できます。 For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements

    DiffDiskSettings

    オペレーティング システム ディスクに指定できるエフェメラル ディスク設定のパラメーターについて説明します。

    注: エフェメラル ディスクの設定は、マネージド ディスクに対してのみ指定できます。

    DiskCreateOptionTypes

    仮想マシンの作成方法を指定します。

    設定可能な値は、次のとおりです。

    アタッチ \u2013 この値は、特殊化されたディスクを使用して仮想マシンを作成するときに使用されます。

    FromImage \u2013 この値は、イメージを使用して仮想マシンを作成するときに使用されます。 プラットフォーム イメージを使用している場合は、上記の imageReference 要素も使用します。 Marketplace イメージを使用している場合は、前に説明した plan 要素も使用します。

    DiskDeleteOptionTypes

    VM の削除時に OS ディスクを削除するかデタッチするかを指定します。

    指定できる値

    削除 この値を使用すると、VM の削除時に OS ディスクが削除されます。

    デタッチ この値を使用すると、VM が削除された後も OS ディスクが保持されます。

    既定値はデタッチに設定 されます。 エフェメラル OS ディスクの場合、既定値は Delete に設定 されます。 ユーザーは、エフェメラル OS ディスクの削除オプションを変更できません。

    DiskDetachOptionTypes

    ディスクのデタッチ中、または仮想マシンからのデタッチ処理中に既に存在するデタッチ動作を指定します。 サポートされている値: ForceDetach

    detachOption: ForceDetach はマネージド データ ディスクにのみ適用されます。 仮想マシンからの予期しない障害が原因でデータ ディスクの以前のデタッチ試行が完了せず、ディスクがまだ解放されていない場合は、最後の手段として強制デタッチを使用して、VM からディスクを強制的にデタッチします。 このデタッチ動作を使用すると、すべての書き込みがフラッシュされなかった可能性があります。

    この機能はまだプレビュー モードであり、VirtualMachineScaleSet ではサポートされていません。 detachOption: 'ForceDetach' の設定と共に、データ ディスクを強制的にデタッチしてBeDetached を 'true' に更新します。

    DiskEncryptionSetParameters

    ディスクに指定できるカスタマー マネージド ディスク暗号化セットリソース ID のパラメーターについて説明します。

    注: ディスク暗号化セットのリソース ID は、マネージド ディスクに対してのみ指定できます。 詳細はこちらをご覧 https://aka.ms/mdssewithcmkoverview ください。

    DiskEncryptionSettings

    ディスクの暗号化設定について説明します

    DiskInstanceView

    ディスクのインスタンス ビュー。

    ExtendedLocation

    拡張場所の複合型。

    ExtendedLocationTypes

    拡張された場所の型。

    HardwareProfile

    仮想マシンのハードウェア設定を指定します。

    HyperVGenerationType

    リソースに関連付けられている HyperVGeneration の種類を指定します

    ImageReference

    使用するイメージに関する情報を指定します。 プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージに関する情報を指定できます。 この要素は、プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージを使用する場合に必要ですが、他の作成操作では使用されません。 注: イメージ参照パブリッシャーとオファーは、スケール セットの作成時にのみ設定できます。

    InnerError

    内部エラーの詳細。

    InstanceViewStatus

    インスタンス ビューの状態。

    IPVersions

    Api-Version 2019-07-01 以降で使用でき、特定の ipconfiguration が IPv4 か IPv6 かを表します。 既定値は IPv4 と見なされます。 使用可能な値は、'IPv4' と 'IPv6' です。

    KeyVaultKeyReference

    Key Vault キーへの参照について説明します

    KeyVaultSecretReference

    Key Vault シークレットへの参照について説明します

    LastPatchInstallationSummary

    最後にインストールされたパッチの概要のプロパティについて説明します。

    LinuxConfiguration

    仮想マシン上の Linux オペレーティング システムの設定を指定します。

    サポートされている Linux ディストリビューションの一覧については、「Linux on Azure-Endorsed ディストリビューション」を参照してください。

    LinuxPatchAssessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    LinuxPatchSettings

    Linux での VM ゲストパッチ適用に関連する設定を指定します。

    LinuxVMGuestPatchAutomaticByPlatformRebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    LinuxVMGuestPatchAutomaticByPlatformSettings

    Linux のパッチ設定でパッチ モード AutomaticByPlatform が選択されている場合に適用する追加の設定を指定します。

    LinuxVMGuestPatchMode

    オーケストレーション モードをフレキシブルとして使用して、仮想マシン スケール セットに関連付けられている IaaS 仮想マシンまたは仮想マシンに対する VM ゲスト 修正プログラムの適用モードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンの既定の修正プログラムの構成が使用されます。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 プロパティ provisionVMAgent は true である必要があります

    MaintenanceOperationResultCodeTypes

    最後のメンテナンス操作の結果コード。

    MaintenanceRedeployStatus

    メンテナンス操作の状態。

    ManagedDiskParameters

    マネージド ディスクのパラメーター。

    NetworkApiVersion

    は、ネットワーク インターフェイス構成でネットワーク リソースを作成するときに使用される Microsoft.Network API のバージョンを指定します

    NetworkInterfaceReference

    ネットワーク インターフェイス参照について説明します。

    NetworkProfile

    仮想マシンのネットワーク インターフェイスまたはネットワーク構成を指定します。

    OperatingSystemTypes

    このプロパティを使用すると、ユーザー イメージまたは特殊化された VHD から VM を作成する場合に、ディスクに含まれる OS の種類を指定できます。

    設定可能な値は、次のとおりです。

    Windows

    Linux

    OSDisk

    仮想マシンで使用されるオペレーティング システム ディスクに関する情報を指定します。

    ディスクの詳細については、「 Azure 仮想マシンのディスクと VHD について」を参照してください。

    OSProfile

    仮想マシンのオペレーティング システム設定を指定します。 VM のプロビジョニング後に一部の設定を変更することはできません。

    PassNames

    パス名。 現時点で許容される値は OobeSystem のみです。

    PatchOperationStatus

    操作の全体的な成功または失敗の状態。 操作が完了するまで、"InProgress" のままです。 その時点で、"不明"、"Failed"、"Succeeded"、または "CompletedWithWarnings" になります。

    PatchSettings

    Windowsでの VM ゲストパッチ適用に関連する設定を指定します。

    Plan

    仮想マシンの作成に使用されるマーケットプレース イメージに関する情報を指定します。 この要素は、マーケットプレース イメージにのみ使用されます。 API からマーケットプレース イメージを使用する前に、プログラムで使用するためにイメージを有効にする必要があります。 Azure portalで、使用するマーケットプレース イメージを見つけて、[プログラムでデプロイする] をクリックします。はじめにします>。 必要な情報を入力し、[ 保存] をクリックします。

    ProtocolTypes

    WinRM リスナーのプロトコルを指定します。

    設定可能な値は、次のとおりです。
    http

    https

    PublicIPAddressSku

    パブリック IP SKU について説明します。 オーケストレーション モードは、フレキシブルとしてのみ設定できます。

    PublicIPAddressSkuName

    パブリック IP SKU 名を指定する

    PublicIPAddressSkuTier

    パブリック IP SKU レベルを指定する

    PublicIPAllocationMethod

    パブリック IP 割り当ての種類を指定する

    ResourceIdentityType

    仮想マシンに使用される ID の種類。 種類 "SystemAssigned、UserAssigned" には、暗黙的に作成された ID とユーザー割り当て ID のセットの両方が含まれます。 種類 'None' は、仮想マシンからすべての ID を削除します。

    ScheduledEventsProfile
    securityEncryptionTypes

    マネージド ディスクの EncryptionType を指定します。
    これは、VMGuestState BLOB と共にマネージド ディスクを暗号化するために DiskWithVMGuestState に設定され、VMGuestState BLOB のみを暗号化するための VMGuestStateOnly に設定されます。

    注: これは、機密 VM に対してのみ設定できます。

    SecurityProfile

    仮想マシンまたは仮想マシン スケール セットのセキュリティ プロファイル設定を指定します。

    SecurityTypes

    仮想マシンの SecurityType を指定します。 UefiSettings を有効にするには、指定した値に設定する必要があります。

    既定値: このプロパティが設定されていない限り、UefiSettings は有効になりません。

    SettingNames

    コンテンツが適用される設定の名前を指定します。 使用できる値は、FirstLogonCommands と AutoLogon です。

    SshConfiguration

    Azure で実行されている Linux ベースの VM の SSH 構成

    SshPublicKey

    SSH 証明書の公開キーと、公開キーが配置されている Linux VM 上のパスに関する情報が含まれています。

    StatusLevelTypes

    レベル コード。

    StorageAccountTypes

    マネージド ディスクのストレージ アカウントの種類を指定します。 注: UltraSSD_LRSはデータ ディスクでのみ使用できます。OS ディスクでは使用できません。

    StorageProfile

    仮想マシンのストレージ設定を指定します。

    SubResource
    TerminateNotificationProfile
    UefiSettings

    仮想マシンの作成時に使用されるセキュア ブートや vTPM などのセキュリティ設定を指定します。

    最小 API バージョン: 2020-12-01

    UserAssignedIdentities

    仮想マシンに関連付けられているユーザー ID の一覧。 ユーザー ID ディクショナリ キーの参照は、'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' という形式の ARM リソース ID になります。

    VaultCertificate

    Key Vault内の 1 つの証明書参照と、証明書が VM 上に存在する場所について説明します。

    VaultSecretGroup

    すべて同じKey Vault内にある証明書のセットについて説明します。

    VirtualHardDisk

    ディスクの URI について説明します。

    VirtualMachine

    仮想マシンについて説明します。

    VirtualMachineAgentInstanceView

    仮想マシンで実行されている VM エージェントのインスタンス ビュー。

    VirtualMachineEvictionPolicyTypes

    Azure Spot 仮想マシンと Azure スポット スケール セットの削除ポリシーを指定します。

    Azure Spot 仮想マシンでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2019-03-01 です。

    Azure スポット スケール セットでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2017-10-30-preview です。

    VirtualMachineExtension

    仮想マシン拡張機能について説明します。

    VirtualMachineExtensionHandlerInstanceView

    仮想マシン拡張機能ハンドラーのインスタンス ビュー。

    VirtualMachineExtensionInstanceView

    仮想マシン拡張機能のインスタンス ビュー。

    VirtualMachineHealthStatus

    VM の正常性状態。

    VirtualMachineIdentity

    仮想マシンの ID。

    VirtualMachineInstanceView

    仮想マシンのインスタンス ビュー。

    VirtualMachineIpTag

    パブリック IP アドレスに関連付けられている IP タグが含まれています。

    VirtualMachineNetworkInterfaceConfiguration

    仮想マシンのネットワーク インターフェイスの構成について説明します。

    VirtualMachineNetworkInterfaceDnsSettingsConfiguration

    仮想マシンのネットワーク構成の DNS 設定について説明します。

    VirtualMachineNetworkInterfaceIPConfiguration

    仮想マシン ネットワーク プロファイルの IP 構成について説明します。

    VirtualMachinePatchStatus

    仮想マシンのパッチ操作の状態。

    VirtualMachinePriorityTypes

    仮想マシンの優先順位を指定します。

    最小 api-version: 2019-03-01

    VirtualMachinePublicIPAddressConfiguration

    仮想マシンの IP 構成の PublicIPAddress 構成について説明します

    VirtualMachinePublicIPAddressDnsSettingsConfiguration

    仮想マシン ネットワーク構成の DNS 設定について説明します。

    VirtualMachineSizeTypes

    仮想マシンのサイズを指定します。

    列挙型データ型は現在非推奨であり、2023 年 12 月 23 日までに削除される予定です。

    使用可能なサイズの一覧を取得するには、次の API を使用することをお勧めします。

    可用性セットで使用可能なすべての仮想マシン サイズを一覧表示する

    リージョンで使用可能なすべての仮想マシン サイズを一覧表示する

    サイズ変更に使用できるすべての仮想マシン サイズを一覧表示します。 仮想マシンのサイズの詳細については、「仮想 マシンのサイズ」を参照してください。

    使用可能な VM サイズは、リージョンと可用性セットによって異なります。

    VMDiskSecurityProfile

    マネージド ディスクのセキュリティ プロファイル設定を指定します。

    注: 機密 VM にのみ設定できます

    VMGalleryApplication

    コンピューティング ギャラリー アプリケーションのバージョンを参照するために必要な情報を指定します

    VMSizeProperties

    仮想マシンの VM サイズ プロパティの設定を指定します。

    WindowsConfiguration

    仮想マシン上の Windows オペレーティング システムの設定を指定します。

    WindowsPatchAssessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    WindowsVMGuestPatchAutomaticByPlatformRebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    WindowsVMGuestPatchAutomaticByPlatformSettings

    パッチ設定でパッチ モード AutomaticByPlatform が選択されている場合に適用する追加の設定Windows指定します。

    WindowsVMGuestPatchMode

    OrchestrationMode をフレキシブルとして使用して、IaaS 仮想マシンまたは仮想マシン スケール セットに関連付けられている仮想マシンに対する VM ゲスト パッチの適用モードを指定します。

    設定可能な値は、次のとおりです。

    手動 - 仮想マシンへのパッチの適用を制御します。 これを行うには、VM 内でパッチを手動で適用します。 このモードでは、自動更新は無効になります。プロパティ WindowsConfiguration.enableAutomaticUpdates は false である必要があります

    AutomaticByOS - 仮想マシンは OS によって自動的に更新されます。 WindowsConfiguration.enableAutomaticUpdates プロパティは true である必要があります。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 プロパティ provisionVMAgent と WindowsConfiguration.enableAutomaticUpdates は true である必要があります

    WinRMConfiguration

    VM のリモート管理構成Windowsについて説明します

    WinRMListener

    Windows リモート管理リスナーのプロトコルと拇印について説明します

    AdditionalCapabilities

    仮想マシンまたは仮想マシン スケール セットの機能を有効または無効にします。

    Name Type Description
    hibernationEnabled
    • boolean

    VM の休止状態機能を有効または無効にするフラグ。

    ultraSSDEnabled
    • boolean

    VM または VMSS でストレージ アカウントの種類をUltraSSD_LRSする 1 つ以上のマネージド データ ディスクを持つ機能を有効または無効にするフラグ。 ストレージ アカウントの種類がUltraSSD_LRSマネージド ディスクは、このプロパティが有効になっている場合にのみ、仮想マシンまたは仮想マシン スケール セットに追加できます。

    AdditionalUnattendContent

    Windows セットアップで使用される、Unattend.xml ファイルに含めることができる追加の XML 形式の情報を指定します。 コンテンツは、名前、コンポーネント名、およびコンテンツが適用されるパスを設定することによって定義されます。

    Name Type Description
    componentName

    コンポーネントの名前。 現在、許容される値は Microsoft-Windows-Shell-Setup のみです。

    content
    • string

    指定したパスとコンポーネントのunattend.xml ファイルに追加される XML 形式のコンテンツを指定します。 XML は 4 KB 未満で、挿入する設定または機能のルート要素を含める必要があります。

    passName

    パス名。 現時点で許容される値は OobeSystem のみです。

    settingName

    コンテンツが適用される設定の名前を指定します。 使用できる値は、FirstLogonCommands と AutoLogon です。

    ApiError

    API エラー。

    Name Type Description
    code
    • string

    エラー コード。

    details

    Api エラーの詳細

    innererror

    Api の内部エラー

    message
    • string

    エラー メッセージ。

    target
    • string

    特定のエラーのターゲット。

    ApiErrorBase

    API エラーベース。

    Name Type Description
    code
    • string

    エラー コード。

    message
    • string

    エラー メッセージ。

    target
    • string

    特定のエラーのターゲット。

    ApplicationProfile

    VM/VMSS で使用できるようにする必要があるギャラリー アプリケーションの一覧が含まれています

    Name Type Description
    galleryApplications

    VM/VMSS で使用できるようにするギャラリー アプリケーションを指定します。

    AvailablePatchSummary

    使用可能なパッチの概要に関する仮想マシン インスタンス ビューのプロパティについて説明します。

    Name Type Description
    assessmentActivityId
    • string

    この結果を生成した操作のアクティビティ ID。 これは、CRP ログと拡張ログ間で相互に関連付けるために使用されます。

    criticalAndSecurityPatchCount
    • integer

    使用可能として検出され、まだインストールされていない重大またはセキュリティパッチの数。

    error

    操作の実行中に発生したエラー。 詳細配列には、それらのリストが含まれています。

    lastModifiedTime
    • string

    操作が開始されたときの UTC タイムスタンプ。

    otherPatchCount
    • integer

    クリティカルおよびセキュリティを除く使用可能なすべてのパッチの数。

    rebootPending
    • boolean

    VM の全体的な再起動状態。 これは、部分的にインストールされたパッチがインストールを完了するために再起動を必要とするが、再起動がまだ発生していない場合に当てはまります。

    startTime
    • string

    操作が開始されたときの UTC タイムスタンプ。

    status

    操作の全体的な成功または失敗の状態。 操作が完了するまで "InProgress" のままです。 その時点で、"不明"、"失敗"、"成功"、または "CompletedWithWarnings" になります。

    BillingProfile

    Azure スポット VM または VMSS の課金関連の詳細を指定します。

    最小 API バージョン: 2019-03-01。

    Name Type Description
    maxPrice
    • number

    Azure Spot VM/VMSS に対して支払う最大料金を指定します。 この価格は米ドルで表示されます。

    この価格は、VM サイズの現在の Azure スポット価格と比較されます。 また、価格は Azure Spot VM/VMSS の作成/更新時に比較され、maxPrice が現在の Azure スポット価格より大きい場合にのみ操作が成功します。

    現在の Azure スポット価格が VM/VMSS の作成後に maxPrice を超えた場合、maxPrice は Azure スポット VM/VMSS の削除にも使用されます。

    設定可能な値は、次のとおりです。

    - 0 より大きい任意の 10 進値。 例: 0.01538

    -1 – 既定の価格がオンデマンドであることを示します。

    maxPrice を -1 に設定して、価格上の理由から Azure Spot VM/VMSS を削除しないことを示すことができます。 また、ユーザーが提供していない場合、既定の最大価格は -1 です。

    最小 API バージョン: 2019-03-01。

    BootDiagnostics

    ブート診断は、コンソール出力とスクリーンショットを表示して VM の状態を診断できるデバッグ機能です。

    コンソール ログの出力を簡単に表示できます。

    また、Azure では、ハイパーバイザーから VM のスクリーンショットを表示することもできます。

    Name Type Description
    enabled
    • boolean

    仮想マシンでブート診断を有効にする必要があるかどうか。

    storageUri
    • string

    コンソール出力とスクリーンショットの配置に使用するストレージ アカウントの URI。

    ブート診断の有効化中に storageUri が指定されていない場合は、マネージド ストレージが使用されます。

    BootDiagnosticsInstanceView

    仮想マシンのブート診断のインスタンス ビュー。

    Name Type Description
    consoleScreenshotBlobUri
    • string

    コンソールのスクリーンショット BLOB URI。

    注: ブート診断がマネージド ストレージで現在有効になっている場合、これは設定 されません

    serialConsoleLogBlobUri
    • string

    シリアル コンソール ログ BLOB URI。

    注: ブート診断がマネージド ストレージで現在有効になっている場合、これは設定 されません

    status

    VM のブート診断の状態情報。

    注: ブート診断の有効化でエラーが発生した場合にのみ設定されます。

    CachingTypes

    キャッシュの要件を指定します。

    設定可能な値は、次のとおりです。

    なし

    ReadOnly

    ReadWrite

    既定値: Standard Storage の場合 はなし 。 プレミアム ストレージの ReadOnly

    Name Type Description
    None
    • string
    ReadOnly
    • string
    ReadWrite
    • string

    CapacityReservationProfile

    容量予約プロファイルのパラメーター。

    Name Type Description
    capacityReservationGroup

    十分な容量が予約されている場合に、仮想マシンまたはスケールセット VM インスタンスの割り当てに使用する必要がある容量予約グループのリソース ID を指定します。 詳細はこちらをご覧 https://aka.ms/CapacityReservation ください。

    CloudError

    コンピューティング サービスからのエラー応答。

    Name Type Description
    error

    API エラー。

    ComponentNames

    コンポーネントの名前。 現在、許容される値は Microsoft-Windows-Shell-Setup のみです。

    Name Type Description
    Microsoft-Windows-Shell-Setup
    • string

    DataDisk

    データ ディスクについて説明します。

    Name Type Description
    caching

    キャッシュの要件を指定します。

    設定可能な値は、次のとおりです。

    なし

    ReadOnly

    ReadWrite

    既定値: Standard Storage の場合はなし。プレミアム ストレージの ReadOnly

    createOption

    仮想マシンの作成方法を指定します。

    設定可能な値は、次のとおりです。

    アタッチ \u2013 この値は、特殊化されたディスクを使用して仮想マシンを作成するときに使用されます。

    FromImage \u2013 この値は、イメージを使用して仮想マシンを作成するときに使用されます。 プラットフォーム イメージを使用している場合は、上記の imageReference 要素も使用します。 Marketplace イメージを使用している場合は、前に説明した plan 要素も使用します。

    deleteOption

    VM の削除時にデータ ディスクを削除するかデタッチするかを指定します。

    指定できる値

    削除 この値を使用すると、VM の削除時にデータ ディスクが削除されます。

    デタッチ この値を使用すると、VM が削除された後もデータ ディスクが保持されます。

    既定値はデタッチに設定されています

    detachOption

    ディスクのデタッチ中、または仮想マシンからのデタッチ処理中に既に存在するデタッチ動作を指定します。 サポートされている値: ForceDetach

    detachOption: ForceDetach はマネージド データ ディスクにのみ適用されます。 仮想マシンからの予期しない障害が原因でデータ ディスクの以前のデタッチ試行が完了せず、ディスクがまだ解放されていない場合は、最後の手段として強制デタッチを使用して、VM からディスクを強制的にデタッチします。 このデタッチ動作を使用すると、すべての書き込みがフラッシュされなかった可能性があります。

    この機能はまだプレビュー モードであり、VirtualMachineScaleSet ではサポートされていません。 detachOption: 'ForceDetach' の設定と共に、データ ディスクを強制的にデタッチしてBeDetached を 'true' に更新します。

    diskIOPSReadWrite
    • integer

    StorageAccountType がUltraSSD_LRSされている場合のマネージド ディスクのRead-Write IOPS を指定します。 VirtualMachine ScaleSet VM ディスクの場合にのみ返されます。 VirtualMachine スケール セットの更新によってのみ更新できます。

    diskMBpsReadWrite
    • integer

    StorageAccountType がUltraSSD_LRSされている場合のマネージド ディスクの帯域幅 (MB/秒) を指定します。 VirtualMachine ScaleSet VM ディスクの場合にのみ返されます。 VirtualMachine スケール セットの更新によってのみ更新できます。

    diskSizeGB
    • integer

    空のデータ ディスクのサイズをギガバイト単位で指定します。 この要素は、仮想マシン イメージ内のディスクのサイズを上書きするために使用できます。

    この値は 1023 GB を超えることはできません

    image

    ソース ユーザー イメージの仮想ハード ディスク。 仮想ハード ディスクは、仮想マシンに接続される前にコピーされます。 SourceImage が指定されている場合、移行先の仮想ハード ドライブは存在しない必要があります。

    lun
    • integer

    データ ディスクの論理ユニット番号を指定します。 この値は、VM 内のデータ ディスクを識別するために使用されるため、VM に接続されているデータ ディスクごとに一意である必要があります。

    managedDisk

    マネージド ディスクのパラメーター。

    name
    • string

    ディスク名。

    toBeDetached
    • boolean

    データ ディスクが VirtualMachine/VirtualMachineScaleset からデタッチ中かどうかを指定します。

    vhd

    仮想ハード ディスク。

    writeAcceleratorEnabled
    • boolean

    ディスクで writeAccelerator を有効または無効にするかどうかを指定します。

    DeleteOptions

    VM が削除されたときのパブリック IP アドレスの動作を指定する

    Name Type Description
    Delete
    • string
    Detach
    • string

    DiagnosticsProfile

    ブート診断設定の状態を指定します。

    最小 API バージョン: 2015-06-15。

    Name Type Description
    bootDiagnostics

    ブート診断は、コンソール出力とスクリーンショットを表示して VM の状態を診断できるデバッグ機能です。
    : storageUri が指定されている場合は、ストレージ アカウントが VM と同じリージョンとサブスクリプションにあることを確認します。

    コンソール ログの出力を簡単に表示できます。

    また、Azure では、ハイパーバイザーから VM のスクリーンショットを表示することもできます。

    DiffDiskOptions

    オペレーティング システム ディスクのエフェメラル ディスク設定を指定します。

    Name Type Description
    Local
    • string

    DiffDiskPlacement

    オペレーティング システム ディスクのエフェメラル ディスクの配置を指定します。 このプロパティは、要求のユーザーが、エフェメラル OS ディスク プロビジョニング用のキャッシュ ディスクまたはリソース ディスク領域などの場所を選択するために使用できます。 For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements

    Name Type Description
    CacheDisk
    • string
    ResourceDisk
    • string

    DiffDiskSettings

    オペレーティング システム ディスクに指定できるエフェメラル ディスク設定のパラメーターについて説明します。

    注: エフェメラル ディスクの設定は、マネージド ディスクに対してのみ指定できます。

    Name Type Description
    option

    オペレーティング システム ディスクのエフェメラル ディスク設定を指定します。

    placement

    オペレーティング システム ディスクのエフェメラル ディスクの配置を指定します。

    設定可能な値は、次のとおりです。

    CacheDisk

    ResourceDisk

    既定値: VM サイズ用に構成されている場合は CacheDisk 。それ以外の場合は ResourceDisk が使用されます。

    キャッシュ ディスクを公開する VM サイズを確認するには、VM サイズに関するドキュメントを参照して、Windows VM と https://docs.microsoft.com/azure/virtual-machines/windows/sizes Linux VM をhttps://docs.microsoft.com/azure/virtual-machines/linux/sizes確認してください。

    DiskCreateOptionTypes

    仮想マシンの作成方法を指定します。

    設定可能な値は、次のとおりです。

    アタッチ \u2013 この値は、特殊化されたディスクを使用して仮想マシンを作成するときに使用されます。

    FromImage \u2013 この値は、イメージを使用して仮想マシンを作成するときに使用されます。 プラットフォーム イメージを使用している場合は、上記の imageReference 要素も使用します。 Marketplace イメージを使用している場合は、前に説明した plan 要素も使用します。

    Name Type Description
    Attach
    • string
    Empty
    • string
    FromImage
    • string

    DiskDeleteOptionTypes

    VM の削除時に OS ディスクを削除するかデタッチするかを指定します。

    指定できる値

    削除 この値を使用すると、VM の削除時に OS ディスクが削除されます。

    デタッチ この値を使用すると、VM が削除された後も OS ディスクが保持されます。

    既定値はデタッチに設定 されます。 エフェメラル OS ディスクの場合、既定値は Delete に設定 されます。 ユーザーは、エフェメラル OS ディスクの削除オプションを変更できません。

    Name Type Description
    Delete
    • string
    Detach
    • string

    DiskDetachOptionTypes

    ディスクのデタッチ中、または仮想マシンからのデタッチ処理中に既に存在するデタッチ動作を指定します。 サポートされている値: ForceDetach

    detachOption: ForceDetach はマネージド データ ディスクにのみ適用されます。 仮想マシンからの予期しない障害が原因でデータ ディスクの以前のデタッチ試行が完了せず、ディスクがまだ解放されていない場合は、最後の手段として強制デタッチを使用して、VM からディスクを強制的にデタッチします。 このデタッチ動作を使用すると、すべての書き込みがフラッシュされなかった可能性があります。

    この機能はまだプレビュー モードであり、VirtualMachineScaleSet ではサポートされていません。 detachOption: 'ForceDetach' の設定と共に、データ ディスクを強制的にデタッチしてBeDetached を 'true' に更新します。

    Name Type Description
    ForceDetach
    • string

    DiskEncryptionSetParameters

    ディスクに指定できるカスタマー マネージド ディスク暗号化セットリソース ID のパラメーターについて説明します。

    注: ディスク暗号化セットのリソース ID は、マネージド ディスクに対してのみ指定できます。 詳細はこちらをご覧 https://aka.ms/mdssewithcmkoverview ください。

    Name Type Description
    id
    • string

    リソース ID

    DiskEncryptionSettings

    ディスクの暗号化設定について説明します

    Name Type Description
    diskEncryptionKey

    Key Vault シークレットであるディスク暗号化キーの場所を指定します。

    enabled
    • boolean

    仮想マシンでディスク暗号化を有効にするかどうかを指定します。

    keyEncryptionKey

    Key Vault内のキー暗号化キーの場所を指定します。

    DiskInstanceView

    ディスクのインスタンス ビュー。

    Name Type Description
    encryptionSettings

    OS ディスクの暗号化設定を指定します。

    最小 api-version: 2015-06-15

    name
    • string

    ディスク名。

    statuses

    リソースの状態情報。

    ExtendedLocation

    拡張場所の複合型。

    Name Type Description
    name
    • string

    拡張場所の名前。

    type

    拡張された場所の型。

    ExtendedLocationTypes

    拡張された場所の型。

    Name Type Description
    EdgeZone
    • string

    HardwareProfile

    仮想マシンのハードウェア設定を指定します。

    Name Type Description
    vmSize

    仮想マシンのサイズを指定します。

    列挙型データ型は現在非推奨であり、2023 年 12 月 23 日までに削除される予定です。

    使用可能なサイズの一覧を取得するには、次の API を使用することをお勧めします。

    可用性セットで使用可能なすべての仮想マシン サイズを一覧表示する

    リージョンで使用可能なすべての仮想マシン サイズを一覧表示する

    サイズ変更に使用できるすべての仮想マシン サイズを一覧表示します。 仮想マシンのサイズの詳細については、「仮想 マシンのサイズ」を参照してください。

    使用可能な VM サイズは、リージョンと可用性セットによって異なります。

    vmSizeProperties

    仮想マシンのサイズをカスタマイズするためのプロパティを指定します。 最小 API バージョン: 2021-07-01。

    この機能はまだプレビュー モードであり、VirtualMachineScaleSet ではサポートされていません。

    詳細については、 VM のカスタマイズ に関する記事の手順に従ってください。

    HyperVGenerationType

    リソースに関連付けられている HyperVGeneration の種類を指定します

    Name Type Description
    V1
    • string
    V2
    • string

    ImageReference

    使用するイメージに関する情報を指定します。 プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージに関する情報を指定できます。 この要素は、プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージを使用する場合に必要ですが、他の作成操作では使用されません。 注: イメージ参照パブリッシャーとオファーは、スケール セットの作成時にのみ設定できます。

    Name Type Description
    communityGalleryImageId
    • string

    VM デプロイのコミュニティ ギャラリー イメージの一意の ID を指定しました。 これは、コミュニティ ギャラリー イメージの GET 呼び出しからフェッチできます。

    exactVersion
    • string

    仮想マシンの作成に使用されるプラットフォーム イメージまたはマーケットプレース イメージのバージョンを、10 進数で指定します。 この読み取り専用フィールドは、'version' フィールドに指定された値が 'latest' の場合にのみ、'version' と異なります。

    id
    • string

    リソース ID

    offer
    • string

    仮想マシンの作成に使用するプラットフォーム イメージまたはマーケットプレース イメージのオファーを指定します。

    publisher
    • string

    イメージの発行元。

    sharedGalleryImageId
    • string

    VM デプロイの共有ギャラリー イメージの一意の ID を指定しました。 これは、共有ギャラリー イメージ GET 呼び出しからフェッチできます。

    sku
    • string

    イメージ SKU。

    version
    • string

    仮想マシンの作成に使用するプラットフォーム イメージまたはマーケットプレース イメージのバージョンを指定します。 使用できる形式は Major.Minor.Build または 'latest' です。 メジャー、マイナー、ビルドは 10 進数です。 デプロイ時に使用可能な最新バージョンのイメージを使用するには、'latest' を指定します。 "最新" を使用している場合でも、新しいバージョンが使用可能になった場合でも、デプロイ後に VM イメージは自動的に更新されません。 ギャラリー イメージのデプロイにはフィールド 'version' を使用しないでください。ギャラリー イメージの '最新' バージョンを使用するには、常に 'id' フィールドを使用する必要があります。ギャラリー イメージの '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/gallerys/{galleryName}/images/{imageName}' をバージョン入力なしで 'id' フィールドに設定するだけです。

    InnerError

    内部エラーの詳細。

    Name Type Description
    errordetail
    • string

    内部エラー メッセージまたは例外ダンプ。

    exceptiontype
    • string

    例外の種類。

    InstanceViewStatus

    インスタンス ビューの状態。

    Name Type Description
    code
    • string

    ステータス コード。

    displayStatus
    • string

    状態の短いローカライズ可能なラベル。

    level

    レベル コード。

    message
    • string

    アラートやエラー メッセージを含む詳細なステータス メッセージ。

    time
    • string

    状態の時刻。

    IPVersions

    Api-Version 2019-07-01 以降で使用でき、特定の ipconfiguration が IPv4 か IPv6 かを表します。 既定値は IPv4 と見なされます。 使用可能な値は、'IPv4' と 'IPv6' です。

    Name Type Description
    IPv4
    • string
    IPv6
    • string

    KeyVaultKeyReference

    Key Vault キーへの参照について説明します

    Name Type Description
    keyUrl
    • string

    Key Vaultのキー暗号化キーを参照する URL。

    sourceVault

    キーを含むKey Vaultの相対 URL。

    KeyVaultSecretReference

    Key Vault シークレットへの参照について説明します

    Name Type Description
    secretUrl
    • string

    Key Vault内のシークレットを参照する URL。

    sourceVault

    シークレットを含むKey Vaultの相対 URL。

    LastPatchInstallationSummary

    最後にインストールされたパッチの概要のプロパティについて説明します。

    Name Type Description
    error

    操作の実行中に発生したエラー。 詳細配列には、それらのリストが含まれています。

    excludedPatchCount
    • integer

    使用可能なすべてのパッチの数。ただし、顧客が指定した除外リストの一致によって明示的に除外されます。

    failedPatchCount
    • integer

    インストールに失敗した修正プログラムの数。

    installationActivityId
    • string

    この結果を生成した操作のアクティビティ ID。 これは、CRP ログと拡張ログ間で相互に関連付けるために使用されます。

    installedPatchCount
    • integer

    正常にインストールされた修正プログラムの数。

    lastModifiedTime
    • string

    操作が開始されたときの UTC タイムスタンプ。

    maintenanceWindowExceeded
    • boolean

    操作が目的のすべてのアクションを完了する前に時間が不足したかどうかを説明します

    notSelectedPatchCount
    • integer

    分類または包含リストのエントリと一致しなかったため、使用可能なすべてのパッチの数がインストールされません。

    pendingPatchCount
    • integer

    パッチのインストール操作の過程でインストールされる予定のすべての利用可能なパッチの数。

    startTime
    • string

    操作が開始されたときの UTC タイムスタンプ。

    status

    操作の全体的な成功または失敗の状態。 操作が完了するまで "InProgress" のままです。 その時点で、"不明"、"失敗"、"成功"、または "CompletedWithWarnings" になります。

    LinuxConfiguration

    仮想マシン上の Linux オペレーティング システムの設定を指定します。

    サポートされている Linux ディストリビューションの一覧については、「Linux on Azure-Endorsed ディストリビューション」を参照してください。

    Name Type Description
    disablePasswordAuthentication
    • boolean

    パスワード認証を無効にするかどうかを指定します。

    patchSettings

    [プレビュー機能]Linux での VM ゲストパッチ適用に関連する設定を指定します。

    provisionVMAgent
    • boolean

    仮想マシン上に仮想マシン エージェントをプロビジョニングするかどうかを示します。

    このプロパティが要求本文で指定されていない場合、既定の動作では true に設定されます。 これにより、VM エージェントが VM にインストールされ、拡張機能を後で VM に追加できるようになります。

    ssh

    Linux OS の SSH キーの構成を指定します。

    LinuxPatchAssessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    Name Type Description
    AutomaticByPlatform
    • string
    ImageDefault
    • string

    LinuxPatchSettings

    Linux での VM ゲストパッチ適用に関連する設定を指定します。

    Name Type Description
    assessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    automaticByPlatformSettings

    Linux 上の VM ゲスト パッチのパッチ モード AutomaticByPlatform の追加設定を指定します。

    patchMode

    OrchestrationMode をフレキシブルとして使用して、IaaS 仮想マシンまたは仮想マシン スケール セットに関連付けられている仮想マシンに対する VM ゲスト パッチの適用モードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンの既定の修正プログラムの構成が使用されます。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 プロパティ provisionVMAgent は true である必要があります

    LinuxVMGuestPatchAutomaticByPlatformRebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    Name Type Description
    Always
    • string
    IfRequired
    • string
    Never
    • string
    Unknown
    • string

    LinuxVMGuestPatchAutomaticByPlatformSettings

    Linux のパッチ設定でパッチ モード AutomaticByPlatform が選択されている場合に適用する追加の設定を指定します。

    Name Type Description
    rebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    LinuxVMGuestPatchMode

    オーケストレーション モードをフレキシブルとして使用して、仮想マシン スケール セットに関連付けられている IaaS 仮想マシンまたは仮想マシンに対する VM ゲスト 修正プログラムの適用モードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンの既定の修正プログラムの構成が使用されます。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 プロパティ provisionVMAgent は true である必要があります

    Name Type Description
    AutomaticByPlatform
    • string
    ImageDefault
    • string

    MaintenanceOperationResultCodeTypes

    最後のメンテナンス操作の結果コード。

    Name Type Description
    MaintenanceAborted
    • string
    MaintenanceCompleted
    • string
    None
    • string
    RetryLater
    • string

    MaintenanceRedeployStatus

    メンテナンス操作の状態。

    Name Type Description
    isCustomerInitiatedMaintenanceAllowed
    • boolean

    True の 場合、顧客がメンテナンスを実行できます。

    lastOperationMessage
    • string

    最後のメンテナンス操作で返されたメッセージ。

    lastOperationResultCode

    最後のメンテナンス操作の結果コード。

    maintenanceWindowEndTime
    • string

    メンテナンス期間の終了時刻。

    maintenanceWindowStartTime
    • string

    メンテナンス期間の開始時刻。

    preMaintenanceWindowEndTime
    • string

    メンテナンス前期間の終了時刻。

    preMaintenanceWindowStartTime
    • string

    メンテナンス前期間の開始時刻。

    ManagedDiskParameters

    マネージド ディスクのパラメーター。

    Name Type Description
    diskEncryptionSet

    マネージド ディスクのカスタマー マネージド ディスク暗号化セットリソース ID を指定します。

    id
    • string

    リソース ID

    securityProfile

    マネージド ディスクのセキュリティ プロファイルを指定します。

    storageAccountType

    マネージド ディスクのストレージ アカウントの種類を指定します。 注: UltraSSD_LRSはデータ ディスクでのみ使用できます。OS ディスクでは使用できません。

    NetworkApiVersion

    は、ネットワーク インターフェイス構成でネットワーク リソースを作成するときに使用される Microsoft.Network API のバージョンを指定します

    Name Type Description
    2020-11-01
    • string

    NetworkInterfaceReference

    ネットワーク インターフェイス参照について説明します。

    Name Type Description
    id
    • string

    リソース ID

    properties.deleteOption

    VM が削除されたときのネットワーク インターフェイスの動作を指定する

    properties.primary
    • boolean

    仮想マシンに 1 つ以上のネットワーク インターフェイスがある場合のプライマリ ネットワーク インターフェイスを指定します。

    NetworkProfile

    仮想マシンのネットワーク インターフェイスまたはネットワーク構成を指定します。

    Name Type Description
    networkApiVersion

    は、ネットワーク インターフェイス構成でネットワーク リソースを作成するときに使用される Microsoft.Network API のバージョンを指定します

    networkInterfaceConfigurations

    仮想マシン ネットワーク リソースの作成に使用するネットワーク構成を指定します。

    networkInterfaces

    仮想マシンに関連付けられているネットワーク インターフェイスのリソース ID の一覧を指定します。

    OperatingSystemTypes

    このプロパティを使用すると、ユーザー イメージまたは特殊化された VHD から VM を作成する場合に、ディスクに含まれる OS の種類を指定できます。

    設定可能な値は、次のとおりです。

    Windows

    Linux

    Name Type Description
    Linux
    • string
    Windows
    • string

    OSDisk

    仮想マシンで使用されるオペレーティング システム ディスクに関する情報を指定します。

    ディスクの詳細については、「 Azure 仮想マシンのディスクと VHD について」を参照してください。

    Name Type Description
    caching

    キャッシュの要件を指定します。

    設定可能な値は、次のとおりです。

    なし

    ReadOnly

    ReadWrite

    既定値: Standard Storage の場合 はなし 。 プレミアム ストレージの ReadOnly

    createOption

    仮想マシンの作成方法を指定します。

    設定可能な値は、次のとおりです。

    アタッチ \u2013 この値は、特殊化されたディスクを使用して仮想マシンを作成するときに使用されます。

    FromImage \u2013 この値は、イメージを使用して仮想マシンを作成するときに使用されます。 プラットフォーム イメージを使用している場合は、上記の imageReference 要素も使用します。 Marketplace イメージを使用している場合は、前に説明した plan 要素も使用します。

    deleteOption

    VM の削除時に OS ディスクを削除するかデタッチするかを指定します。

    指定できる値

    削除 この値を使用すると、VM の削除時に OS ディスクが削除されます。

    デタッチ この値を使用すると、VM が削除された後も OS ディスクが保持されます。

    既定値はデタッチに設定 されます。 エフェメラル OS ディスクの場合、既定値は Delete に設定 されます。 ユーザーは、エフェメラル OS ディスクの削除オプションを変更できません。

    diffDiskSettings

    仮想マシンで使用されるオペレーティング システム ディスクのエフェメラル ディスク 設定を指定します。

    diskSizeGB
    • integer

    空のデータ ディスクのサイズをギガバイト単位で指定します。 この要素は、仮想マシン イメージ内のディスクのサイズを上書きするために使用できます。

    この値は 1023 GB を超えることはできません

    encryptionSettings

    OS ディスクの暗号化設定を指定します。

    最小 api-version: 2015-06-15

    image

    ソース ユーザー イメージの仮想ハード ディスク。 仮想ハード ディスクは、仮想マシンに接続される前にコピーされます。 SourceImage が指定されている場合、移行先の仮想ハード ドライブは存在しない必要があります。

    managedDisk

    マネージド ディスクのパラメーター。

    name
    • string

    ディスク名。

    osType

    このプロパティを使用すると、ユーザー イメージまたは特殊化された VHD から VM を作成する場合に、ディスクに含まれる OS の種類を指定できます。

    設定可能な値は、次のとおりです。

    Windows

    Linux

    vhd

    仮想ハード ディスク。

    writeAcceleratorEnabled
    • boolean

    ディスクで writeAccelerator を有効または無効にするかどうかを指定します。

    OSProfile

    仮想マシンのオペレーティング システム設定を指定します。 VM のプロビジョニング後に一部の設定を変更することはできません。

    Name Type Description
    adminPassword
    • string

    管理者アカウントのパスワードを指定します。

    最小長 (Windows): 8 文字

    最小長 (Linux): 6 文字

    最大長 (Windows): 123 文字

    最大長 (Linux): 72 文字

    複雑さの要件: 以下の 4 つの条件のうち 3 つを満たす必要がある
    文字が小さい
    上の文字を持つ
    数字を含む
    特殊文字があります (Regex match [\W_])

    許可されていない値: "abc@123"、"P@$$w 0rd"、"P@ssw0rd"、"P@ssword123"、"Pa$$word"、"pass@word1"、"Password!"、"Password1"、"Password22"、"iloveyou!"

    パスワードのリセットについては、「Windows VM でリモート デスクトップ サービスまたはそのログイン パスワードをリセットする方法」を参照してください。

    ルート パスワードのリセットについては、VMAccess 拡張機能を使用した Azure Linux VM でのユーザー、SSH の管理、ディスクの確認または修復に関するページを参照してください。

    adminUsername
    • string

    管理者アカウントの名前を指定します。

    VM の作成後にこのプロパティを更新することはできません。

    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 に設定できます。

    computerName
    • string

    仮想マシンのホスト OS 名を指定します。

    VM の作成後にこの名前を更新することはできません。

    最大長 (Windows): 15 文字

    最大長 (Linux): 64 文字。

    名前付け規則と制限については、 Azure インフラストラクチャ サービスの実装ガイドラインを参照してください

    customData
    • string

    カスタム データの Base 64 エンコード文字列を指定します。 Base 64 エンコード文字列は、仮想マシン上にファイルとして保存されるバイナリ配列にデコードされます。 バイナリ配列の長さは最大 65535 バイトです。

    注: customData プロパティでシークレットまたはパスワードを渡さないでください

    VM の作成後にこのプロパティを更新することはできません。

    customData は、ファイルとして保存される VM に渡されます。詳細については、「Azure VM 上のカスタム データ」を参照してください

    Linux VM に cloud-init を使用する方法については、「cloud-init を使用した作成時の Linux VM のカスタマイズ」を参照してください

    linuxConfiguration

    仮想マシン上の Linux オペレーティング システムの設定を指定します。

    サポートされている Linux ディストリビューションの一覧については、「Linux on Azure-Endorsed ディストリビューション」を参照してください。

    requireGuestProvisionSignal
    • boolean

    True に設定するか、省略する必要がある省略可能なプロパティ。

    secrets

    仮想マシンにインストールする必要がある証明書のセットを指定します。 仮想マシンに証明書をインストールするには、Linux 用の Azure Key Vault 仮想マシン拡張機能または Windows 用の Azure Key Vault 仮想マシン拡張機能を使用することをお勧めします。

    windowsConfiguration

    仮想マシン上の Windows オペレーティング システムの設定を指定します。

    PassNames

    パス名。 現時点で許容される値は OobeSystem のみです。

    Name Type Description
    OobeSystem
    • string

    PatchOperationStatus

    操作の全体的な成功または失敗の状態。 操作が完了するまで、"InProgress" のままです。 その時点で、"不明"、"Failed"、"Succeeded"、または "CompletedWithWarnings" になります。

    Name Type Description
    CompletedWithWarnings
    • string
    Failed
    • string
    InProgress
    • string
    Succeeded
    • string
    Unknown
    • string

    PatchSettings

    Windowsでの VM ゲストパッチ適用に関連する設定を指定します。

    Name Type Description
    assessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    automaticByPlatformSettings

    Windowsの VM ゲスト 修正プログラムの修正プログラム モード AutomaticByPlatform の追加設定を指定します。

    enableHotpatching
    • boolean

    お客様は、再起動を必要とせずに Azure VM にパッチを適用できます。 enableHotpatching の場合、'provisionVMAgent' を true に設定し、'patchMode' を 'AutomaticByPlatform' に設定する必要があります。

    patchMode

    OrchestrationMode をフレキシブルとして使用して、IaaS 仮想マシンまたは仮想マシン スケール セットに関連付けられている仮想マシンに対する VM ゲスト パッチの適用モードを指定します。

    設定可能な値は、次のとおりです。

    手動 - 仮想マシンへのパッチの適用を制御します。 これを行うには、VM 内でパッチを手動で適用します。 このモードでは、自動更新は無効になります。プロパティ WindowsConfiguration.enableAutomaticUpdates は false にする必要があります

    AutomaticByOS - 仮想マシンは OS によって自動的に更新されます。 WindowsConfiguration.enableAutomaticUpdates プロパティは true である必要があります。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 provisionVMAgent プロパティと WindowsConfiguration.enableAutomaticUpdates プロパティは true である必要があります

    Plan

    仮想マシンの作成に使用されるマーケットプレース イメージに関する情報を指定します。 この要素は、マーケットプレース イメージにのみ使用されます。 API からマーケットプレース イメージを使用する前に、プログラムで使用するためにイメージを有効にする必要があります。 Azure portalで、使用するマーケットプレース イメージを見つけて、[プログラムでデプロイする] をクリックします。はじめにします>。 必要な情報を入力し、[ 保存] をクリックします。

    Name Type Description
    name
    • string

    プラン ID。

    product
    • string

    マーケットプレースからのイメージの製品を指定します。 これは、imageReference 要素の下の Offer と同じ値です。

    promotionCode
    • string

    販売促進コード。

    publisher
    • string

    発行元 ID。

    ProtocolTypes

    WinRM リスナーのプロトコルを指定します。

    設定可能な値は、次のとおりです。
    http

    https

    Name Type Description
    Http
    • string
    Https
    • string

    PublicIPAddressSku

    パブリック IP SKU について説明します。 オーケストレーション モードは、フレキシブルとしてのみ設定できます。

    Name Type Description
    name

    パブリック IP SKU 名を指定する

    tier

    パブリック IP SKU レベルを指定する

    PublicIPAddressSkuName

    パブリック IP SKU 名を指定する

    Name Type Description
    Basic
    • string
    Standard
    • string

    PublicIPAddressSkuTier

    パブリック IP SKU レベルを指定する

    Name Type Description
    Global
    • string
    Regional
    • string

    PublicIPAllocationMethod

    パブリック IP 割り当ての種類を指定する

    Name Type Description
    Dynamic
    • string
    Static
    • string

    ResourceIdentityType

    仮想マシンに使用される ID の種類。 種類 "SystemAssigned、UserAssigned" には、暗黙的に作成された ID とユーザー割り当て ID のセットの両方が含まれます。 種類 'None' は、仮想マシンからすべての ID を削除します。

    Name Type Description
    None
    • string
    SystemAssigned
    • string
    SystemAssigned, UserAssigned
    • string
    UserAssigned
    • string

    ScheduledEventsProfile

    Name Type Description
    terminateNotificationProfile

    Terminate Scheduled Event 関連の構成を指定します。

    securityEncryptionTypes

    マネージド ディスクの EncryptionType を指定します。
    これは、VMGuestState BLOB と共にマネージド ディスクを暗号化するために DiskWithVMGuestState に設定され、VMGuestState BLOB のみを暗号化するための VMGuestStateOnly に設定されます。

    注: これは、機密 VM に対してのみ設定できます。

    Name Type Description
    DiskWithVMGuestState
    • string
    VMGuestStateOnly
    • string

    SecurityProfile

    仮想マシンまたは仮想マシン スケール セットのセキュリティ プロファイル設定を指定します。

    Name Type Description
    encryptionAtHost
    • boolean

    このプロパティは、仮想マシンまたは仮想マシン スケール セットの Host Encryption を有効または無効にするために、要求のユーザーが使用できます。 これにより、ホスト自体のリソース/一時ディスクを含むすべてのディスクの暗号化が有効になります。

    既定値: リソースに対してこのプロパティが true に設定されていない限り、ホストでの暗号化は無効になります。

    securityType

    仮想マシンの SecurityType を指定します。 UefiSettings を有効にするには、指定した値に設定する必要があります。

    既定値: このプロパティが設定されていない限り、UefiSettings は有効になりません。

    uefiSettings

    仮想マシンの作成時に使用されるセキュア ブートや vTPM などのセキュリティ設定を指定します。

    最小 API バージョン: 2020-12-01

    SecurityTypes

    仮想マシンの SecurityType を指定します。 UefiSettings を有効にするには、指定した値に設定する必要があります。

    既定値: このプロパティが設定されていない限り、UefiSettings は有効になりません。

    Name Type Description
    ConfidentialVM
    • string
    TrustedLaunch
    • string

    SettingNames

    コンテンツが適用される設定の名前を指定します。 使用できる値は、FirstLogonCommands と AutoLogon です。

    Name Type Description
    AutoLogon
    • string
    FirstLogonCommands
    • string

    SshConfiguration

    Azure で実行されている Linux ベースの VM の SSH 構成

    Name Type Description
    publicKeys

    Linux ベースの VM で認証するために使用される SSH 公開キーの一覧。

    SshPublicKey

    SSH 証明書の公開キーと、公開キーが配置されている Linux VM 上のパスに関する情報が含まれています。

    Name Type Description
    keyData
    • string

    SSH を使用して VM で認証するために使用される SSH 公開キー証明書。 キーは、少なくとも 2048 ビットで、ssh-rsa 形式である必要があります。

    ssh キーの作成については、「Azure での Linux および Mac for 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

    レベル コード。

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

    StorageAccountTypes

    マネージド ディスクのストレージ アカウントの種類を指定します。 注: UltraSSD_LRSはデータ ディスクでのみ使用できます。OS ディスクでは使用できません。

    Name Type Description
    PremiumV2_LRS
    • string
    Premium_LRS
    • string
    Premium_ZRS
    • string
    StandardSSD_LRS
    • string
    StandardSSD_ZRS
    • string
    Standard_LRS
    • string
    UltraSSD_LRS
    • string

    StorageProfile

    仮想マシンのストレージ設定を指定します。

    Name Type Description
    dataDisks

    仮想マシンにデータ ディスクを追加するために使用されるパラメーターを指定します。

    ディスクの詳細については、「 Azure 仮想マシンのディスクと VHD について」を参照してください。

    imageReference

    使用するイメージに関する情報を指定します。 プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージに関する情報を指定できます。 この要素は、プラットフォーム イメージ、マーケットプレース イメージ、または仮想マシン イメージを使用する場合に必要ですが、他の作成操作では使用されません。

    osDisk

    仮想マシンで使用されるオペレーティング システム ディスクに関する情報を指定します。

    ディスクの詳細については、「 Azure 仮想マシンのディスクと VHD について」を参照してください。

    SubResource

    Name Type Description
    id
    • string

    リソース ID

    TerminateNotificationProfile

    Name Type Description
    enable
    • boolean

    Terminate Scheduled イベントを有効にするか無効にするかを指定します。

    notBeforeTimeout
    • string

    削除する仮想マシンの構成可能な時間は、イベントが自動的に承認される (タイムアウト) 前に、スケジュールされた終了イベントを承認する必要がある可能性があります。 構成は ISO 8601 形式で指定する必要があります。既定値は 5 分 (PT5M) です

    UefiSettings

    仮想マシンの作成時に使用されるセキュア ブートや vTPM などのセキュリティ設定を指定します。

    最小 API バージョン: 2020-12-01

    Name Type Description
    secureBootEnabled
    • boolean

    仮想マシンでセキュア ブートを有効にするかどうかを指定します。

    最小 API バージョン: 2020-12-01

    vTpmEnabled
    • boolean

    仮想マシンで vTPM を有効にするかどうかを指定します。

    最小 API バージョン: 2020-12-01

    UserAssignedIdentities

    仮想マシンに関連付けられているユーザー ID の一覧。 ユーザー ID ディクショナリ キーの参照は、'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' という形式の ARM リソース ID になります。

    Name Type Description

    VaultCertificate

    Key Vault内の 1 つの証明書参照と、証明書が VM 上に存在する場所について説明します。

    Name Type Description
    certificateStore
    • string

    Windows VM の場合は、証明書を追加する仮想マシン上の証明書ストアを指定します。 指定された証明書ストアは、LocalMachine アカウントに暗黙的に含まれます。

    Linux VM の場合、証明書ファイルは /var/lib/waagent ディレクトリの下に配置され、X509 証明書ファイルのファイル名 <は UppercaseThumbprint.crt>、 <秘密キーの場合は UppercaseThumbprint.prv> になります。 これらのファイルはどちらも .pem 形式です。

    certificateUrl
    • string

    これは、シークレットとしてKey Vaultにアップロードされた証明書の URL です。 Key Vaultにシークレットを追加する方法については、「キー コンテナーにキーまたはシークレットを追加する」を参照してください。 この場合、証明書は、UTF-8 でエンコードされた次の JSON オブジェクトの Base64 エンコードである必要があります。

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    }
    仮想マシンに証明書をインストールするには、Linux 用の Azure Key Vault 仮想マシン拡張機能または Windows 用の Azure Key Vault 仮想マシン拡張機能を使用することをお勧めします。

    VaultSecretGroup

    すべて同じKey Vault内にある証明書のセットについて説明します。

    Name Type Description
    sourceVault

    VaultCertificates 内のすべての証明書を含むKey Vaultの相対 URL。

    vaultCertificates

    証明書を含む SourceVault 内のキー コンテナー参照の一覧。

    VirtualHardDisk

    ディスクの URI について説明します。

    Name Type Description
    uri
    • string

    仮想ハード ディスクの URI を指定します。

    VirtualMachine

    仮想マシンについて説明します。

    Name Type Description
    extendedLocation

    仮想マシンの拡張された場所。

    id
    • string

    リソース ID

    identity

    構成されている場合は、仮想マシンの ID。

    location
    • string

    リソースの場所

    name
    • string

    リソース名

    plan

    仮想マシンの作成に使用されるマーケットプレース イメージに関する情報を指定します。 この要素は、マーケットプレース イメージにのみ使用されます。 API からマーケットプレース イメージを使用する前に、プログラムで使用するためにイメージを有効にする必要があります。 Azure portalで、使用するマーケットプレース イメージを見つけて、[プログラムでデプロイする] をクリックします。はじめにします>。 必要な情報を入力し、[ 保存] をクリックします。

    properties.additionalCapabilities

    仮想マシンで有効または無効にする追加の機能を指定します。

    properties.applicationProfile

    VM/VMSS で使用できるようにするギャラリー アプリケーションを指定します。

    properties.availabilitySet

    仮想マシンを割り当てる必要がある可用性セットに関する情報を指定します。 同じ可用性セットで指定された仮想マシンは、可用性を最大化するために別々のノードに割り当てられます。 可用性セットの詳細については、「可用性 セットの概要」を参照してください。

    Azure の計画メンテナンスの詳細については、「Azure でのVirtual Machinesのメンテナンスと更新」を参照してください。

    現時点では、VM は作成時にのみ可用性セットに追加できます。 VM が追加される可用性セットは、可用性セット リソースと同じリソース グループの下に存在する必要があります。 既存の VM を可用性セットに追加することはできません。

    このプロパティは、null 以外の properties.virtualMachineScaleSet 参照と共に存在することはできません。

    properties.billingProfile

    Azure Spot 仮想マシンの課金関連の詳細を指定します。

    最小 API バージョン: 2019-03-01。

    properties.capacityReservation

    仮想マシンの割り当てに使用される容量予約に関する情報を指定します。

    最小 API バージョン: 2021-04-01。

    properties.diagnosticsProfile

    ブート診断設定の状態を指定します。

    最小 API バージョン: 2015-06-15。

    properties.evictionPolicy

    Azure Spot 仮想マシンと Azure スポット スケール セットの削除ポリシーを指定します。

    Azure Spot 仮想マシンでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2019-03-01 です。

    Azure スポット スケール セットでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2017-10-30-preview です。

    properties.extensionsTimeBudget
    • string

    すべての拡張機能の開始時間を指定します。 期間は 15 分から 120 分 (両端を含む) で、ISO 8601 形式で指定する必要があります。 既定値は 90 分 (PT1H30M) です。

    最小 api-version: 2020-06-01

    properties.hardwareProfile

    仮想マシンのハードウェア設定を指定します。

    properties.host

    仮想マシンが存在する専用ホストに関する情報を指定します。

    最小 API バージョン: 2018-10-01。

    properties.hostGroup

    仮想マシンが存在する専用ホスト グループに関する情報を指定します。

    最小 API バージョン: 2020-06-01。

    注: ユーザーは、host プロパティと hostGroup プロパティの両方を指定できません。

    properties.instanceView

    仮想マシン インスタンス ビュー。

    properties.licenseType
    • string

    使用されているイメージまたはディスクがオンプレミスでライセンスされていることを指定します。

    Windows Server オペレーティング システムで使用できる値は次のとおりです。

    Windows_Client

    Windows_Server

    Linux Server オペレーティング システムで使用できる値は次のとおりです。

    RHEL_BYOS (RHEL の場合)

    SLES_BYOS (SUSE の場合)

    詳細については、「Windows Server の Azure ハイブリッド使用特典」を参照してください。

    Linux Server 向けの Azure ハイブリッド使用特典

    最小 api-version: 2015-06-15

    properties.networkProfile

    仮想マシンのネットワーク インターフェイスを指定します。

    properties.osProfile

    仮想マシンの作成時に使用されるオペレーティング システム設定を指定します。 VM のプロビジョニング後に一部の設定を変更することはできません。

    properties.platformFaultDomain
    • integer

    仮想マシンを作成するスケール セットの論理障害ドメインを指定します。 既定では、仮想マシンは、使用可能な障害ドメイン間のバランスを最適に維持する障害ドメインに自動的に割り当てられます。

  • これは、この仮想マシンの 'virtualMachineScaleSet' プロパティが設定されている場合にのみ適用されます。
  • 参照される仮想マシン スケール セットには、"platformFaultDomainCount" 1 が > 必要です。
  • このプロパティは、仮想マシンが作成された後は更新できません。
  • 障害ドメインの割り当ては、仮想マシン インスタンス ビューで表示できます。

    最小 api-version: 2020‐12‐01

  • properties.priority

    仮想マシンの優先順位を指定します。

    最小 api-version: 2019-03-01

    properties.provisioningState
    • string

    プロビジョニング状態。応答にのみ表示されます。

    properties.proximityPlacementGroup

    仮想マシンを割り当てる近接配置グループに関する情報を指定します。

    最小 API バージョン: 2018-04-01。

    properties.scheduledEventsProfile

    スケジュールされたイベントに関連する構成を指定します。

    properties.securityProfile

    仮想マシンのセキュリティ関連のプロファイル設定を指定します。

    properties.storageProfile

    仮想マシンのストレージ設定を指定します。

    properties.timeCreated
    • string

    仮想マシン リソースが作成された時刻を指定します。

    最小 API バージョン: 2022-03-01。

    properties.userData
    • string

    VM の UserData。base-64 でエンコードする必要があります。 お客様は、ここにシークレットを渡さないでください。

    最小 api-version: 2021-03-01

    properties.virtualMachineScaleSet

    仮想マシンを割り当てる仮想マシン スケール セットに関する情報を指定します。 同じ仮想マシン スケール セットで指定された仮想マシンは、可用性を最大化するために異なるノードに割り当てられます。 現時点では、VM は作成時にのみ仮想マシン スケール セットに追加できます。 既存の VM を仮想マシン スケール セットに追加することはできません。

    このプロパティは、null 以外の properties.availabilitySet 参照と共に存在することはできません。

    最小 api-version: 2019‐03‐01

    properties.vmId
    • string

    すべての Azure IaaS VM SMBIOS でエンコードおよび格納され、プラットフォーム BIOS コマンドを使用して読み取ることができる 128 ビット識別子である VM の一意の ID を指定します。

    resources

    仮想マシンの子拡張機能リソース。

    tags
    • object

    リソース タグ

    type
    • string

    リソースの種類

    zones
    • string[]

    仮想マシン ゾーン。

    VirtualMachineAgentInstanceView

    仮想マシンで実行されている VM エージェントのインスタンス ビュー。

    Name Type Description
    extensionHandlers

    仮想マシン拡張機能ハンドラーインスタンス ビュー。

    statuses

    リソースの状態情報。

    vmAgentVersion
    • string

    VM エージェントのフル バージョン。

    VirtualMachineEvictionPolicyTypes

    Azure Spot 仮想マシンと Azure スポット スケール セットの削除ポリシーを指定します。

    Azure Spot 仮想マシンでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2019-03-01 です。

    Azure スポット スケール セットでは、"割り当て解除" と "削除" の両方がサポートされており、API の最小バージョンは 2017-10-30-preview です。

    Name Type Description
    Deallocate
    • string
    Delete
    • string

    VirtualMachineExtension

    仮想マシン拡張機能について説明します。

    Name Type Description
    id
    • string

    リソース ID

    location
    • string

    リソースの場所

    name
    • string

    リソース名

    properties.autoUpgradeMinorVersion
    • boolean

    展開時に利用可能な場合に、拡張機能で新しいマイナー バージョンを使用する必要があるかどうかを示します。 ただし、デプロイされると、このプロパティが true に設定されていても、再デプロイされない限り、拡張機能でマイナー バージョンのアップグレードは行われません。

    properties.enableAutomaticUpgrade
    • boolean

    使用可能な拡張機能の新しいバージョンがある場合に、拡張機能をプラットフォームによって自動的にアップグレードするかどうかを示します。

    properties.forceUpdateTag
    • string

    拡張機能の構成が変更されていない場合でも、拡張機能ハンドラーを強制的に更新する方法。

    properties.instanceView

    仮想マシン拡張機能インスタンス ビュー。

    properties.protectedSettings
    • object

    拡張機能には、protectedSettings または protectedSettingsFromKeyVault を含めることができます。保護された設定はまったく含めずにかまいません。

    properties.protectedSettingsFromKeyVault
    • object

    参照渡しで渡され、キー コンテナーから使用される拡張機能で保護された設定

    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

    リソースの種類

    VirtualMachineExtensionHandlerInstanceView

    仮想マシン拡張機能ハンドラーのインスタンス ビュー。

    Name Type Description
    status

    拡張機能ハンドラーの状態。

    type
    • string

    拡張機能の型を指定します。たとえば、"CustomScriptExtension" です。

    typeHandlerVersion
    • string

    スクリプト ハンドラーのバージョンを指定します。

    VirtualMachineExtensionInstanceView

    仮想マシン拡張機能のインスタンス ビュー。

    Name Type Description
    name
    • string

    仮想マシン拡張機能の名前。

    statuses

    リソースの状態情報。

    substatuses

    リソースの状態情報。

    type
    • string

    拡張機能の型を指定します。たとえば、"CustomScriptExtension" です。

    typeHandlerVersion
    • string

    スクリプト ハンドラーのバージョンを指定します。

    VirtualMachineHealthStatus

    VM の正常性状態。

    Name Type Description
    status

    VM の正常性状態情報。

    VirtualMachineIdentity

    仮想マシンの ID。

    Name Type Description
    principalId
    • string

    仮想マシン ID のプリンシパル ID。 このプロパティは、システム割り当て ID に対してのみ提供されます。

    tenantId
    • string

    仮想マシンに関連付けられているテナント ID。 このプロパティは、システム割り当て ID に対してのみ提供されます。

    type

    仮想マシンに使用される ID の種類。 種類 "SystemAssigned、UserAssigned" には、暗黙的に作成された ID とユーザー割り当て ID のセットの両方が含まれます。 種類 'None' は、仮想マシンからすべての ID を削除します。

    userAssignedIdentities

    仮想マシンに関連付けられているユーザー ID の一覧。 ユーザー ID ディクショナリ キーの参照は、'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' という形式の ARM リソース ID になります。

    VirtualMachineInstanceView

    仮想マシンのインスタンス ビュー。

    Name Type Description
    assignedHost
    • string

    自動配置が有効になっている専用ホスト グループに仮想マシンが関連付けられている場合に、自動配置によって仮想マシンが割り当てられる専用ホストのリソース ID。

    最小 API バージョン: 2020-06-01。

    bootDiagnostics

    ブート診断は、コンソール出力とスクリーンショットを表示して VM の状態を診断できるデバッグ機能です。

    コンソール ログの出力を簡単に表示できます。

    また、Azure では、ハイパーバイザーから VM のスクリーンショットを表示することもできます。

    computerName
    • string

    仮想マシンに割り当てられたコンピューター名。

    disks

    仮想マシンのディスク情報。

    extensions

    拡張機能の情報。

    hyperVGeneration

    リソースに関連付けられている HyperVGeneration の種類を指定します

    maintenanceRedeployStatus

    仮想マシンのメンテナンス操作の状態。

    osName
    • string

    仮想マシンで実行されているオペレーティング システム。

    osVersion
    • string

    仮想マシンで実行されているオペレーティング システムのバージョン。

    patchStatus

    [プレビュー機能]仮想マシンのパッチ操作の状態。

    platformFaultDomain
    • integer

    仮想マシンの障害ドメインを指定します。

    platformUpdateDomain
    • integer

    仮想マシンの更新ドメインを指定します。

    rdpThumbPrint
    • string

    リモート デスクトップ証明書の拇印。

    statuses

    リソースの状態情報。

    vmAgent

    仮想マシンで実行されている VM エージェント。

    vmHealth

    VM の正常性状態。

    VirtualMachineIpTag

    パブリック IP アドレスに関連付けられている IP タグが含まれています。

    Name Type Description
    ipTagType
    • string

    IP タグの種類。 例: FirstPartyUsage。

    tag
    • string

    パブリック IP に関連付けられている IP タグ。 例: SQL、Storageなど。

    VirtualMachineNetworkInterfaceConfiguration

    仮想マシンのネットワーク インターフェイスの構成について説明します。

    Name Type Description
    name
    • string

    ネットワーク インターフェイスの構成名。

    properties.deleteOption

    VM が削除されたときのネットワーク インターフェイスの動作を指定する

    properties.dnsSettings

    ネットワーク インターフェイスに適用される DNS 設定。

    properties.dscpConfiguration
    properties.enableAcceleratedNetworking
    • boolean

    ネットワーク インターフェイスが高速ネットワーク対応かどうかを指定します。

    properties.enableFpga
    • boolean

    ネットワーク インターフェイスが FPGA ネットワーク対応かどうかを指定します。

    properties.enableIPForwarding
    • boolean

    この NIC で IP 転送が有効になっているかどうか。

    properties.ipConfigurations

    ネットワーク インターフェイスの IP 構成を指定します。

    properties.networkSecurityGroup

    ネットワーク セキュリティ グループ。

    properties.primary
    • boolean

    仮想マシンに 1 つ以上のネットワーク インターフェイスがある場合のプライマリ ネットワーク インターフェイスを指定します。

    VirtualMachineNetworkInterfaceDnsSettingsConfiguration

    仮想マシンのネットワーク構成の DNS 設定について説明します。

    Name Type Description
    dnsServers
    • string[]

    DNS サーバーの IP アドレスの一覧

    VirtualMachineNetworkInterfaceIPConfiguration

    仮想マシン ネットワーク プロファイルの IP 構成について説明します。

    Name Type Description
    name
    • string

    IP 構成名。

    properties.applicationGatewayBackendAddressPools

    アプリケーション ゲートウェイのバックエンド アドレス プールへの参照の配列を指定します。 仮想マシンは、複数のアプリケーション ゲートウェイのバックエンド アドレス プールを参照できます。 複数の仮想マシンで同じアプリケーション ゲートウェイを使用することはできません。

    properties.applicationSecurityGroups

    アプリケーション セキュリティ グループへの参照の配列を指定します。

    properties.loadBalancerBackendAddressPools

    ロード バランサーのバックエンド アドレス プールへの参照の配列を指定します。 仮想マシンは、1 つのパブリック ロード バランサーと 1 つの内部ロード バランサーのバックエンド アドレス プールを参照できます。 [複数の仮想マシンで同じ Basic SKU ロード バランサーを使用できません]。

    properties.primary
    • boolean

    仮想マシンに 1 つ以上のネットワーク インターフェイスがある場合のプライマリ ネットワーク インターフェイスを指定します。

    properties.privateIPAddressVersion

    Api-Version 2017-03-30 以降で使用でき、特定の ipconfiguration が IPv4 か IPv6 かを表します。 既定値は IPv4 です。 使用可能な値は、'IPv4' と 'IPv6' です。

    properties.publicIPAddressConfiguration

    publicIPAddressConfiguration。

    properties.subnet

    サブネットの識別子を指定します。

    VirtualMachinePatchStatus

    仮想マシンのパッチ操作の状態。

    Name Type Description
    availablePatchSummary

    仮想マシンの最新の評価操作の利用可能なパッチの概要。

    configurationStatuses

    指定した patchMode の有効化状態

    lastPatchInstallationSummary

    仮想マシンの最新のインストール操作のインストールの概要。

    VirtualMachinePriorityTypes

    仮想マシンの優先順位を指定します。

    最小 api-version: 2019-03-01

    Name Type Description
    Low
    • string
    Regular
    • string
    Spot
    • string

    VirtualMachinePublicIPAddressConfiguration

    仮想マシンの IP 構成の PublicIPAddress 構成について説明します

    Name Type Description
    name
    • string

    publicIP アドレス構成名。

    properties.deleteOption

    VM が削除されたときのパブリック IP アドレスの動作を指定する

    properties.dnsSettings

    publicIP アドレスに適用する DNS 設定。

    properties.idleTimeoutInMinutes
    • integer

    パブリック IP アドレスのアイドル タイムアウト。

    properties.ipTags

    パブリック IP アドレスに関連付けられている IP タグの一覧。

    properties.publicIPAddressVersion

    Api-Version 2019-07-01 以降で使用でき、特定の ipconfiguration が IPv4 か IPv6 かを表します。 既定値は IPv4 と見なされます。 使用可能な値は、'IPv4' と 'IPv6' です。

    properties.publicIPAllocationMethod

    パブリック IP 割り当ての種類を指定する

    properties.publicIPPrefix

    publicIP アドレスの割り当て元となる PublicIPPrefix。

    sku

    パブリック IP SKU について説明します。 オーケストレーション モードは、フレキシブルとしてのみ設定できます。

    VirtualMachinePublicIPAddressDnsSettingsConfiguration

    仮想マシン ネットワーク構成の DNS 設定について説明します。

    Name Type Description
    domainNameLabel
    • string

    作成される PublicIPAddress リソースのドメイン名ラベル プレフィックス。 生成された名前ラベルは、ドメイン名ラベルと VM ネットワーク プロファイルの一意 ID の連結です。

    VirtualMachineSizeTypes

    仮想マシンのサイズを指定します。

    列挙型データ型は現在非推奨であり、2023 年 12 月 23 日までに削除される予定です。

    使用可能なサイズの一覧を取得するには、次の API を使用することをお勧めします。

    可用性セットで使用可能なすべての仮想マシン サイズを一覧表示する

    リージョンで使用可能なすべての仮想マシン サイズを一覧表示する

    サイズ変更に使用できるすべての仮想マシン サイズを一覧表示します。 仮想マシンのサイズの詳細については、「仮想 マシンのサイズ」を参照してください。

    使用可能な VM サイズは、リージョンと可用性セットによって異なります。

    Name Type Description
    Basic_A0
    • string
    Basic_A1
    • string
    Basic_A2
    • string
    Basic_A3
    • string
    Basic_A4
    • string
    Standard_A0
    • string
    Standard_A1
    • string
    Standard_A10
    • string
    Standard_A11
    • string
    Standard_A1_v2
    • string
    Standard_A2
    • string
    Standard_A2_v2
    • string
    Standard_A2m_v2
    • string
    Standard_A3
    • string
    Standard_A4
    • string
    Standard_A4_v2
    • string
    Standard_A4m_v2
    • string
    Standard_A5
    • string
    Standard_A6
    • string
    Standard_A7
    • string
    Standard_A8
    • string
    Standard_A8_v2
    • string
    Standard_A8m_v2
    • string
    Standard_A9
    • string
    Standard_B1ms
    • string
    Standard_B1s
    • string
    Standard_B2ms
    • string
    Standard_B2s
    • string
    Standard_B4ms
    • string
    Standard_B8ms
    • string
    Standard_D1
    • string
    Standard_D11
    • string
    Standard_D11_v2
    • string
    Standard_D12
    • string
    Standard_D12_v2
    • string
    Standard_D13
    • string
    Standard_D13_v2
    • string
    Standard_D14
    • string
    Standard_D14_v2
    • string
    Standard_D15_v2
    • string
    Standard_D16_v3
    • string
    Standard_D16s_v3
    • string
    Standard_D1_v2
    • string
    Standard_D2
    • string
    Standard_D2_v2
    • string
    Standard_D2_v3
    • string
    Standard_D2s_v3
    • string
    Standard_D3
    • string
    Standard_D32_v3
    • string
    Standard_D32s_v3
    • string
    Standard_D3_v2
    • string
    Standard_D4
    • string
    Standard_D4_v2
    • string
    Standard_D4_v3
    • string
    Standard_D4s_v3
    • string
    Standard_D5_v2
    • string
    Standard_D64_v3
    • string
    Standard_D64s_v3
    • string
    Standard_D8_v3
    • string
    Standard_D8s_v3
    • string
    Standard_DS1
    • string
    Standard_DS11
    • string
    Standard_DS11_v2
    • string
    Standard_DS12
    • string
    Standard_DS12_v2
    • string
    Standard_DS13
    • string
    Standard_DS13-2_v2
    • string
    Standard_DS13-4_v2
    • string
    Standard_DS13_v2
    • string
    Standard_DS14
    • string
    Standard_DS14-4_v2
    • string
    Standard_DS14-8_v2
    • string
    Standard_DS14_v2
    • string
    Standard_DS15_v2
    • string
    Standard_DS1_v2
    • string
    Standard_DS2
    • string
    Standard_DS2_v2
    • string
    Standard_DS3
    • string
    Standard_DS3_v2
    • string
    Standard_DS4
    • string
    Standard_DS4_v2
    • string
    Standard_DS5_v2
    • string
    Standard_E16_v3
    • string
    Standard_E16s_v3
    • string
    Standard_E2_v3
    • string
    Standard_E2s_v3
    • string
    Standard_E32-16_v3
    • string
    Standard_E32-8s_v3
    • string
    Standard_E32_v3
    • string
    Standard_E32s_v3
    • string
    Standard_E4_v3
    • string
    Standard_E4s_v3
    • string
    Standard_E64-16s_v3
    • string
    Standard_E64-32s_v3
    • string
    Standard_E64_v3
    • string
    Standard_E64s_v3
    • string
    Standard_E8_v3
    • string
    Standard_E8s_v3
    • string
    Standard_F1
    • string
    Standard_F16
    • string
    Standard_F16s
    • string
    Standard_F16s_v2
    • string
    Standard_F1s
    • string
    Standard_F2
    • string
    Standard_F2s
    • string
    Standard_F2s_v2
    • string
    Standard_F32s_v2
    • string
    Standard_F4
    • string
    Standard_F4s
    • string
    Standard_F4s_v2
    • string
    Standard_F64s_v2
    • string
    Standard_F72s_v2
    • string
    Standard_F8
    • string
    Standard_F8s
    • string
    Standard_F8s_v2
    • string
    Standard_G1
    • string
    Standard_G2
    • string
    Standard_G3
    • string
    Standard_G4
    • string
    Standard_G5
    • string
    Standard_GS1
    • string
    Standard_GS2
    • string
    Standard_GS3
    • string
    Standard_GS4
    • string
    Standard_GS4-4
    • string
    Standard_GS4-8
    • string
    Standard_GS5
    • string
    Standard_GS5-16
    • string
    Standard_GS5-8
    • string
    Standard_H16
    • string
    Standard_H16m
    • string
    Standard_H16mr
    • string
    Standard_H16r
    • string
    Standard_H8
    • string
    Standard_H8m
    • string
    Standard_L16s
    • string
    Standard_L32s
    • string
    Standard_L4s
    • string
    Standard_L8s
    • string
    Standard_M128-32ms
    • string
    Standard_M128-64ms
    • string
    Standard_M128ms
    • string
    Standard_M128s
    • string
    Standard_M64-16ms
    • string
    Standard_M64-32ms
    • string
    Standard_M64ms
    • string
    Standard_M64s
    • string
    Standard_NC12
    • string
    Standard_NC12s_v2
    • string
    Standard_NC12s_v3
    • string
    Standard_NC24
    • string
    Standard_NC24r
    • string
    Standard_NC24rs_v2
    • string
    Standard_NC24rs_v3
    • string
    Standard_NC24s_v2
    • string
    Standard_NC24s_v3
    • string
    Standard_NC6
    • string
    Standard_NC6s_v2
    • string
    Standard_NC6s_v3
    • string
    Standard_ND12s
    • string
    Standard_ND24rs
    • string
    Standard_ND24s
    • string
    Standard_ND6s
    • string
    Standard_NV12
    • string
    Standard_NV24
    • string
    Standard_NV6
    • string

    VMDiskSecurityProfile

    マネージド ディスクのセキュリティ プロファイル設定を指定します。

    注: 機密 VM にのみ設定できます

    Name Type Description
    diskEncryptionSet

    カスタマー マネージド キーで暗号化された ConfidentialVM OS ディスクと VMGuest BLOB に使用されるマネージド ディスクのカスタマー マネージド ディスク暗号化セット リソース ID を指定します。

    securityEncryptionType

    マネージド ディスクの EncryptionType を指定します。
    マネージド ディスクを VMGuestState BLOB と共に暗号化する場合は DiskWithVMGuestState に、VMGuestState BLOB のみを暗号化する場合は VMGuestStateOnly に設定されます。

    注: これは機密 VM にのみ設定できます。

    VMGalleryApplication

    コンピューティング ギャラリー アプリケーションのバージョンを参照するために必要な情報を指定します

    Name Type Description
    configurationReference
    • string

    省略可能。指定された場合にパッケージの既定の構成を置き換える Azure BLOB の URI を指定します。

    enableAutomaticUpgrade
    • boolean

    true に設定すると、PIR/SIG で新しいギャラリー アプリケーション バージョンが使用可能になると、VM/VMSS に対して自動的に更新されます

    order
    • integer

    省略可能。パッケージをインストールする必要がある順序を指定します。

    packageReferenceId
    • string

    /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} の形式で GalleryApplicationVersion リソース ID を指定します。

    tags
    • string

    省略可能。より汎用的なコンテキストのパススルー値を指定します。

    treatFailureAsDeploymentFailure
    • boolean

    省略可能。true の場合、VmApplication の操作に対するエラーはデプロイに失敗します

    VMSizeProperties

    仮想マシンの VM サイズ プロパティの設定を指定します。

    Name Type Description
    vCPUsAvailable
    • integer

    VM で使用できる vCPU の数を指定します。

    このプロパティが要求本文で指定されていない場合、既定の動作は、 リージョン内の使用可能なすべての仮想マシン サイズを一覧表示 する API 応答で公開される VM サイズに対して使用可能な vCPU の値に設定することです。

    vCPUsPerCore
    • integer

    vCPU と物理コアの比率を指定します。

    要求本文でこのプロパティが指定されていない場合、既定の動作は、リージョン内の使用可能なすべての仮想マシン サイズを一覧表示する API 応答で公開される VM サイズの vCPUUsPerCore の値に設定されます

    このプロパティを 1 に設定すると、ハイパースレッディングが無効になります。

    WindowsConfiguration

    仮想マシン上の Windows オペレーティング システムの設定を指定します。

    Name Type Description
    additionalUnattendContent

    Windows セットアップで使用される、Unattend.xml ファイルに含めることができる追加の Base 64 でエンコードされた XML 形式の情報を指定します。

    enableAutomaticUpdates
    • boolean

    Windows仮想マシンに対して自動更新が有効かどうかを示します。 既定値は true です。

    仮想マシン スケール セットの場合、このプロパティを更新でき、更新は OS の再プロビジョニングで有効になります。

    patchSettings

    [プレビュー機能]Windowsでの VM ゲストパッチ適用に関連する設定を指定します。

    provisionVMAgent
    • boolean

    仮想マシン上に仮想マシン エージェントをプロビジョニングするかどうかを示します。

    このプロパティが要求本文で指定されていない場合、既定の動作では true に設定されます。 これにより、VM エージェントが VM にインストールされ、拡張機能を後で VM に追加できるようになります。

    timeZone
    • string

    仮想マシンのタイム ゾーンを指定します。 例: "Pacific Standard Time"。

    指定できる値は、TimeZoneInfo.GetSystemTimeZones によって返されるタイム ゾーンから値を TimeZoneInfo.Id できます。

    winRM

    Windowsリモート管理リスナーを指定します。 これによって、リモートの Windows PowerShell が有効になります。

    WindowsPatchAssessmentMode

    IaaS 仮想マシンの VM ゲスト パッチ評価のモードを指定します。

    設定可能な値は、次のとおりです。

    ImageDefault - 仮想マシンでのパッチ評価のタイミングを制御します。

    AutomaticByPlatform - プラットフォームは定期的なパッチ評価をトリガーします。 プロパティ provisionVMAgent は true である必要があります。

    Name Type Description
    AutomaticByPlatform
    • string
    ImageDefault
    • string

    WindowsVMGuestPatchAutomaticByPlatformRebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    Name Type Description
    Always
    • string
    IfRequired
    • string
    Never
    • string
    Unknown
    • string

    WindowsVMGuestPatchAutomaticByPlatformSettings

    パッチ設定でパッチ モード AutomaticByPlatform が選択されている場合に適用する追加の設定Windows指定します。

    Name Type Description
    rebootSetting

    AutomaticByPlatform のすべてのパッチ インストール操作の再起動設定を指定します。

    WindowsVMGuestPatchMode

    OrchestrationMode をフレキシブルとして使用して、IaaS 仮想マシンまたは仮想マシン スケール セットに関連付けられている仮想マシンに対する VM ゲスト パッチの適用モードを指定します。

    設定可能な値は、次のとおりです。

    手動 - 仮想マシンへのパッチの適用を制御します。 これを行うには、VM 内でパッチを手動で適用します。 このモードでは、自動更新は無効になります。プロパティ WindowsConfiguration.enableAutomaticUpdates は false である必要があります

    AutomaticByOS - 仮想マシンは OS によって自動的に更新されます。 WindowsConfiguration.enableAutomaticUpdates プロパティは true である必要があります。

    AutomaticByPlatform - 仮想マシンはプラットフォームによって自動的に更新されます。 プロパティ provisionVMAgent と WindowsConfiguration.enableAutomaticUpdates は true である必要があります

    Name Type Description
    AutomaticByOS
    • string
    AutomaticByPlatform
    • string
    Manual
    • string

    WinRMConfiguration

    VM のリモート管理構成Windowsについて説明します

    Name Type Description
    listeners

    Windows リモート管理リスナーの一覧

    WinRMListener

    Windows リモート管理リスナーのプロトコルと拇印について説明します

    Name Type Description
    certificateUrl
    • string

    これは、シークレットとしてKey Vaultにアップロードされた証明書の URL です。 Key Vaultにシークレットを追加する方法については、「キー コンテナーにキーまたはシークレットを追加する」を参照してください。 この場合、証明書は、UTF-8 でエンコードされた次の JSON オブジェクトの Base64 エンコードである必要があります。

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    }
    仮想マシンに証明書をインストールするには、Linux 用の Azure Key Vault 仮想マシン拡張機能を使用するか、Windows用の Azure Key Vault仮想マシン拡張機能を使用することをお勧めします。

    protocol

    WinRM リスナーのプロトコルを指定します。

    設定可能な値は、次のとおりです。
    http

    https