diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithServiceArtifactReference.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithServiceArtifactReference.json new file mode 100644 index 000000000000..b3887ee74702 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithServiceArtifactReference.json @@ -0,0 +1,227 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmScaleSetName": "{vmss-name}", + "api-version": "2022-11-01", + "parameters": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_A1" + }, + "location": "eastus2euap", + "properties": { + "overprovision": true, + "virtualMachineProfile": { + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "sku": "2022-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "osDisk" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "adminPassword": "{your-password}" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ] + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic", + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + } + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_A1" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": true, + "overprovision": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "virtualMachineProfile": { + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "sku": "2022-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "name": "osDisk", + "createOption": "FromImage" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic", + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + } + }, + "provisioningState": "Creating" + }, + "location": "eastus2euap", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + }, + "201": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_A1" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": true, + "overprovision": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "virtualMachineProfile": { + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "sku": "2022-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "name": "osDisk", + "createOption": "FromImage" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + } + }, + "upgradePolicy": { + "mode": "Automatic", + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + } + }, + "provisioningState": "Creating" + }, + "location": "eastus2euap", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineScaleSet.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineScaleSet.json index 162b2444226a..a56d6b8f9638 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineScaleSet.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineScaleSet.json @@ -248,6 +248,9 @@ }, "Create a scale set where nic config has DisableTcpStateTracking property": { "$ref": "./examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_FromWithDisableTcpStateTrackingNetworkInterface.json" + }, + "Create a scale set with Service Artifact Reference": { + "$ref": "./examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithServiceArtifactReference.json" } } }, @@ -4700,6 +4703,10 @@ "hardwareProfile": { "$ref": "#/definitions/VirtualMachineScaleSetHardwareProfile", "description": "Specifies the hardware profile related details of a scale set.

Minimum api-version: 2021-11-01." + }, + "serviceArtifactReference": { + "$ref": "#/definitions/ServiceArtifactReference", + "description": "Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01" } }, "description": "Describes a virtual machine scale set virtual machine profile." @@ -5758,6 +5765,15 @@ "serviceName", "action" ] + }, + "ServiceArtifactReference": { + "properties": { + "id": { + "type": "string", + "description": "The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}" + } + }, + "description": "Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01" } } }