diff --git a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs index 648d41a22203..2fec19cc5a52 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/samples/Generated/Samples/Sample_VirtualMachineScaleSetCollection.cs @@ -3737,7 +3737,7 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy() { Name = "Standard_A8m_v2", Tier = "Standard", - Capacity = 10L, + Capacity = 2L, }, VirtualMachineProfile = new VirtualMachineScaleSetVmProfile() { @@ -3751,12 +3751,12 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy() { ImageReference = new ImageReference() { - Publisher = "MicrosoftWindowsServer", - Offer = "WindowsServer", - Sku = "2016-Datacenter", + Publisher = "Canonical", + Offer = "0001-com-ubuntu-server-focal", + Sku = "20_04-lts-gen2", Version = "latest", }, - OSDisk = new VirtualMachineScaleSetOSDisk(DiskCreateOptionType.FromImage) + OSDisk = new VirtualMachineScaleSetOSDisk(new DiskCreateOptionType("fromImage")) { Caching = CachingType.ReadWrite, ManagedDisk = new VirtualMachineScaleSetManagedDisk() @@ -3772,26 +3772,37 @@ public async Task CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy() new VirtualMachineScaleSetNetworkConfiguration("{vmss-name}") { Primary = true, +EnableAcceleratedNetworking = false, IPConfigurations = { new VirtualMachineScaleSetIPConfiguration("{vmss-name}") { SubnetId = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"), +Primary = true, +PublicIPAddressConfiguration = new VirtualMachineScaleSetPublicIPAddressConfiguration("{vmss-name}") +{ +IdleTimeoutInMinutes = 15, +}, +ApplicationGatewayBackendAddressPools = +{ +}, +LoadBalancerBackendAddressPools = +{ +}, } }, EnableIPForwarding = true, } }, + NetworkApiVersion = NetworkApiVersion.TwoThousandTwenty1101, }, - Priority = VirtualMachinePriorityType.Spot, - EvictionPolicy = VirtualMachineEvictionPolicyType.Deallocate, - BillingMaxPrice = -1, + Priority = new VirtualMachinePriorityType("spot"), }, - SinglePlacementGroup = false, + PlatformFaultDomainCount = 1, OrchestrationMode = OrchestrationMode.Flexible, PriorityMixPolicy = new VirtualMachineScaleSetPriorityMixPolicy() { - BaseRegularPriorityCount = 4, + BaseRegularPriorityCount = 10, RegularPriorityPercentageAboveBase = 50, }, }; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs index 195d2f33d442..195735ae1fcc 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs @@ -825,7 +825,7 @@ public static BootDiagnosticsInstanceView BootDiagnosticsInstanceView(Uri consol /// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. /// Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. /// A new instance for mocking. public static VirtualMachineDataDisk VirtualMachineDataDisk(int lun = default, string name = null, Uri vhdUri = null, Uri imageUri = null, CachingType? caching = null, bool? writeAcceleratorEnabled = null, DiskCreateOptionType createOption = default, int? diskSizeGB = null, VirtualMachineManagedDisk managedDisk = null, ResourceIdentifier sourceResourceId = null, bool? toBeDetached = null, long? diskIopsReadWrite = null, long? diskMBpsReadWrite = null, DiskDetachOptionType? detachOption = null, DiskDeleteOptionType? deleteOption = null) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs index c4ee7b0f6658..00dcd41b8649 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDetachOptionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. public readonly partial struct DiskDetachOptionType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs index 9be76cb9624b..af7e82ea8712 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs @@ -70,7 +70,7 @@ public VirtualMachineDataDisk(int lun, DiskCreateOptionType createOption) /// Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. /// Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. /// Keeps track of any properties unknown to the library. internal VirtualMachineDataDisk(int lun, string name, VirtualHardDisk vhd, VirtualHardDisk image, CachingType? caching, bool? writeAcceleratorEnabled, DiskCreateOptionType createOption, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, WritableSubResource sourceResource, bool? toBeDetached, long? diskIopsReadWrite, long? diskMBpsReadWrite, DiskDetachOptionType? detachOption, DiskDeleteOptionType? deleteOption, IDictionary serializedAdditionalRawData) @@ -160,7 +160,7 @@ public ResourceIdentifier SourceResourceId public long? DiskIopsReadWrite { get; } /// Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. public long? DiskMBpsReadWrite { get; } - /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + /// Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. public DiskDetachOptionType? DetachOption { get; set; } /// Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. public DiskDeleteOptionType? DeleteOption { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 36545ad8978d..9519d3a15983 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -10,7 +10,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/4f68529971f845e8757c2b2a746d78ceb91854cd/specification/compute/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/compute/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: