From 37092465c73c6d9c2d705d53eb969adfeaa34447 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 17 Apr 2023 22:53:37 +0000 Subject: [PATCH] CodeGen from PR 22885 in Azure/azure-rest-api-specs Merge 7ab8b275d02bb99006cf367ccb4f42554f7ab0df into 076362b3daf923937504ba93dcdf2959072eb0f9 --- ....ResourceManager.Compute.netstandard2.0.cs | 159 +++++++++++++++--- .../src/Generated/AvailabilitySetData.cs | 6 +- .../src/Generated/CapacityReservationData.cs | 8 +- .../Generated/CapacityReservationGroupData.cs | 2 +- .../src/Generated/DedicatedHostData.cs | 12 +- .../src/Generated/DedicatedHostGroupData.cs | 12 +- .../src/Generated/DedicatedHostResource.cs | 46 ++++- .../Generated/Extensions/ComputeExtensions.cs | 10 +- .../SubscriptionResourceExtensionClient.cs | 14 +- .../Models/AutomaticOSUpgradePolicy.cs | 4 +- .../Generated/Models/AvailabilitySetPatch.cs | 2 +- .../src/Generated/Models/BillingProfile.cs | 2 +- .../src/Generated/Models/BootDiagnostics.cs | 6 +- .../Models/BootDiagnosticsInstanceView.cs | 12 +- .../src/Generated/Models/CachingType.cs | 2 +- .../Models/CapacityReservationPatch.cs | 4 +- .../Models/CapacityReservationUtilization.cs | 4 +- .../ComputeSubResourceData.Serialization.cs | 43 +++++ .../Models/ComputeSubResourceData.cs | 30 ++++ .../Models/DedicatedHostGroupPatch.cs | 6 +- ...stGroupPropertiesAdditionalCapabilities.cs | 6 +- .../Models/DedicatedHostLicenseType.cs | 2 +- .../DedicatedHostPatch.Serialization.cs | 5 + .../Generated/Models/DedicatedHostPatch.cs | 8 +- ...dicatedHostSizeListResult.Serialization.cs | 43 +++++ .../Models/DedicatedHostSizeListResult.cs | 32 ++++ .../Generated/Models/DiagnosticsProfile.cs | 6 +- .../src/Generated/Models/DiffDiskSettings.cs | 6 +- .../Generated/Models/DiskControllerType.cs | 2 +- .../Generated/Models/DiskCreateOptionType.cs | 2 +- .../Generated/Models/DiskDeleteOptionType.cs | 2 +- .../Generated/Models/DiskDetachOptionType.cs | 2 +- ...iskRestorePointAttributes.Serialization.cs | 74 ++++++++ .../Models/DiskRestorePointAttributes.cs | 47 ++++++ .../Generated/Models/ExpandTypeForListVm.cs | 48 ++++++ .../Generated/Models/ExpandTypesForListVm.cs | 48 ++++++ .../src/Generated/Models/ImageDataDisk.cs | 4 +- .../src/Generated/Models/ImageDisk.cs | 8 +- .../src/Generated/Models/ImageOSDisk.cs | 10 +- .../Generated/Models/LinuxConfiguration.cs | 6 +- .../Generated/Models/LinuxPatchSettings.cs | 13 +- ...tomaticByPlatformSettings.Serialization.cs | 19 ++- ...VmGuestPatchAutomaticByPlatformSettings.cs | 8 +- .../Models/OSProfileProvisioningData.cs | 2 +- .../src/Generated/Models/PatchSettings.cs | 13 +- .../Models/ProximityPlacementGroupType.cs | 2 +- .../Models/RestorePointData.Serialization.cs | 5 + .../RestorePointEncryption.Serialization.cs | 64 +++++++ .../Models/RestorePointEncryption.cs | 47 ++++++ .../Models/RestorePointEncryptionType.cs | 54 ++++++ ...estorePointSourceMetadata.Serialization.cs | 25 ++- .../Models/RestorePointSourceMetadata.cs | 12 +- ...torePointSourceVmDataDisk.Serialization.cs | 35 +++- .../Models/RestorePointSourceVmDataDisk.cs | 28 ++- ...estorePointSourceVmOSDisk.Serialization.cs | 35 +++- .../Models/RestorePointSourceVmOSDisk.cs | 24 ++- ...intSourceVmStorageProfile.Serialization.cs | 25 ++- .../RestorePointSourceVmStorageProfile.cs | 8 +- ...RunCommandManagedIdentity.Serialization.cs | 55 ++++++ .../Models/RunCommandManagedIdentity.cs | 32 ++++ .../Models/SecurityEncryptionType.cs | 2 +- .../SecurityPostureReference.Serialization.cs | 71 ++++++++ .../Models/SecurityPostureReference.cs | 37 ++++ .../src/Generated/Models/SecurityProfile.cs | 12 +- .../src/Generated/Models/SecurityType.cs | 2 +- .../src/Generated/Models/SpotRestorePolicy.cs | 2 +- .../Models/SshPublicKeyConfiguration.cs | 4 +- .../src/Generated/Models/UefiSettings.cs | 10 +- .../src/Generated/Models/VaultCertificate.cs | 4 +- .../Models/VirtualMachineDataDisk.cs | 22 +-- .../VirtualMachineDiskSecurityProfile.cs | 6 +- ...rtualMachineExtensionData.Serialization.cs | 27 ++- .../Models/VirtualMachineHardwareProfile.cs | 8 +- .../Models/VirtualMachineInstanceView.cs | 8 +- .../Generated/Models/VirtualMachineOSDisk.cs | 28 +-- .../Models/VirtualMachineOSProfile.cs | 16 +- .../Generated/Models/VirtualMachinePatch.cs | 30 ++-- .../Models/VirtualMachinePriorityType.cs | 2 +- ...tualMachineRunCommandData.Serialization.cs | 47 +++++- ...ineRunCommandScriptSource.Serialization.cs | 17 +- .../VirtualMachineRunCommandScriptSource.cs | 12 +- ...alMachineRunCommandUpdate.Serialization.cs | 15 ++ .../Models/VirtualMachineRunCommandUpdate.cs | 12 +- .../Models/VirtualMachineScaleSetDataDisk.cs | 8 +- .../VirtualMachineScaleSetExtensionProfile.cs | 4 +- .../VirtualMachineScaleSetHardwareProfile.cs | 4 +- .../Models/VirtualMachineScaleSetOSDisk.cs | 18 +- .../Models/VirtualMachineScaleSetOSProfile.cs | 12 +- ...rtualMachineScaleSetPatch.Serialization.cs | 10 ++ .../Models/VirtualMachineScaleSetPatch.cs | 5 + ...VirtualMachineScaleSetPriorityMixPolicy.cs | 2 +- .../VirtualMachineScaleSetStorageProfile.cs | 8 +- ...eSetUpdateIPConfiguration.Serialization.cs | 147 ---------------- ...ualMachineScaleSetUpdateIPConfiguration.cs | 26 +-- ...pdateNetworkConfiguration.Serialization.cs | 142 ---------------- ...chineScaleSetUpdateNetworkConfiguration.cs | 28 +-- ...licIPAddressConfiguration.Serialization.cs | 71 -------- ...leSetUpdatePublicIPAddressConfiguration.cs | 15 -- .../VirtualMachineScaleSetUpdateVmProfile.cs | 8 +- ...neScaleSetVmExtensionData.Serialization.cs | 43 ++++- .../VirtualMachineScaleSetVmInstanceView.cs | 8 +- ...lMachineScaleSetVmProfile.Serialization.cs | 17 +- .../Models/VirtualMachineScaleSetVmProfile.cs | 39 +++-- .../Models/VirtualMachineSizeProperties.cs | 8 +- .../Models/VirtualMachineSizeType.cs | 2 +- .../Models/VirtualMachineStorageProfile.cs | 12 +- .../src/Generated/Models/WinRMListener.cs | 8 +- .../Models/WinRMListenerProtocolType.cs | 2 +- .../Generated/Models/WindowsConfiguration.cs | 12 +- ...tomaticByPlatformSettings.Serialization.cs | 19 ++- ...VmGuestPatchAutomaticByPlatformSettings.cs | 8 +- .../Generated/ProximityPlacementGroupData.cs | 4 +- .../AvailabilitySetsRestOperations.cs | 2 +- ...CapacityReservationGroupsRestOperations.cs | 2 +- .../CapacityReservationsRestOperations.cs | 2 +- .../DedicatedHostGroupsRestOperations.cs | 2 +- .../DedicatedHostsRestOperations.cs | 91 +++++++++- .../RestOperations/ImagesRestOperations.cs | 2 +- .../LogAnalyticsRestOperations.cs | 2 +- .../ProximityPlacementGroupsRestOperations.cs | 2 +- .../RestorePointCollectionsRestOperations.cs | 2 +- .../RestorePointsRestOperations.cs | 2 +- .../SshPublicKeysRestOperations.cs | 2 +- .../RestOperations/UsageRestOperations.cs | 2 +- ...ualMachineExtensionImagesRestOperations.cs | 2 +- .../VirtualMachineExtensionsRestOperations.cs | 2 +- ...tualMachineImagesEdgeZoneRestOperations.cs | 2 +- .../VirtualMachineImagesRestOperations.cs | 2 +- ...VirtualMachineRunCommandsRestOperations.cs | 2 +- ...MachineScaleSetExtensionsRestOperations.cs | 2 +- ...neScaleSetRollingUpgradesRestOperations.cs | 2 +- ...chineScaleSetVMExtensionsRestOperations.cs | 2 +- ...hineScaleSetVMRunCommandsRestOperations.cs | 2 +- ...VirtualMachineScaleSetVMsRestOperations.cs | 6 +- .../VirtualMachineScaleSetsRestOperations.cs | 89 +++++++++- .../VirtualMachineSizesRestOperations.cs | 2 +- .../VirtualMachinesRestOperations.cs | 66 +++++--- .../src/Generated/RestorePointData.cs | 2 +- .../src/Generated/VirtualMachineCollection.cs | 14 +- .../src/Generated/VirtualMachineData.cs | 58 +++---- .../Generated/VirtualMachineExtensionData.cs | 7 +- .../src/Generated/VirtualMachineResource.cs | 8 +- .../Generated/VirtualMachineRunCommandData.cs | 26 ++- .../Generated/VirtualMachineScaleSetData.cs | 12 +- .../VirtualMachineScaleSetResource.cs | 82 ++++++++- .../Generated/VirtualMachineScaleSetVmData.cs | 10 +- .../VirtualMachineScaleSetVmExtensionData.cs | 12 +- .../VirtualMachineScaleSetVmResource.cs | 4 +- .../src/autorest.md | 2 +- 149 files changed, 1953 insertions(+), 913 deletions(-) create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypeForListVm.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypesForListVm.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryptionType.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.Serialization.cs create mode 100644 sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.cs diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs index 0928ee5aa876..119013f35489 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs @@ -641,8 +641,8 @@ public static partial class ComputeExtensions public static Azure.Pageable GetVirtualMachineRunCommands(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetVirtualMachineRunCommandsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Compute.VirtualMachineCollection GetVirtualMachines(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetVirtualMachines(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetVirtualMachinesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetVirtualMachines(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, Azure.ResourceManager.Compute.Models.ExpandTypesForListVm? expand = default(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetVirtualMachinesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, Azure.ResourceManager.Compute.Models.ExpandTypesForListVm? expand = default(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetVirtualMachinesByLocation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetVirtualMachinesByLocationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetVirtualMachineScaleSet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualMachineScaleSetName, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetGetExpand? expand = default(Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetGetExpand?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -787,6 +787,8 @@ protected DedicatedHostResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAvailableSizes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAvailableSizesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1374,7 +1376,7 @@ public RestorePointData() { } public System.Collections.Generic.IList ExcludeDisks { get { throw null; } } public Azure.ResourceManager.Compute.Models.RestorePointInstanceView InstanceView { get { throw null; } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Compute.Models.RestorePointSourceMetadata SourceMetadata { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RestorePointSourceMetadata SourceMetadata { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceRestorePointId { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } set { } } } @@ -1668,8 +1670,8 @@ protected VirtualMachineCollection() { } public virtual Azure.Response Exists(string vmName, Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string vmName, Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string vmName, Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, Azure.ResourceManager.Compute.Models.ExpandTypeForListVm? expand = default(Azure.ResourceManager.Compute.Models.ExpandTypeForListVm?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, Azure.ResourceManager.Compute.Models.ExpandTypeForListVm? expand = default(Azure.ResourceManager.Compute.Models.ExpandTypeForListVm?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string vmName, Azure.ResourceManager.Compute.Models.InstanceViewType? expand = default(Azure.ResourceManager.Compute.Models.InstanceViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } @@ -1739,6 +1741,7 @@ public VirtualMachineExtensionData(Azure.Core.AzureLocation location) : base (de public System.BinaryData ProtectedSettings { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.BinaryData ProtectedSettingsFromKeyVault { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisionAfterExtensions { get { throw null; } } public string ProvisioningState { get { throw null; } } public string Publisher { get { throw null; } set { } } public System.BinaryData Settings { get { throw null; } set { } } @@ -1898,8 +1901,10 @@ public partial class VirtualMachineRunCommandData : Azure.ResourceManager.Models { public VirtualMachineRunCommandData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public bool? AsyncExecution { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity ErrorBlobManagedIdentity { get { throw null; } set { } } public System.Uri ErrorBlobUri { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandInstanceView InstanceView { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity OutputBlobManagedIdentity { get { throw null; } set { } } public System.Uri OutputBlobUri { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public System.Collections.Generic.IList ProtectedParameters { get { throw null; } } @@ -1908,6 +1913,7 @@ public VirtualMachineRunCommandData(Azure.Core.AzureLocation location) : base (d public string RunAsUser { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource Source { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + public bool? TreatFailureAsDeploymentFailure { get { throw null; } set { } } } public partial class VirtualMachineRunCommandResource : Azure.ResourceManager.ArmResource { @@ -2033,8 +2039,8 @@ protected VirtualMachineScaleSetResource() { } public virtual Azure.Response ConvertToSinglePlacementGroup(Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetConvertToSinglePlacementGroupContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ConvertToSinglePlacementGroupAsync(Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetConvertToSinglePlacementGroupContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDeletion = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDeletion = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation DeleteInstances(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceRequiredIds vmInstanceIds, bool? forceDeletion = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2062,6 +2068,8 @@ protected VirtualMachineScaleSetResource() { } public virtual System.Threading.Tasks.Task PowerOffAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? skipShutdown = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PowerOn(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task PowerOnAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reapply(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReapplyAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetReimageContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2187,9 +2195,11 @@ public VirtualMachineScaleSetVmExtensionData() { } public string ForceUpdateTag { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineExtensionInstanceView InstanceView { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.KeyVaultSecretReference KeyVaultProtectedSettings { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public System.BinaryData ProtectedSettings { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.BinaryData ProtectedSettingsFromKeyVault { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisionAfterExtensions { get { throw null; } } public string ProvisioningState { get { throw null; } } public string Publisher { get { throw null; } set { } } public System.BinaryData Settings { get { throw null; } set { } } @@ -2912,6 +2922,11 @@ public enum ComputeStatusLevelType Warning = 1, Error = 2, } + public partial class ComputeSubResourceData + { + public ComputeSubResourceData() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + } public partial class ComputeSubResourceDataWithColocationStatus : Azure.ResourceManager.Compute.Models.ComputeWriteableSubResourceData { public ComputeSubResourceDataWithColocationStatus() { } @@ -3086,6 +3101,7 @@ public DedicatedHostPatch() { } public int? PlatformFaultDomain { get { throw null; } set { } } public System.DateTimeOffset? ProvisioningOn { get { throw null; } } public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } public System.DateTimeOffset? TimeCreated { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualMachines { get { throw null; } } } @@ -3336,6 +3352,12 @@ public DiskPurchasePlan(string name, string publisher, string product) { } public string PromotionCode { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } } + public partial class DiskRestorePointAttributes : Azure.ResourceManager.Compute.Models.ComputeSubResourceData + { + public DiskRestorePointAttributes() { } + public Azure.ResourceManager.Compute.Models.RestorePointEncryption Encryption { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SourceDiskRestorePointId { get { throw null; } set { } } + } public partial class DiskRestorePointInstanceView { internal DiskRestorePointInstanceView() { } @@ -3469,6 +3491,40 @@ public EncryptionSettingsGroup(bool enabled) { } public static bool operator !=(Azure.ResourceManager.Compute.Models.ExecutionState left, Azure.ResourceManager.Compute.Models.ExecutionState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExpandTypeForListVm : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExpandTypeForListVm(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.ExpandTypeForListVm InstanceView { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.ExpandTypeForListVm other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.ExpandTypeForListVm left, Azure.ResourceManager.Compute.Models.ExpandTypeForListVm right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.ExpandTypeForListVm (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.ExpandTypeForListVm left, Azure.ResourceManager.Compute.Models.ExpandTypeForListVm right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExpandTypesForListVm : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExpandTypesForListVm(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.ExpandTypesForListVm InstanceView { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm left, Azure.ResourceManager.Compute.Models.ExpandTypesForListVm right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.ExpandTypesForListVm (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.ExpandTypesForListVm left, Azure.ResourceManager.Compute.Models.ExpandTypesForListVm right) { throw null; } + public override string ToString() { throw null; } + } public partial class GalleryApplicationCustomAction { public GalleryApplicationCustomAction(string name, string script) { } @@ -4082,7 +4138,7 @@ public partial class LinuxPatchSettings { public LinuxPatchSettings() { } public Azure.ResourceManager.Compute.Models.LinuxPatchAssessmentMode? AssessmentMode { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting? AutomaticByPlatformRebootSetting { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchMode? PatchMode { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -4105,6 +4161,12 @@ public LinuxPatchSettings() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting left, Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting right) { throw null; } public override string ToString() { throw null; } } + public partial class LinuxVmGuestPatchAutomaticByPlatformSettings + { + public LinuxVmGuestPatchAutomaticByPlatformSettings() { } + public bool? BypassPlatformSafetyChecksOnUserSchedule { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.LinuxVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LinuxVmGuestPatchMode : System.IEquatable { @@ -4458,7 +4520,7 @@ public partial class PatchSettings { public PatchSettings() { } public Azure.ResourceManager.Compute.Models.WindowsPatchAssessmentMode? AssessmentMode { get { throw null; } set { } } - public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformRebootSetting? AutomaticByPlatformRebootSetting { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get { throw null; } set { } } public bool? EnableHotpatching { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchMode? PatchMode { get { throw null; } set { } } } @@ -4644,6 +4706,31 @@ internal ResourceSkuCosts() { } public string MeterId { get { throw null; } } public long? Quantity { get { throw null; } } } + public partial class RestorePointEncryption + { + public RestorePointEncryption() { } + public Azure.Core.ResourceIdentifier DiskEncryptionSetId { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.RestorePointEncryptionType? EncryptionType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RestorePointEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RestorePointEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.Compute.Models.RestorePointEncryptionType EncryptionAtRestWithCustomerKey { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.RestorePointEncryptionType EncryptionAtRestWithPlatformAndCustomerKeys { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.RestorePointEncryptionType EncryptionAtRestWithPlatformKey { get { throw null; } } + public bool Equals(Azure.ResourceManager.Compute.Models.RestorePointEncryptionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Compute.Models.RestorePointEncryptionType left, Azure.ResourceManager.Compute.Models.RestorePointEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.Compute.Models.RestorePointEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Compute.Models.RestorePointEncryptionType left, Azure.ResourceManager.Compute.Models.RestorePointEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RestorePointExpand : System.IEquatable { @@ -4700,43 +4787,46 @@ internal RestorePointInstanceView() { } } public partial class RestorePointSourceMetadata { - internal RestorePointSourceMetadata() { } + public RestorePointSourceMetadata() { } public Azure.ResourceManager.Compute.Models.BootDiagnostics BootDiagnostics { get { throw null; } } public Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile HardwareProfile { get { throw null; } } + public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } } public string LicenseType { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } } - public Azure.ResourceManager.Compute.Models.RestorePointSourceVmStorageProfile StorageProfile { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RestorePointSourceVmStorageProfile StorageProfile { get { throw null; } set { } } public string UserData { get { throw null; } } public string VmId { get { throw null; } } } public partial class RestorePointSourceVmDataDisk { - internal RestorePointSourceVmDataDisk() { } + public RestorePointSourceVmDataDisk() { } public Azure.ResourceManager.Compute.Models.CachingType? Caching { get { throw null; } } - public Azure.Core.ResourceIdentifier DiskRestorePointId { get { throw null; } } + public Azure.ResourceManager.Compute.Models.DiskRestorePointAttributes DiskRestorePoint { get { throw null; } set { } } public int? DiskSizeGB { get { throw null; } } public int? Lun { get { throw null; } } - public Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk ManagedDisk { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk ManagedDisk { get { throw null; } set { } } public string Name { get { throw null; } } + public bool? WriteAcceleratorEnabled { get { throw null; } } } public partial class RestorePointSourceVmOSDisk { - internal RestorePointSourceVmOSDisk() { } + public RestorePointSourceVmOSDisk() { } public Azure.ResourceManager.Compute.Models.CachingType? Caching { get { throw null; } } - public Azure.Core.ResourceIdentifier DiskRestorePointId { get { throw null; } } + public Azure.ResourceManager.Compute.Models.DiskRestorePointAttributes DiskRestorePoint { get { throw null; } set { } } public int? DiskSizeGB { get { throw null; } } public Azure.ResourceManager.Compute.Models.DiskEncryptionSettings EncryptionSettings { get { throw null; } } - public Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk ManagedDisk { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineManagedDisk ManagedDisk { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.ResourceManager.Compute.Models.OperatingSystemType? OSType { get { throw null; } } + public bool? WriteAcceleratorEnabled { get { throw null; } } } public partial class RestorePointSourceVmStorageProfile { - internal RestorePointSourceVmStorageProfile() { } - public System.Collections.Generic.IReadOnlyList DataDisks { get { throw null; } } - public Azure.ResourceManager.Compute.Models.RestorePointSourceVmOSDisk OSDisk { get { throw null; } } + public RestorePointSourceVmStorageProfile() { } + public System.Collections.Generic.IList DataDisks { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RestorePointSourceVmOSDisk OSDisk { get { throw null; } set { } } } public partial class RetrieveBootDiagnosticsDataResult { @@ -4832,6 +4922,12 @@ public RunCommandInputParameter(string name, string value) { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } } + public partial class RunCommandManagedIdentity + { + public RunCommandManagedIdentity() { } + public string ClientId { get { throw null; } set { } } + public string ObjectId { get { throw null; } set { } } + } public partial class RunCommandParameterDefinition { internal RunCommandParameterDefinition() { } @@ -4864,6 +4960,12 @@ public ScaleInPolicy() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.SecurityEncryptionType left, Azure.ResourceManager.Compute.Models.SecurityEncryptionType right) { throw null; } public override string ToString() { throw null; } } + public partial class SecurityPostureReference + { + public SecurityPostureReference() { } + public System.Collections.Generic.IList ExcludeExtensions { get { throw null; } } + public string Id { get { throw null; } set { } } + } public partial class SecurityProfile { public SecurityProfile() { } @@ -5693,13 +5795,16 @@ public VirtualMachineRunCommandScriptSource() { } public string CommandId { get { throw null; } set { } } public string Script { get { throw null; } set { } } public System.Uri ScriptUri { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity ScriptUriManagedIdentity { get { throw null; } set { } } } public partial class VirtualMachineRunCommandUpdate : Azure.ResourceManager.Compute.Models.ComputeResourcePatch { public VirtualMachineRunCommandUpdate() { } public bool? AsyncExecution { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity ErrorBlobManagedIdentity { get { throw null; } set { } } public System.Uri ErrorBlobUri { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandInstanceView InstanceView { get { throw null; } } + public Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity OutputBlobManagedIdentity { get { throw null; } set { } } public System.Uri OutputBlobUri { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public System.Collections.Generic.IList ProtectedParameters { get { throw null; } } @@ -5708,6 +5813,7 @@ public VirtualMachineRunCommandUpdate() { } public string RunAsUser { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource Source { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + public bool? TreatFailureAsDeploymentFailure { get { throw null; } set { } } } public partial class VirtualMachineScaleSetConvertToSinglePlacementGroupContent { @@ -5865,10 +5971,12 @@ public VirtualMachineScaleSetPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public bool? Overprovision { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePlan Plan { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetPriorityMixPolicy PriorityMixPolicy { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ProximityPlacementGroupId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ScaleInPolicy ScaleInPolicy { get { throw null; } set { } } public bool? SinglePlacementGroup { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SpotRestorePolicy SpotRestorePolicy { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpgradePolicy UpgradePolicy { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdateVmProfile VirtualMachineProfile { get { throw null; } set { } } } @@ -5942,7 +6050,7 @@ public VirtualMachineScaleSetStorageProfile() { } public Azure.ResourceManager.Compute.Models.ImageReference ImageReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSDisk OSDisk { get { throw null; } set { } } } - public partial class VirtualMachineScaleSetUpdateIPConfiguration : Azure.ResourceManager.Compute.Models.ComputeWriteableSubResourceData + public partial class VirtualMachineScaleSetUpdateIPConfiguration { public VirtualMachineScaleSetUpdateIPConfiguration() { } public System.Collections.Generic.IList ApplicationGatewayBackendAddressPools { get { throw null; } } @@ -5955,7 +6063,7 @@ public VirtualMachineScaleSetUpdateIPConfiguration() { } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration PublicIPAddressConfiguration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } } - public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : Azure.ResourceManager.Compute.Models.ComputeWriteableSubResourceData + public partial class VirtualMachineScaleSetUpdateNetworkConfiguration { public VirtualMachineScaleSetUpdateNetworkConfiguration() { } public Azure.ResourceManager.Compute.Models.ComputeDeleteOption? DeleteOption { get { throw null; } set { } } @@ -6111,6 +6219,7 @@ public VirtualMachineScaleSetVmProfile() { } public Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile ScheduledEventsProfile { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.TerminateNotificationProfile ScheduledEventsTerminateNotificationProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SecurityPostureReference SecurityPostureReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile StorageProfile { get { throw null; } set { } } @@ -6516,6 +6625,12 @@ public WindowsParameters() { } public static bool operator !=(Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformRebootSetting left, Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformRebootSetting right) { throw null; } public override string ToString() { throw null; } } + public partial class WindowsVmGuestPatchAutomaticByPlatformSettings + { + public WindowsVmGuestPatchAutomaticByPlatformSettings() { } + public bool? BypassPlatformSafetyChecksOnUserSchedule { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.WindowsVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct WindowsVmGuestPatchMode : System.IEquatable { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.cs index 497fdd75890d..5641ed78e6d8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Compute { /// /// A class representing the AvailabilitySet data model. - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set. /// public partial class AvailabilitySetData : TrackedResourceData { @@ -38,7 +38,7 @@ public AvailabilitySetData(AzureLocation location) : base(location) /// Update Domain count. /// Fault Domain count. /// A list of references to all virtual machines in the availability set. - /// Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. /// The resource status information. internal AvailabilitySetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, int? platformUpdateDomainCount, int? platformFaultDomainCount, IList virtualMachines, WritableSubResource proximityPlacementGroup, IReadOnlyList statuses) : base(id, name, resourceType, systemData, tags, location) { @@ -58,7 +58,7 @@ internal AvailabilitySetData(ResourceIdentifier id, string name, ResourceType re public int? PlatformFaultDomainCount { get; set; } /// A list of references to all virtual machines in the availability set. public IList VirtualMachines { get; } - /// Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. internal WritableSubResource ProximityPlacementGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier ProximityPlacementGroupId diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.cs index 07acf5613f6b..ac8fc8f0cf0e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationData.cs @@ -43,12 +43,12 @@ public CapacityReservationData(AzureLocation location, ComputeSku sku) : base(lo /// SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. /// Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. /// A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. - /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size.<br>NOTE: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation.<br><br>Minimum api-version: 2022-08-01. + /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. /// A list of all virtual machine resource ids that are associated with the capacity reservation. /// The date time when the capacity reservation was last updated. /// The provisioning state, which only appears in the response. /// The Capacity reservation instance view. - /// Specifies the time at which the Capacity Reservation resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. internal CapacityReservationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, IList zones, string reservationId, int? platformFaultDomainCount, IReadOnlyList virtualMachinesAssociated, DateTimeOffset? provisioningOn, string provisioningState, CapacityReservationInstanceView instanceView, DateTimeOffset? timeCreated) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; @@ -68,7 +68,7 @@ internal CapacityReservationData(ResourceIdentifier id, string name, ResourceTyp public IList Zones { get; } /// A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. public string ReservationId { get; } - /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size.<br>NOTE: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation.<br><br>Minimum api-version: 2022-08-01. + /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. public int? PlatformFaultDomainCount { get; } /// A list of all virtual machine resource ids that are associated with the capacity reservation. public IReadOnlyList VirtualMachinesAssociated { get; } @@ -78,7 +78,7 @@ internal CapacityReservationData(ResourceIdentifier id, string name, ResourceTyp public string ProvisioningState { get; } /// The Capacity reservation instance view. public CapacityReservationInstanceView InstanceView { get; } - /// Specifies the time at which the Capacity Reservation resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.cs index 385267c7a0c9..cf31a59536df 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Compute { /// /// A class representing the CapacityReservationGroup data model. - /// Specifies information about the capacity reservation group that the capacity reservations should be assigned to. <br><br> Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. + /// Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. /// public partial class CapacityReservationGroupData : TrackedResourceData { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.cs index ea94c5b46e1e..b1460669c4bd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostData.cs @@ -42,13 +42,13 @@ public DedicatedHostData(AzureLocation location, ComputeSku sku) : base(location /// SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. /// Fault domain of the dedicated host within a dedicated host group. /// Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. - /// A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host. + /// A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. /// A list of references to all virtual machines in the Dedicated Host. - /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. + /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**. /// The date when the host was first provisioned. /// The provisioning state, which only appears in the response. /// The dedicated host instance view. - /// Specifies the time at which the Dedicated Host resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. internal DedicatedHostData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, int? platformFaultDomain, bool? autoReplaceOnFailure, string hostId, IReadOnlyList virtualMachines, DedicatedHostLicenseType? licenseType, DateTimeOffset? provisioningOn, string provisioningState, DedicatedHostInstanceView instanceView, DateTimeOffset? timeCreated) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; @@ -69,11 +69,11 @@ internal DedicatedHostData(ResourceIdentifier id, string name, ResourceType reso public int? PlatformFaultDomain { get; set; } /// Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. public bool? AutoReplaceOnFailure { get; set; } - /// A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host. + /// A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. public string HostId { get; } /// A list of references to all virtual machines in the Dedicated Host. public IReadOnlyList VirtualMachines { get; } - /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. + /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**. public DedicatedHostLicenseType? LicenseType { get; set; } /// The date when the host was first provisioned. public DateTimeOffset? ProvisioningOn { get; } @@ -81,7 +81,7 @@ internal DedicatedHostData(ResourceIdentifier id, string name, ResourceType reso public string ProvisioningState { get; } /// The dedicated host instance view. public DedicatedHostInstanceView InstanceView { get; } - /// Specifies the time at which the Dedicated Host resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.cs index 29b270647f14..befc7f4e1cc9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Compute { /// /// A class representing the DedicatedHostGroup data model. - /// Specifies information about the dedicated host group that the dedicated hosts should be assigned to. <br><br> Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. + /// Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. /// public partial class DedicatedHostGroupData : TrackedResourceData { @@ -38,8 +38,8 @@ public DedicatedHostGroupData(AzureLocation location) : base(location) /// Number of fault domains that the host group can span. /// A list of references to all dedicated hosts in the dedicated host group. /// The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. - /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01. - /// Enables or disables a capability on the dedicated host group.<br><br>Minimum api-version: 2022-03-01. + /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. + /// Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. internal DedicatedHostGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, int? platformFaultDomainCount, IReadOnlyList dedicatedHosts, DedicatedHostGroupInstanceView instanceView, bool? supportAutomaticPlacement, DedicatedHostGroupPropertiesAdditionalCapabilities additionalCapabilities) : base(id, name, resourceType, systemData, tags, location) { Zones = zones; @@ -64,11 +64,11 @@ public IReadOnlyList InstanceViewHosts get => InstanceView?.Hosts; } - /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01. + /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. public bool? SupportAutomaticPlacement { get; set; } - /// Enables or disables a capability on the dedicated host group.<br><br>Minimum api-version: 2022-03-01. + /// Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. internal DedicatedHostGroupPropertiesAdditionalCapabilities AdditionalCapabilities { get; set; } - /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. <br><br>NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. <br><br>Minimum api-version: 2022-03-01. + /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. public bool? UltraSsdEnabled { get => AdditionalCapabilities is null ? default : AdditionalCapabilities.UltraSsdEnabled; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.cs index 41660ae057af..547e13013fb6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.cs @@ -223,7 +223,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update an dedicated host . + /// Update a dedicated host . /// /// /// Request Path @@ -261,7 +261,7 @@ public virtual async Task> UpdateAsync(WaitU } /// - /// Update an dedicated host . + /// Update a dedicated host . /// /// /// Request Path @@ -366,6 +366,48 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance } } + /// + /// Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes + /// + /// + /// Operation Id + /// DedicatedHosts_ListAvailableSizes + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAvailableSizesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHostRestClient.CreateListAvailableSizesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => e.GetString(), _dedicatedHostClientDiagnostics, Pipeline, "DedicatedHostResource.GetAvailableSizes", "value", null, cancellationToken); + } + + /// + /// Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes + /// + /// + /// Operation Id + /// DedicatedHosts_ListAvailableSizes + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAvailableSizes(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dedicatedHostRestClient.CreateListAvailableSizesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, null, e => e.GetString(), _dedicatedHostClientDiagnostics, Pipeline, "DedicatedHostResource.GetAvailableSizes", "value", null, cancellationToken); + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs index fbc1db113913..f6f9a5964e57 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/ComputeExtensions.cs @@ -2243,11 +2243,12 @@ public static Pageable GetVirtualMachinesByLocation(this /// The instance the method will execute against. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetVirtualMachinesAsync(this SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public static AsyncPageable GetVirtualMachinesAsync(this SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVirtualMachinesAsync(statusOnly, filter, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVirtualMachinesAsync(statusOnly, filter, expand, cancellationToken); } /// @@ -2266,11 +2267,12 @@ public static AsyncPageable GetVirtualMachinesAsync(this /// The instance the method will execute against. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetVirtualMachines(this SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public static Pageable GetVirtualMachines(this SubscriptionResource subscriptionResource, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVirtualMachines(statusOnly, filter, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVirtualMachines(statusOnly, filter, expand, cancellationToken); } /// diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 0697a17df9d6..7744a617b581 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -408,12 +408,13 @@ public virtual Pageable GetVirtualMachinesByLocation(Azu /// /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetVirtualMachinesAsync(string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetVirtualMachinesAsync(string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => VirtualMachineRestClient.CreateListAllRequest(Id.SubscriptionId, statusOnly, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VirtualMachineRestClient.CreateListAllNextPageRequest(nextLink, Id.SubscriptionId, statusOnly, filter); + HttpMessage FirstPageRequest(int? pageSizeHint) => VirtualMachineRestClient.CreateListAllRequest(Id.SubscriptionId, statusOnly, filter, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VirtualMachineRestClient.CreateListAllNextPageRequest(nextLink, Id.SubscriptionId, statusOnly, filter, expand); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VirtualMachineResource(Client, VirtualMachineData.DeserializeVirtualMachineData(e)), VirtualMachineClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVirtualMachines", "value", "nextLink", cancellationToken); } @@ -432,12 +433,13 @@ public virtual AsyncPageable GetVirtualMachinesAsync(str /// /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetVirtualMachines(string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public virtual Pageable GetVirtualMachines(string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => VirtualMachineRestClient.CreateListAllRequest(Id.SubscriptionId, statusOnly, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VirtualMachineRestClient.CreateListAllNextPageRequest(nextLink, Id.SubscriptionId, statusOnly, filter); + HttpMessage FirstPageRequest(int? pageSizeHint) => VirtualMachineRestClient.CreateListAllRequest(Id.SubscriptionId, statusOnly, filter, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VirtualMachineRestClient.CreateListAllNextPageRequest(nextLink, Id.SubscriptionId, statusOnly, filter, expand); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VirtualMachineResource(Client, VirtualMachineData.DeserializeVirtualMachineData(e)), VirtualMachineClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVirtualMachines", "value", "nextLink", cancellationToken); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.cs index 2dafd104030f..7ab7ec525f72 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AutomaticOSUpgradePolicy.cs @@ -16,7 +16,7 @@ public AutomaticOSUpgradePolicy() } /// Initializes a new instance of AutomaticOSUpgradePolicy. - /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. <br><br> If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. /// Whether OS image rollback feature should be disabled. Default value is false. /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. internal AutomaticOSUpgradePolicy(bool? enableAutomaticOSUpgrade, bool? disableAutomaticRollback, bool? useRollingUpgradePolicy) @@ -26,7 +26,7 @@ internal AutomaticOSUpgradePolicy(bool? enableAutomaticOSUpgrade, bool? disableA UseRollingUpgradePolicy = useRollingUpgradePolicy; } - /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. <br><br> If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. public bool? EnableAutomaticOSUpgrade { get; set; } /// Whether OS image rollback feature should be disabled. Default value is false. public bool? DisableAutomaticRollback { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.cs index 1814dcd592a3..0bfa16191e3d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/AvailabilitySetPatch.cs @@ -29,7 +29,7 @@ public AvailabilitySetPatch() public int? PlatformFaultDomainCount { get; set; } /// A list of references to all virtual machines in the availability set. public IList VirtualMachines { get; } - /// Specifies information about the proximity placement group that the availability set should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. internal WritableSubResource ProximityPlacementGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier ProximityPlacementGroupId diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.cs index 1ba624e60e5d..f3f1995346a0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BillingProfile.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the billing related details of a Azure Spot VM or VMSS. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01. internal partial class BillingProfile { /// Initializes a new instance of BillingProfile. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.cs index 5ad9818447a2..3fdd96a072b7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnostics.cs @@ -9,7 +9,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public partial class BootDiagnostics { /// Initializes a new instance of BootDiagnostics. @@ -19,7 +19,7 @@ public BootDiagnostics() /// Initializes a new instance of BootDiagnostics. /// Whether boot diagnostics should be enabled on the Virtual Machine. - /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + /// Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used. internal BootDiagnostics(bool? enabled, Uri storageUri) { Enabled = enabled; @@ -28,7 +28,7 @@ internal BootDiagnostics(bool? enabled, Uri storageUri) /// Whether boot diagnostics should be enabled on the Virtual Machine. public bool? Enabled { get; set; } - /// Uri of the storage account to use for placing the console output and screenshot. <br><br>If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + /// Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used. public Uri StorageUri { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.cs index e2ed2ebce654..be4525b972d2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/BootDiagnosticsInstanceView.cs @@ -18,9 +18,9 @@ internal BootDiagnosticsInstanceView() } /// Initializes a new instance of BootDiagnosticsInstanceView. - /// The console screenshot blob URI. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - /// The serial console log blob Uri. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - /// The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + /// The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. + /// The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. + /// The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics. internal BootDiagnosticsInstanceView(Uri consoleScreenshotBlobUri, Uri serialConsoleLogBlobUri, InstanceViewStatus status) { ConsoleScreenshotBlobUri = consoleScreenshotBlobUri; @@ -28,11 +28,11 @@ internal BootDiagnosticsInstanceView(Uri consoleScreenshotBlobUri, Uri serialCon Status = status; } - /// The console screenshot blob URI. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + /// The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. public Uri ConsoleScreenshotBlobUri { get; } - /// The serial console log blob Uri. <br><br>NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + /// The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. public Uri SerialConsoleLogBlobUri { get; } - /// The boot diagnostics status information for the VM. <br><br> NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + /// The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics. public InstanceViewStatus Status { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CachingType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CachingType.cs index 35186f10abc2..67c1590b247b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CachingType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CachingType.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage**. public enum CachingType { /// None. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.cs index 7ef3278290c8..f58b51841c78 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationPatch.cs @@ -25,7 +25,7 @@ public CapacityReservationPatch() public ComputeSku Sku { get; set; } /// A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. public string ReservationId { get; } - /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size.<br>NOTE: The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation.<br><br>Minimum api-version: 2022-08-01. + /// Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. public int? PlatformFaultDomainCount { get; } /// A list of all virtual machine resource ids that are associated with the capacity reservation. public IReadOnlyList VirtualMachinesAssociated { get; } @@ -35,7 +35,7 @@ public CapacityReservationPatch() public string ProvisioningState { get; } /// The Capacity reservation instance view. public CapacityReservationInstanceView InstanceView { get; } - /// Specifies the time at which the Capacity Reservation resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.cs index 01135f26ac1f..6fd1ffb01789 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/CapacityReservationUtilization.cs @@ -21,7 +21,7 @@ internal CapacityReservationUtilization() } /// Initializes a new instance of CapacityReservationUtilization. - /// The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed.<br><br>Minimum api-version: 2022-08-01. + /// The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01. /// A list of all virtual machines resource ids allocated against the capacity reservation. internal CapacityReservationUtilization(int? currentCapacity, IReadOnlyList virtualMachinesAllocated) { @@ -29,7 +29,7 @@ internal CapacityReservationUtilization(int? currentCapacity, IReadOnlyList The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed.<br><br>Minimum api-version: 2022-08-01. + /// The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01. public int? CurrentCapacity { get; } /// A list of all virtual machines resource ids allocated against the capacity reservation. public IReadOnlyList VirtualMachinesAllocated { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs new file mode 100644 index 000000000000..ebf8cec4de14 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class ComputeSubResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ComputeSubResourceData DeserializeComputeSubResourceData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ComputeSubResourceData(id.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.cs new file mode 100644 index 000000000000..25e6d201f1a7 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ComputeSubResourceData.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The ComputeSubResourceData. + public partial class ComputeSubResourceData + { + /// Initializes a new instance of ComputeSubResourceData. + public ComputeSubResourceData() + { + } + + /// Initializes a new instance of ComputeSubResourceData. + /// Resource Id. + internal ComputeSubResourceData(ResourceIdentifier id) + { + Id = id; + } + + /// Resource Id. + public ResourceIdentifier Id { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.cs index d9f3bf84dc80..9a37d3fe99b7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPatch.cs @@ -35,11 +35,11 @@ public IReadOnlyList InstanceViewHosts get => InstanceView?.Hosts; } - /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. <br><br>Minimum api-version: 2020-06-01. + /// Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. public bool? SupportAutomaticPlacement { get; set; } - /// Enables or disables a capability on the dedicated host group.<br><br>Minimum api-version: 2022-03-01. + /// Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. internal DedicatedHostGroupPropertiesAdditionalCapabilities AdditionalCapabilities { get; set; } - /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. <br><br>NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. <br><br>Minimum api-version: 2022-03-01. + /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. public bool? UltraSsdEnabled { get => AdditionalCapabilities is null ? default : AdditionalCapabilities.UltraSsdEnabled; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.cs index d77b01324998..4b902b1824a5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostGroupPropertiesAdditionalCapabilities.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Enables or disables a capability on the dedicated host group.<br><br>Minimum api-version: 2022-03-01. + /// Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. internal partial class DedicatedHostGroupPropertiesAdditionalCapabilities { /// Initializes a new instance of DedicatedHostGroupPropertiesAdditionalCapabilities. @@ -16,13 +16,13 @@ public DedicatedHostGroupPropertiesAdditionalCapabilities() } /// Initializes a new instance of DedicatedHostGroupPropertiesAdditionalCapabilities. - /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. <br><br>NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. <br><br>Minimum api-version: 2022-03-01. + /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. internal DedicatedHostGroupPropertiesAdditionalCapabilities(bool? ultraSsdEnabled) { UltraSsdEnabled = ultraSsdEnabled; } - /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. <br><br>NOTE: The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. <br><br>Minimum api-version: 2022-03-01. + /// The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. public bool? UltraSsdEnabled { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostLicenseType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostLicenseType.cs index 96caffc1e4ec..fe69de899104 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostLicenseType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostLicenseType.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. + /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**. public enum DedicatedHostLicenseType { /// None. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs index 2651df57d2b8..1b83fbb5ffb0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.Serialization.cs @@ -15,6 +15,11 @@ public partial class DedicatedHostPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.cs index 845a45b2c4e7..2080f7aeab5d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostPatch.cs @@ -21,15 +21,17 @@ public DedicatedHostPatch() VirtualMachines = new ChangeTrackingList(); } + /// [List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. + public ComputeSku Sku { get; set; } /// Fault domain of the dedicated host within a dedicated host group. public int? PlatformFaultDomain { get; set; } /// Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. public bool? AutoReplaceOnFailure { get; set; } - /// A unique id generated and assigned to the dedicated host by the platform. <br><br> Does not change throughout the lifetime of the host. + /// A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. public string HostId { get; } /// A list of references to all virtual machines in the Dedicated Host. public IReadOnlyList VirtualMachines { get; } - /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. <br><br> Possible values are: <br><br> **None** <br><br> **Windows_Server_Hybrid** <br><br> **Windows_Server_Perpetual** <br><br> Default: **None**. + /// Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**. public DedicatedHostLicenseType? LicenseType { get; set; } /// The date when the host was first provisioned. public DateTimeOffset? ProvisioningOn { get; } @@ -37,7 +39,7 @@ public DedicatedHostPatch() public string ProvisioningState { get; } /// The dedicated host instance view. public DedicatedHostInstanceView InstanceView { get; } - /// Specifies the time at which the Dedicated Host resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs new file mode 100644 index 000000000000..78c25b617514 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + internal partial class DedicatedHostSizeListResult + { + internal static DedicatedHostSizeListResult DeserializeDedicatedHostSizeListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + value = array; + continue; + } + } + return new DedicatedHostSizeListResult(Optional.ToList(value)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.cs new file mode 100644 index 000000000000..0bed461c0292 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DedicatedHostSizeListResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The List Dedicated Host sizes operation response. + internal partial class DedicatedHostSizeListResult + { + /// Initializes a new instance of DedicatedHostSizeListResult. + internal DedicatedHostSizeListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DedicatedHostSizeListResult. + /// The list of dedicated host sizes. + internal DedicatedHostSizeListResult(IReadOnlyList value) + { + Value = value; + } + + /// The list of dedicated host sizes. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.cs index 583db0ed4137..1b5ddc760d36 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiagnosticsProfile.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. internal partial class DiagnosticsProfile { /// Initializes a new instance of DiagnosticsProfile. @@ -16,13 +16,13 @@ public DiagnosticsProfile() } /// Initializes a new instance of DiagnosticsProfile. - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. internal DiagnosticsProfile(BootDiagnostics bootDiagnostics) { BootDiagnostics = bootDiagnostics; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.cs index da6c6a9af796..a506af564aaa 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiffDiskSettings.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Describes the parameters of ephemeral disk settings that can be specified for operating system disk. <br><br> NOTE: The ephemeral disk settings can only be specified for managed disk. + /// Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk. public partial class DiffDiskSettings { /// Initializes a new instance of DiffDiskSettings. @@ -17,7 +17,7 @@ public DiffDiskSettings() /// Initializes a new instance of DiffDiskSettings. /// Specifies the ephemeral disk settings for operating system disk. - /// Specifies the ephemeral disk placement for operating system disk.<br><br> Possible values are: <br><br> **CacheDisk** <br><br> **ResourceDisk** <br><br> Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.<br><br> Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. + /// Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. internal DiffDiskSettings(DiffDiskOption? option, DiffDiskPlacement? placement) { Option = option; @@ -26,7 +26,7 @@ internal DiffDiskSettings(DiffDiskOption? option, DiffDiskPlacement? placement) /// Specifies the ephemeral disk settings for operating system disk. public DiffDiskOption? Option { get; set; } - /// Specifies the ephemeral disk placement for operating system disk.<br><br> Possible values are: <br><br> **CacheDisk** <br><br> **ResourceDisk** <br><br> Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.<br><br> Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. + /// Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. public DiffDiskPlacement? Placement { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskControllerType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskControllerType.cs index 540ebf055546..7f7c8141d588 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskControllerType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskControllerType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list) . <br> For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes. + /// Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes. public readonly partial struct DiskControllerType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOptionType.cs index b1a5e7c54f1e..533ed2b43d59 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOptionType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOptionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. public readonly partial struct DiskCreateOptionType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDeleteOptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDeleteOptionType.cs index 5183d3d39f42..4c0add346e36 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDeleteOptionType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskDeleteOptionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the behavior of the managed disk when the VM gets deleted i.e whether the managed disk is deleted or detached. Supported values:<br><br> **Delete** If this value is used, the managed disk is deleted when VM gets deleted.<br><br> **Detach** If this value is used, the managed disk is retained after VM gets deleted.<br><br> Minimum api-version: 2021-03-01. + /// Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01. public readonly partial struct DiskDeleteOptionType : IEquatable { private readonly string _value; 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 955f76dee7fc..68ff0079c181 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: **ForceDetach**. <br><br> 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. <br><br> 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 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 and is not supported for VirtualMachineScaleSet. 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/DiskRestorePointAttributes.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs new file mode 100644 index 000000000000..eaba34ad767f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class DiskRestorePointAttributes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption); + } + if (Optional.IsDefined(SourceDiskRestorePoint)) + { + writer.WritePropertyName("sourceDiskRestorePoint"u8); + JsonSerializer.Serialize(writer, SourceDiskRestorePoint); + } + writer.WriteEndObject(); + } + + internal static DiskRestorePointAttributes DeserializeDiskRestorePointAttributes(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional encryption = default; + Optional sourceDiskRestorePoint = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = RestorePointEncryption.DeserializeRestorePointEncryption(property.Value); + continue; + } + if (property.NameEquals("sourceDiskRestorePoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceDiskRestorePoint = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new DiskRestorePointAttributes(id.Value, encryption.Value, sourceDiskRestorePoint); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.cs new file mode 100644 index 000000000000..4b793e97e73f --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskRestorePointAttributes.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Disk Restore Point details. + public partial class DiskRestorePointAttributes : ComputeSubResourceData + { + /// Initializes a new instance of DiskRestorePointAttributes. + public DiskRestorePointAttributes() + { + } + + /// Initializes a new instance of DiskRestorePointAttributes. + /// Resource Id. + /// Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. + /// Resource Id of the source disk restore point. + internal DiskRestorePointAttributes(ResourceIdentifier id, RestorePointEncryption encryption, WritableSubResource sourceDiskRestorePoint) : base(id) + { + Encryption = encryption; + SourceDiskRestorePoint = sourceDiskRestorePoint; + } + + /// Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. + public RestorePointEncryption Encryption { get; set; } + /// Resource Id of the source disk restore point. + internal WritableSubResource SourceDiskRestorePoint { get; set; } + /// Gets or sets Id. + public ResourceIdentifier SourceDiskRestorePointId + { + get => SourceDiskRestorePoint is null ? default : SourceDiskRestorePoint.Id; + set + { + if (SourceDiskRestorePoint is null) + SourceDiskRestorePoint = new WritableSubResource(); + SourceDiskRestorePoint.Id = value; + } + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypeForListVm.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypeForListVm.cs new file mode 100644 index 000000000000..4181e664bfa7 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypeForListVm.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The ExpandTypeForListVm. + public readonly partial struct ExpandTypeForListVm : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExpandTypeForListVm(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InstanceViewValue = "instanceView"; + + /// instanceView. + public static ExpandTypeForListVm InstanceView { get; } = new ExpandTypeForListVm(InstanceViewValue); + /// Determines if two values are the same. + public static bool operator ==(ExpandTypeForListVm left, ExpandTypeForListVm right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExpandTypeForListVm left, ExpandTypeForListVm right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExpandTypeForListVm(string value) => new ExpandTypeForListVm(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExpandTypeForListVm other && Equals(other); + /// + public bool Equals(ExpandTypeForListVm other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypesForListVm.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypesForListVm.cs new file mode 100644 index 000000000000..ce264c148dff --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ExpandTypesForListVm.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The ExpandTypesForListVm. + public readonly partial struct ExpandTypesForListVm : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExpandTypesForListVm(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InstanceViewValue = "instanceView"; + + /// instanceView. + public static ExpandTypesForListVm InstanceView { get; } = new ExpandTypesForListVm(InstanceViewValue); + /// Determines if two values are the same. + public static bool operator ==(ExpandTypesForListVm left, ExpandTypesForListVm right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExpandTypesForListVm left, ExpandTypesForListVm right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExpandTypesForListVm(string value) => new ExpandTypesForListVm(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExpandTypesForListVm other && Equals(other); + /// + public bool Equals(ExpandTypesForListVm other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.cs index 8c471c333e2d..33c6083df015 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDataDisk.cs @@ -24,8 +24,8 @@ public ImageDataDisk(int lun) /// The snapshot. /// The managedDisk. /// The Virtual Hard Disk. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. - /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. + /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. /// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. /// Specifies the customer managed disk encryption set resource id for the managed image disk. /// Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.cs index 0f9bfd379c79..37e9c513e46f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageDisk.cs @@ -23,8 +23,8 @@ public ImageDisk() /// The snapshot. /// The managedDisk. /// The Virtual Hard Disk. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. - /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. + /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. /// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. /// Specifies the customer managed disk encryption set resource id for the managed image disk. internal ImageDisk(WritableSubResource snapshot, WritableSubResource managedDisk, Uri blobUri, CachingType? caching, int? diskSizeGB, StorageAccountType? storageAccountType, WritableSubResource diskEncryptionSet) @@ -68,9 +68,9 @@ public ResourceIdentifier ManagedDiskId /// The Virtual Hard Disk. public Uri BlobUri { get; set; } - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. public CachingType? Caching { get; set; } - /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. + /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. public int? DiskSizeGB { get; set; } /// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. public StorageAccountType? StorageAccountType { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.cs index 0b5cf478b6b2..5b8de26bf148 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ImageOSDisk.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Compute.Models public partial class ImageOSDisk : ImageDisk { /// Initializes a new instance of ImageOSDisk. - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**. /// The OS State. For managed images, use Generalized. public ImageOSDisk(SupportedOperatingSystemType osType, OperatingSystemStateType osState) { @@ -26,11 +26,11 @@ public ImageOSDisk(SupportedOperatingSystemType osType, OperatingSystemStateType /// The snapshot. /// The managedDisk. /// The Virtual Hard Disk. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. - /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. <br><br> This value cannot be larger than 1023 GB. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. + /// Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. /// Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. /// Specifies the customer managed disk encryption set resource id for the managed image disk. - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**. /// The OS State. For managed images, use Generalized. internal ImageOSDisk(WritableSubResource snapshot, WritableSubResource managedDisk, Uri blobUri, CachingType? caching, int? diskSizeGB, StorageAccountType? storageAccountType, WritableSubResource diskEncryptionSet, SupportedOperatingSystemType osType, OperatingSystemStateType osState) : base(snapshot, managedDisk, blobUri, caching, diskSizeGB, storageAccountType, diskEncryptionSet) { @@ -38,7 +38,7 @@ internal ImageOSDisk(WritableSubResource snapshot, WritableSubResource managedDi OSState = osState; } - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**. public SupportedOperatingSystemType OSType { get; set; } /// The OS State. For managed images, use Generalized. public OperatingSystemStateType OSState { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.cs index 0f0bbd6d9bf7..d32a4f4d2f70 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxConfiguration.cs @@ -9,7 +9,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). public partial class LinuxConfiguration { /// Initializes a new instance of LinuxConfiguration. @@ -20,7 +20,7 @@ public LinuxConfiguration() /// Initializes a new instance of LinuxConfiguration. /// Specifies whether password authentication should be disabled. /// Specifies the ssh key configuration for a Linux OS. - /// Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + /// Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. /// [Preview Feature] Specifies settings related to VM Guest Patching on Linux. /// Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false. internal LinuxConfiguration(bool? isPasswordAuthenticationDisabled, SshConfiguration ssh, bool? provisionVmAgent, LinuxPatchSettings patchSettings, bool? isVmAgentPlatformUpdatesEnabled) @@ -47,7 +47,7 @@ public IList SshPublicKeys } } - /// Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + /// Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. public bool? ProvisionVmAgent { get; set; } /// [Preview Feature] Specifies settings related to VM Guest Patching on Linux. public LinuxPatchSettings PatchSettings { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.cs index 0efc0d760c4e..4014a20a7982 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxPatchSettings.cs @@ -31,17 +31,6 @@ internal LinuxPatchSettings(LinuxVmGuestPatchMode? patchMode, LinuxPatchAssessme /// Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. public LinuxPatchAssessmentMode? AssessmentMode { get; set; } /// Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux. - internal LinuxVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get; set; } - /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - public LinuxVmGuestPatchAutomaticByPlatformRebootSetting? AutomaticByPlatformRebootSetting - { - get => AutomaticByPlatformSettings is null ? default : AutomaticByPlatformSettings.RebootSetting; - set - { - if (AutomaticByPlatformSettings is null) - AutomaticByPlatformSettings = new LinuxVmGuestPatchAutomaticByPlatformSettings(); - AutomaticByPlatformSettings.RebootSetting = value; - } - } + public LinuxVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index b3a82a9b30a9..7bbfbc99b4a4 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - internal partial class LinuxVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonSerializable + public partial class LinuxVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("rebootSetting"u8); writer.WriteStringValue(RebootSetting.Value.ToString()); } + if (Optional.IsDefined(BypassPlatformSafetyChecksOnUserSchedule)) + { + writer.WritePropertyName("bypassPlatformSafetyChecksOnUserSchedule"u8); + writer.WriteBooleanValue(BypassPlatformSafetyChecksOnUserSchedule.Value); + } writer.WriteEndObject(); } @@ -30,6 +35,7 @@ internal static LinuxVmGuestPatchAutomaticByPlatformSettings DeserializeLinuxVmG return null; } Optional rebootSetting = default; + Optional bypassPlatformSafetyChecksOnUserSchedule = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("rebootSetting"u8)) @@ -41,8 +47,17 @@ internal static LinuxVmGuestPatchAutomaticByPlatformSettings DeserializeLinuxVmG rebootSetting = new LinuxVmGuestPatchAutomaticByPlatformRebootSetting(property.Value.GetString()); continue; } + if (property.NameEquals("bypassPlatformSafetyChecksOnUserSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassPlatformSafetyChecksOnUserSchedule = property.Value.GetBoolean(); + continue; + } } - return new LinuxVmGuestPatchAutomaticByPlatformSettings(Optional.ToNullable(rebootSetting)); + return new LinuxVmGuestPatchAutomaticByPlatformSettings(Optional.ToNullable(rebootSetting), Optional.ToNullable(bypassPlatformSafetyChecksOnUserSchedule)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.cs index 62b2a998d724..84174fd86e31 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/LinuxVmGuestPatchAutomaticByPlatformSettings.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.Compute.Models { /// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. - internal partial class LinuxVmGuestPatchAutomaticByPlatformSettings + public partial class LinuxVmGuestPatchAutomaticByPlatformSettings { /// Initializes a new instance of LinuxVmGuestPatchAutomaticByPlatformSettings. public LinuxVmGuestPatchAutomaticByPlatformSettings() @@ -17,12 +17,16 @@ public LinuxVmGuestPatchAutomaticByPlatformSettings() /// Initializes a new instance of LinuxVmGuestPatchAutomaticByPlatformSettings. /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - internal LinuxVmGuestPatchAutomaticByPlatformSettings(LinuxVmGuestPatchAutomaticByPlatformRebootSetting? rebootSetting) + /// Enables customer to schedule patching without accidental upgrades. + internal LinuxVmGuestPatchAutomaticByPlatformSettings(LinuxVmGuestPatchAutomaticByPlatformRebootSetting? rebootSetting, bool? bypassPlatformSafetyChecksOnUserSchedule) { RebootSetting = rebootSetting; + BypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; } /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. public LinuxVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get; set; } + /// Enables customer to schedule patching without accidental upgrades. + public bool? BypassPlatformSafetyChecksOnUserSchedule { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs index 4e877f333887..3b76685bdc1e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/OSProfileProvisioningData.cs @@ -17,7 +17,7 @@ public OSProfileProvisioningData() /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). public string AdminPassword { get; set; } - /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). public string CustomData { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.cs index 9857dd5c115a..b5d4e8846941 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/PatchSettings.cs @@ -35,17 +35,6 @@ internal PatchSettings(WindowsVmGuestPatchMode? patchMode, bool? enableHotpatchi /// Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. public WindowsPatchAssessmentMode? AssessmentMode { get; set; } /// Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows. - internal WindowsVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get; set; } - /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - public WindowsVmGuestPatchAutomaticByPlatformRebootSetting? AutomaticByPlatformRebootSetting - { - get => AutomaticByPlatformSettings is null ? default : AutomaticByPlatformSettings.RebootSetting; - set - { - if (AutomaticByPlatformSettings is null) - AutomaticByPlatformSettings = new WindowsVmGuestPatchAutomaticByPlatformSettings(); - AutomaticByPlatformSettings.RebootSetting = value; - } - } + public WindowsVmGuestPatchAutomaticByPlatformSettings AutomaticByPlatformSettings { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupType.cs index 4a76e4d8ade6..179f65d535cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ProximityPlacementGroupType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. + /// Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. public readonly partial struct ProximityPlacementGroupType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointData.Serialization.cs index b2fde7f16bb2..8f36e2c87083 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointData.Serialization.cs @@ -32,6 +32,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(SourceMetadata)) + { + writer.WritePropertyName("sourceMetadata"u8); + writer.WriteObjectValue(SourceMetadata); + } if (Optional.IsDefined(ConsistencyMode)) { writer.WritePropertyName("consistencyMode"u8); diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs new file mode 100644 index 000000000000..d5bcbd70592c --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class RestorePointEncryption : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DiskEncryptionSet)) + { + writer.WritePropertyName("diskEncryptionSet"u8); + JsonSerializer.Serialize(writer, DiskEncryptionSet); + } + if (Optional.IsDefined(EncryptionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(EncryptionType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static RestorePointEncryption DeserializeRestorePointEncryption(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional diskEncryptionSet = default; + Optional type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskEncryptionSet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskEncryptionSet = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointEncryptionType(property.Value.GetString()); + continue; + } + } + return new RestorePointEncryption(diskEncryptionSet, Optional.ToNullable(type)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.cs new file mode 100644 index 000000000000..81b6213a65db --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryption.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. + public partial class RestorePointEncryption + { + /// Initializes a new instance of RestorePointEncryption. + public RestorePointEncryption() + { + } + + /// Initializes a new instance of RestorePointEncryption. + /// Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. + /// The type of key used to encrypt the data of the disk restore point. + internal RestorePointEncryption(WritableSubResource diskEncryptionSet, RestorePointEncryptionType? encryptionType) + { + DiskEncryptionSet = diskEncryptionSet; + EncryptionType = encryptionType; + } + + /// Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. + internal WritableSubResource DiskEncryptionSet { get; set; } + /// Gets or sets Id. + public ResourceIdentifier DiskEncryptionSetId + { + get => DiskEncryptionSet is null ? default : DiskEncryptionSet.Id; + set + { + if (DiskEncryptionSet is null) + DiskEncryptionSet = new WritableSubResource(); + DiskEncryptionSet.Id = value; + } + } + + /// The type of key used to encrypt the data of the disk restore point. + public RestorePointEncryptionType? EncryptionType { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryptionType.cs new file mode 100644 index 000000000000..9acc4fdf00f3 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointEncryptionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Compute.Models +{ + /// The type of key used to encrypt the data of the disk restore point. + public readonly partial struct RestorePointEncryptionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RestorePointEncryptionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EncryptionAtRestWithPlatformKeyValue = "EncryptionAtRestWithPlatformKey"; + private const string EncryptionAtRestWithCustomerKeyValue = "EncryptionAtRestWithCustomerKey"; + private const string EncryptionAtRestWithPlatformAndCustomerKeysValue = "EncryptionAtRestWithPlatformAndCustomerKeys"; + + /// Disk Restore Point is encrypted at rest with Platform managed key. + public static RestorePointEncryptionType EncryptionAtRestWithPlatformKey { get; } = new RestorePointEncryptionType(EncryptionAtRestWithPlatformKeyValue); + /// Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer. + public static RestorePointEncryptionType EncryptionAtRestWithCustomerKey { get; } = new RestorePointEncryptionType(EncryptionAtRestWithCustomerKeyValue); + /// Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + public static RestorePointEncryptionType EncryptionAtRestWithPlatformAndCustomerKeys { get; } = new RestorePointEncryptionType(EncryptionAtRestWithPlatformAndCustomerKeysValue); + /// Determines if two values are the same. + public static bool operator ==(RestorePointEncryptionType left, RestorePointEncryptionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RestorePointEncryptionType left, RestorePointEncryptionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RestorePointEncryptionType(string value) => new RestorePointEncryptionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RestorePointEncryptionType other && Equals(other); + /// + public bool Equals(RestorePointEncryptionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs index 947f1a61b2e5..ed709e0b9ff8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.Serialization.cs @@ -10,8 +10,19 @@ namespace Azure.ResourceManager.Compute.Models { - public partial class RestorePointSourceMetadata + public partial class RestorePointSourceMetadata : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StorageProfile)) + { + writer.WritePropertyName("storageProfile"u8); + writer.WriteObjectValue(StorageProfile); + } + writer.WriteEndObject(); + } + internal static RestorePointSourceMetadata DeserializeRestorePointSourceMetadata(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -27,6 +38,7 @@ internal static RestorePointSourceMetadata DeserializeRestorePointSourceMetadata Optional securityProfile = default; Optional location = default; Optional userData = default; + Optional hyperVGeneration = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hardwareProfile"u8)) @@ -98,8 +110,17 @@ internal static RestorePointSourceMetadata DeserializeRestorePointSourceMetadata userData = property.Value.GetString(); continue; } + if (property.NameEquals("hyperVGeneration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hyperVGeneration = new HyperVGeneration(property.Value.GetString()); + continue; + } } - return new RestorePointSourceMetadata(hardwareProfile.Value, storageProfile.Value, osProfile.Value, diagnosticsProfile.Value, licenseType.Value, vmId.Value, securityProfile.Value, Optional.ToNullable(location), userData.Value); + return new RestorePointSourceMetadata(hardwareProfile.Value, storageProfile.Value, osProfile.Value, diagnosticsProfile.Value, licenseType.Value, vmId.Value, securityProfile.Value, Optional.ToNullable(location), userData.Value, Optional.ToNullable(hyperVGeneration)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs index 1681eed9e5fe..d613f3a06181 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceMetadata.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.Compute.Models public partial class RestorePointSourceMetadata { /// Initializes a new instance of RestorePointSourceMetadata. - internal RestorePointSourceMetadata() + public RestorePointSourceMetadata() { } @@ -27,7 +27,8 @@ internal RestorePointSourceMetadata() /// Gets the security profile. /// Location of the VM from which the restore point was created. /// UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. - internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfile, RestorePointSourceVmStorageProfile storageProfile, VirtualMachineOSProfile osProfile, DiagnosticsProfile diagnosticsProfile, string licenseType, string vmId, SecurityProfile securityProfile, AzureLocation? location, string userData) + /// HyperVGeneration of the source VM for which restore point is captured. + internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfile, RestorePointSourceVmStorageProfile storageProfile, VirtualMachineOSProfile osProfile, DiagnosticsProfile diagnosticsProfile, string licenseType, string vmId, SecurityProfile securityProfile, AzureLocation? location, string userData, HyperVGeneration? hyperVGeneration) { HardwareProfile = hardwareProfile; StorageProfile = storageProfile; @@ -38,17 +39,18 @@ internal RestorePointSourceMetadata(VirtualMachineHardwareProfile hardwareProfil SecurityProfile = securityProfile; Location = location; UserData = userData; + HyperVGeneration = hyperVGeneration; } /// Gets the hardware profile. public VirtualMachineHardwareProfile HardwareProfile { get; } /// Gets the storage profile. - public RestorePointSourceVmStorageProfile StorageProfile { get; } + public RestorePointSourceVmStorageProfile StorageProfile { get; set; } /// Gets the OS profile. public VirtualMachineOSProfile OSProfile { get; } /// Gets the diagnostics profile. internal DiagnosticsProfile DiagnosticsProfile { get; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile?.BootDiagnostics; @@ -64,5 +66,7 @@ public BootDiagnostics BootDiagnostics public AzureLocation? Location { get; } /// UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. public string UserData { get; } + /// HyperVGeneration of the source VM for which restore point is captured. + public HyperVGeneration? HyperVGeneration { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs index dc1db9b39ef7..376e3b375f4c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.Serialization.cs @@ -7,12 +7,27 @@ using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { - public partial class RestorePointSourceVmDataDisk + public partial class RestorePointSourceVmDataDisk : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ManagedDisk)) + { + writer.WritePropertyName("managedDisk"u8); + writer.WriteObjectValue(ManagedDisk); + } + if (Optional.IsDefined(DiskRestorePoint)) + { + writer.WritePropertyName("diskRestorePoint"u8); + writer.WriteObjectValue(DiskRestorePoint); + } + writer.WriteEndObject(); + } + internal static RestorePointSourceVmDataDisk DeserializeRestorePointSourceVmDataDisk(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -24,7 +39,8 @@ internal static RestorePointSourceVmDataDisk DeserializeRestorePointSourceVmData Optional caching = default; Optional diskSizeGB = default; Optional managedDisk = default; - Optional diskRestorePoint = default; + Optional diskRestorePoint = default; + Optional writeAcceleratorEnabled = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("lun"u8)) @@ -74,11 +90,20 @@ internal static RestorePointSourceVmDataDisk DeserializeRestorePointSourceVmData { continue; } - diskRestorePoint = JsonSerializer.Deserialize(property.Value.GetRawText()); + diskRestorePoint = DiskRestorePointAttributes.DeserializeDiskRestorePointAttributes(property.Value); + continue; + } + if (property.NameEquals("writeAcceleratorEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeAcceleratorEnabled = property.Value.GetBoolean(); continue; } } - return new RestorePointSourceVmDataDisk(Optional.ToNullable(lun), name.Value, Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), managedDisk.Value, diskRestorePoint); + return new RestorePointSourceVmDataDisk(Optional.ToNullable(lun), name.Value, Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), managedDisk.Value, diskRestorePoint.Value, Optional.ToNullable(writeAcceleratorEnabled)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.cs index 8986201abae6..6d503f430fe5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmDataDisk.cs @@ -5,16 +5,13 @@ #nullable disable -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - namespace Azure.ResourceManager.Compute.Models { /// Describes a data disk. public partial class RestorePointSourceVmDataDisk { /// Initializes a new instance of RestorePointSourceVmDataDisk. - internal RestorePointSourceVmDataDisk() + public RestorePointSourceVmDataDisk() { } @@ -23,9 +20,10 @@ internal RestorePointSourceVmDataDisk() /// Gets the disk name. /// Gets the caching type. /// Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. - /// Gets the managed disk details. - /// Gets the disk restore point Id. - internal RestorePointSourceVmDataDisk(int? lun, string name, CachingType? caching, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, WritableSubResource diskRestorePoint) + /// Contains the managed disk details. + /// Contains Disk Restore Point properties. + /// Shows true if the disk is write-accelerator enabled. + internal RestorePointSourceVmDataDisk(int? lun, string name, CachingType? caching, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, DiskRestorePointAttributes diskRestorePoint, bool? writeAcceleratorEnabled) { Lun = lun; Name = name; @@ -33,6 +31,7 @@ internal RestorePointSourceVmDataDisk(int? lun, string name, CachingType? cachin DiskSizeGB = diskSizeGB; ManagedDisk = managedDisk; DiskRestorePoint = diskRestorePoint; + WriteAcceleratorEnabled = writeAcceleratorEnabled; } /// Gets the logical unit number. @@ -43,14 +42,11 @@ internal RestorePointSourceVmDataDisk(int? lun, string name, CachingType? cachin public CachingType? Caching { get; } /// Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. public int? DiskSizeGB { get; } - /// Gets the managed disk details. - public VirtualMachineManagedDisk ManagedDisk { get; } - /// Gets the disk restore point Id. - internal WritableSubResource DiskRestorePoint { get; } - /// Gets or sets Id. - public ResourceIdentifier DiskRestorePointId - { - get => DiskRestorePoint?.Id; - } + /// Contains the managed disk details. + public VirtualMachineManagedDisk ManagedDisk { get; set; } + /// Contains Disk Restore Point properties. + public DiskRestorePointAttributes DiskRestorePoint { get; set; } + /// Shows true if the disk is write-accelerator enabled. + public bool? WriteAcceleratorEnabled { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs index d5507774ab83..56b5e0eec073 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.Serialization.cs @@ -7,12 +7,27 @@ using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { - public partial class RestorePointSourceVmOSDisk + public partial class RestorePointSourceVmOSDisk : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ManagedDisk)) + { + writer.WritePropertyName("managedDisk"u8); + writer.WriteObjectValue(ManagedDisk); + } + if (Optional.IsDefined(DiskRestorePoint)) + { + writer.WritePropertyName("diskRestorePoint"u8); + writer.WriteObjectValue(DiskRestorePoint); + } + writer.WriteEndObject(); + } + internal static RestorePointSourceVmOSDisk DeserializeRestorePointSourceVmOSDisk(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -25,7 +40,8 @@ internal static RestorePointSourceVmOSDisk DeserializeRestorePointSourceVmOSDisk Optional caching = default; Optional diskSizeGB = default; Optional managedDisk = default; - Optional diskRestorePoint = default; + Optional diskRestorePoint = default; + Optional writeAcceleratorEnabled = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("osType"u8)) @@ -84,11 +100,20 @@ internal static RestorePointSourceVmOSDisk DeserializeRestorePointSourceVmOSDisk { continue; } - diskRestorePoint = JsonSerializer.Deserialize(property.Value.GetRawText()); + diskRestorePoint = DiskRestorePointAttributes.DeserializeDiskRestorePointAttributes(property.Value); + continue; + } + if (property.NameEquals("writeAcceleratorEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeAcceleratorEnabled = property.Value.GetBoolean(); continue; } } - return new RestorePointSourceVmOSDisk(Optional.ToNullable(osType), encryptionSettings.Value, name.Value, Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), managedDisk.Value, diskRestorePoint); + return new RestorePointSourceVmOSDisk(Optional.ToNullable(osType), encryptionSettings.Value, name.Value, Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), managedDisk.Value, diskRestorePoint.Value, Optional.ToNullable(writeAcceleratorEnabled)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.cs index b690823b4a4b..46a3be19c237 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmOSDisk.cs @@ -5,16 +5,13 @@ #nullable disable -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - namespace Azure.ResourceManager.Compute.Models { /// Describes an Operating System disk. public partial class RestorePointSourceVmOSDisk { /// Initializes a new instance of RestorePointSourceVmOSDisk. - internal RestorePointSourceVmOSDisk() + public RestorePointSourceVmOSDisk() { } @@ -25,8 +22,9 @@ internal RestorePointSourceVmOSDisk() /// Gets the caching type. /// Gets the disk size in GB. /// Gets the managed disk details. - /// Gets the disk restore point Id. - internal RestorePointSourceVmOSDisk(OperatingSystemType? osType, DiskEncryptionSettings encryptionSettings, string name, CachingType? caching, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, WritableSubResource diskRestorePoint) + /// Contains Disk Restore Point properties. + /// Shows true if the disk is write-accelerator enabled. + internal RestorePointSourceVmOSDisk(OperatingSystemType? osType, DiskEncryptionSettings encryptionSettings, string name, CachingType? caching, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, DiskRestorePointAttributes diskRestorePoint, bool? writeAcceleratorEnabled) { OSType = osType; EncryptionSettings = encryptionSettings; @@ -35,6 +33,7 @@ internal RestorePointSourceVmOSDisk(OperatingSystemType? osType, DiskEncryptionS DiskSizeGB = diskSizeGB; ManagedDisk = managedDisk; DiskRestorePoint = diskRestorePoint; + WriteAcceleratorEnabled = writeAcceleratorEnabled; } /// Gets the Operating System type. @@ -48,13 +47,10 @@ internal RestorePointSourceVmOSDisk(OperatingSystemType? osType, DiskEncryptionS /// Gets the disk size in GB. public int? DiskSizeGB { get; } /// Gets the managed disk details. - public VirtualMachineManagedDisk ManagedDisk { get; } - /// Gets the disk restore point Id. - internal WritableSubResource DiskRestorePoint { get; } - /// Gets or sets Id. - public ResourceIdentifier DiskRestorePointId - { - get => DiskRestorePoint?.Id; - } + public VirtualMachineManagedDisk ManagedDisk { get; set; } + /// Contains Disk Restore Point properties. + public DiskRestorePointAttributes DiskRestorePoint { get; set; } + /// Shows true if the disk is write-accelerator enabled. + public bool? WriteAcceleratorEnabled { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs index 9de9aebafb2d..b44a9d2df703 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.Serialization.cs @@ -11,8 +11,29 @@ namespace Azure.ResourceManager.Compute.Models { - public partial class RestorePointSourceVmStorageProfile + public partial class RestorePointSourceVmStorageProfile : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(OSDisk)) + { + writer.WritePropertyName("osDisk"u8); + writer.WriteObjectValue(OSDisk); + } + if (Optional.IsCollectionDefined(DataDisks)) + { + writer.WritePropertyName("dataDisks"u8); + writer.WriteStartArray(); + foreach (var item in DataDisks) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + internal static RestorePointSourceVmStorageProfile DeserializeRestorePointSourceVmStorageProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -20,7 +41,7 @@ internal static RestorePointSourceVmStorageProfile DeserializeRestorePointSource return null; } Optional osDisk = default; - Optional> dataDisks = default; + Optional> dataDisks = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("osDisk"u8)) diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.cs index 84c12f8ae8e5..950727f398f3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RestorePointSourceVmStorageProfile.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Compute.Models public partial class RestorePointSourceVmStorageProfile { /// Initializes a new instance of RestorePointSourceVmStorageProfile. - internal RestorePointSourceVmStorageProfile() + public RestorePointSourceVmStorageProfile() { DataDisks = new ChangeTrackingList(); } @@ -22,15 +22,15 @@ internal RestorePointSourceVmStorageProfile() /// Initializes a new instance of RestorePointSourceVmStorageProfile. /// Gets the OS disk of the VM captured at the time of the restore point creation. /// Gets the data disks of the VM captured at the time of the restore point creation. - internal RestorePointSourceVmStorageProfile(RestorePointSourceVmOSDisk osDisk, IReadOnlyList dataDisks) + internal RestorePointSourceVmStorageProfile(RestorePointSourceVmOSDisk osDisk, IList dataDisks) { OSDisk = osDisk; DataDisks = dataDisks; } /// Gets the OS disk of the VM captured at the time of the restore point creation. - public RestorePointSourceVmOSDisk OSDisk { get; } + public RestorePointSourceVmOSDisk OSDisk { get; set; } /// Gets the data disks of the VM captured at the time of the restore point creation. - public IReadOnlyList DataDisks { get; } + public IList DataDisks { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs new file mode 100644 index 000000000000..a09c8450a0a0 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class RunCommandManagedIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + } + writer.WriteEndObject(); + } + + internal static RunCommandManagedIdentity DeserializeRunCommandManagedIdentity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional clientId = default; + Optional objectId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + } + return new RunCommandManagedIdentity(clientId.Value, objectId.Value); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.cs new file mode 100644 index 000000000000..b23305df77f1 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/RunCommandManagedIdentity.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Compute.Models +{ + /// Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public partial class RunCommandManagedIdentity + { + /// Initializes a new instance of RunCommandManagedIdentity. + public RunCommandManagedIdentity() + { + } + + /// Initializes a new instance of RunCommandManagedIdentity. + /// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + /// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + internal RunCommandManagedIdentity(string clientId, string objectId) + { + ClientId = clientId; + ObjectId = objectId; + } + + /// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + public string ClientId { get; set; } + /// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + public string ObjectId { get; set; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityEncryptionType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityEncryptionType.cs index ed3794c84ad1..561aac03865a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityEncryptionType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityEncryptionType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the EncryptionType of the managed disk. <br> It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. <br><br> NOTE: It can be set for only Confidential VMs. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. public readonly partial struct SecurityEncryptionType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.Serialization.cs new file mode 100644 index 000000000000..9c39bc905f5d --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Compute; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class SecurityPostureReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(ExcludeExtensions)) + { + writer.WritePropertyName("excludeExtensions"u8); + writer.WriteStartArray(); + foreach (var item in ExcludeExtensions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static SecurityPostureReference DeserializeSecurityPostureReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional> excludeExtensions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("excludeExtensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineExtensionData.DeserializeVirtualMachineExtensionData(item)); + } + excludeExtensions = array; + continue; + } + } + return new SecurityPostureReference(id.Value, Optional.ToList(excludeExtensions)); + } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.cs new file mode 100644 index 000000000000..5f6b484d7d82 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityPostureReference.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Compute; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01. + public partial class SecurityPostureReference + { + /// Initializes a new instance of SecurityPostureReference. + public SecurityPostureReference() + { + ExcludeExtensions = new ChangeTrackingList(); + } + + /// Initializes a new instance of SecurityPostureReference. + /// The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. + /// List of virtual machine extensions to exclude when applying the Security Posture. + internal SecurityPostureReference(string id, IList excludeExtensions) + { + Id = id; + ExcludeExtensions = excludeExtensions; + } + + /// The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest. + public string Id { get; set; } + /// List of virtual machine extensions to exclude when applying the Security Posture. + public IList ExcludeExtensions { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.cs index e2d955378ac8..502be4b788c1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityProfile.cs @@ -16,9 +16,9 @@ public SecurityProfile() } /// Initializes a new instance of SecurityProfile. - /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. <br><br>Minimum api-version: 2020-12-01. - /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. <br><br> Default: The Encryption at host will be disabled unless this property is set to true for the resource. - /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. <br><br> Default: UefiSettings will not be enabled unless this property is set. + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource. + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. internal SecurityProfile(UefiSettings uefiSettings, bool? encryptionAtHost, SecurityType? securityType) { UefiSettings = uefiSettings; @@ -26,11 +26,11 @@ internal SecurityProfile(UefiSettings uefiSettings, bool? encryptionAtHost, Secu SecurityType = securityType; } - /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. <br><br>Minimum api-version: 2020-12-01. + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. public UefiSettings UefiSettings { get; set; } - /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. <br><br> Default: The Encryption at host will be disabled unless this property is set to true for the resource. + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource. public bool? EncryptionAtHost { get; set; } - /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. <br><br> Default: UefiSettings will not be enabled unless this property is set. + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. public SecurityType? SecurityType { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityType.cs index db53221827bf..472e6c9bbf2c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SecurityType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. <br><br> Default: UefiSettings will not be enabled unless this property is set. + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. public readonly partial struct SecurityType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.cs index eac26665e3f8..c03c7af1bcd6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SpotRestorePolicy.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the Spot-Try-Restore properties for the virtual machine scale set. <br><br> With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. + /// Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. public partial class SpotRestorePolicy { /// Initializes a new instance of SpotRestorePolicy. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.cs index 36c1c8d9934e..9c1a5711b216 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/SshPublicKeyConfiguration.cs @@ -17,7 +17,7 @@ public SshPublicKeyConfiguration() /// Initializes a new instance of SshPublicKeyConfiguration. /// Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. - /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). internal SshPublicKeyConfiguration(string path, string keyData) { Path = path; @@ -26,7 +26,7 @@ internal SshPublicKeyConfiguration(string path, string keyData) /// Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. public string Path { get; set; } - /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). public string KeyData { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.cs index eceb36bf354e..6db4d949be2f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/UefiSettings.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. <br><br>Minimum api-version: 2020-12-01. + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. public partial class UefiSettings { /// Initializes a new instance of UefiSettings. @@ -16,17 +16,17 @@ public UefiSettings() } /// Initializes a new instance of UefiSettings. - /// Specifies whether secure boot should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01. - /// Specifies whether vTPM should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01. + /// Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01. + /// Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01. internal UefiSettings(bool? isSecureBootEnabled, bool? isVirtualTpmEnabled) { IsSecureBootEnabled = isSecureBootEnabled; IsVirtualTpmEnabled = isVirtualTpmEnabled; } - /// Specifies whether secure boot should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01. + /// Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01. public bool? IsSecureBootEnabled { get; set; } - /// Specifies whether vTPM should be enabled on the virtual machine. <br><br>Minimum api-version: 2020-12-01. + /// Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01. public bool? IsVirtualTpmEnabled { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.cs index ae109330fae5..481f38885e00 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VaultCertificate.cs @@ -19,7 +19,7 @@ public VaultCertificate() /// Initializes a new instance of VaultCertificate. /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted. internal VaultCertificate(Uri certificateUri, string certificateStore) { CertificateUri = certificateUri; @@ -28,7 +28,7 @@ internal VaultCertificate(Uri certificateUri, string certificateStore) /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). public Uri CertificateUri { get; set; } - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted. public string CertificateStore { get; set; } } } 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 51b001bb7f31..6059af1c50fd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDataDisk.cs @@ -14,7 +14,7 @@ public partial class VirtualMachineDataDisk { /// Initializes a new instance of VirtualMachineDataDisk. /// Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. public VirtualMachineDataDisk(int lun, DiskCreateOptionType createOption) { Lun = lun; @@ -26,16 +26,16 @@ public VirtualMachineDataDisk(int lun, DiskCreateOptionType createOption) /// The disk name. /// The virtual hard disk. /// The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. /// Specifies whether writeAccelerator should be enabled or disabled on the disk. - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. /// The managed disk parameters. /// 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**. <br><br> 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. <br><br> 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 whether data disk should be deleted or detached upon VM deletion.<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VM is deleted.<br><br> The default value is set to **detach**. + /// 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 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**. internal VirtualMachineDataDisk(int lun, string name, VirtualHardDisk vhd, VirtualHardDisk image, CachingType? caching, bool? writeAcceleratorEnabled, DiskCreateOptionType createOption, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, bool? toBeDetached, long? diskIopsReadWrite, long? diskMBpsReadWrite, DiskDetachOptionType? detachOption, DiskDeleteOptionType? deleteOption) { Lun = lun; @@ -86,13 +86,13 @@ public Uri ImageUri } } - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. public CachingType? Caching { get; set; } /// Specifies whether writeAccelerator should be enabled or disabled on the disk. public bool? WriteAcceleratorEnabled { get; set; } - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. public DiskCreateOptionType CreateOption { get; set; } - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. public int? DiskSizeGB { get; set; } /// The managed disk parameters. public VirtualMachineManagedDisk ManagedDisk { get; set; } @@ -102,9 +102,9 @@ public Uri ImageUri 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**. <br><br> 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. <br><br> 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. **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'. public DiskDetachOptionType? DetachOption { get; set; } - /// Specifies whether data disk should be deleted or detached upon VM deletion.<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VM is deleted.<br><br> The default value is set to **detach**. + /// 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/Generated/Models/VirtualMachineDiskSecurityProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.cs index 7533cd11330b..957152d7ba5e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineDiskSecurityProfile.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the security profile settings for the managed disk. <br><br> NOTE: It can only be set for Confidential VMs. + /// Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. public partial class VirtualMachineDiskSecurityProfile { /// Initializes a new instance of VirtualMachineDiskSecurityProfile. @@ -19,7 +19,7 @@ public VirtualMachineDiskSecurityProfile() } /// Initializes a new instance of VirtualMachineDiskSecurityProfile. - /// Specifies the EncryptionType of the managed disk. <br> It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. <br><br> NOTE: It can be set for only Confidential VMs. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. /// Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. internal VirtualMachineDiskSecurityProfile(SecurityEncryptionType? securityEncryptionType, WritableSubResource diskEncryptionSet) { @@ -27,7 +27,7 @@ internal VirtualMachineDiskSecurityProfile(SecurityEncryptionType? securityEncry DiskEncryptionSet = diskEncryptionSet; } - /// Specifies the EncryptionType of the managed disk. <br> It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. <br><br> NOTE: It can be set for only Confidential VMs. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. public SecurityEncryptionType? SecurityEncryptionType { get; set; } /// Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. internal WritableSubResource DiskEncryptionSet { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionData.Serialization.cs index ddcea1d99905..38a37e1e7fd2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineExtensionData.Serialization.cs @@ -97,6 +97,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("protectedSettingsFromKeyVault"u8); writer.WriteObjectValue(KeyVaultProtectedSettings); } + if (Optional.IsCollectionDefined(ProvisionAfterExtensions)) + { + writer.WritePropertyName("provisionAfterExtensions"u8); + writer.WriteStartArray(); + foreach (var item in ProvisionAfterExtensions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -125,6 +135,7 @@ internal static VirtualMachineExtensionData DeserializeVirtualMachineExtensionDa Optional instanceView = default; Optional suppressFailures = default; Optional protectedSettingsFromKeyVault = default; + Optional> provisionAfterExtensions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -267,11 +278,25 @@ internal static VirtualMachineExtensionData DeserializeVirtualMachineExtensionDa protectedSettingsFromKeyVault = KeyVaultSecretReference.DeserializeKeyVaultSecretReference(property0.Value); continue; } + if (property0.NameEquals("provisionAfterExtensions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + provisionAfterExtensions = array; + continue; + } } continue; } } - return new VirtualMachineExtensionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, forceUpdateTag.Value, publisher.Value, type0.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), Optional.ToNullable(enableAutomaticUpgrade), settings.Value, protectedSettings.Value, provisioningState.Value, instanceView.Value, Optional.ToNullable(suppressFailures), protectedSettingsFromKeyVault.Value); + return new VirtualMachineExtensionData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, forceUpdateTag.Value, publisher.Value, type0.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), Optional.ToNullable(enableAutomaticUpgrade), settings.Value, protectedSettings.Value, provisioningState.Value, instanceView.Value, Optional.ToNullable(suppressFailures), protectedSettingsFromKeyVault.Value, Optional.ToList(provisionAfterExtensions)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.cs index 8a857f37ca33..ceeaab6a3f1f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineHardwareProfile.cs @@ -16,17 +16,17 @@ public VirtualMachineHardwareProfile() } /// Initializes a new instance of VirtualMachineHardwareProfile. - /// Specifies the size of the virtual machine. <br><br> The enum data type is currently deprecated and will be removed by December 23rd 2023. <br><br> Recommended way to get the list of available sizes is using these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. <br><br> This feature is still in preview mode and is not supported for VirtualMachineScaleSet. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. internal VirtualMachineHardwareProfile(VirtualMachineSizeType? vmSize, VirtualMachineSizeProperties vmSizeProperties) { VmSize = vmSize; VmSizeProperties = vmSizeProperties; } - /// Specifies the size of the virtual machine. <br><br> The enum data type is currently deprecated and will be removed by December 23rd 2023. <br><br> Recommended way to get the list of available sizes is using these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. + /// Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. public VirtualMachineSizeType? VmSize { get; set; } - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. <br><br> This feature is still in preview mode and is not supported for VirtualMachineScaleSet. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. public VirtualMachineSizeProperties VmSizeProperties { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.cs index 8e320087ff1b..bcd628260790 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineInstanceView.cs @@ -34,8 +34,8 @@ internal VirtualMachineInstanceView() /// The virtual machine disk information. /// The extensions information. /// The health status for the VM. - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. - /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. /// The resource status information. /// [Preview Feature] The status of virtual machine patch operations. internal VirtualMachineInstanceView(int? platformUpdateDomain, int? platformFaultDomain, string computerName, string osName, string osVersion, HyperVGeneration? hyperVGeneration, string rdpThumbPrint, VirtualMachineAgentInstanceView vmAgent, MaintenanceRedeployStatus maintenanceRedeployStatus, IReadOnlyList disks, IReadOnlyList extensions, VirtualMachineHealthStatus vmHealth, BootDiagnosticsInstanceView bootDiagnostics, string assignedHost, IReadOnlyList statuses, VirtualMachinePatchStatus patchStatus) @@ -88,9 +88,9 @@ public InstanceViewStatus VmHealthStatus get => VmHealth?.Status; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnosticsInstanceView BootDiagnostics { get; } - /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01. + /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. public string AssignedHost { get; } /// The resource status information. public IReadOnlyList Statuses { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.cs index 30ed75635fa8..4731d623123f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSDisk.cs @@ -9,29 +9,29 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). public partial class VirtualMachineOSDisk { /// Initializes a new instance of VirtualMachineOSDisk. - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. public VirtualMachineOSDisk(DiskCreateOptionType createOption) { CreateOption = createOption; } /// Initializes a new instance of VirtualMachineOSDisk. - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. - /// Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. + /// Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15. /// The disk name. /// The virtual hard disk. /// The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None** for Standard storage. **ReadOnly** for Premium storage. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. /// Specifies whether writeAccelerator should be enabled or disabled on the disk. /// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. /// The managed disk parameters. - /// Specifies whether OS Disk should be deleted or detached upon VM deletion. <br><br> Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VM is deleted.<br><br> **Detach** If this value is used, the os disk is retained after VM is deleted. <br><br> The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. + /// Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk. internal VirtualMachineOSDisk(SupportedOperatingSystemType? osType, DiskEncryptionSettings encryptionSettings, string name, VirtualHardDisk vhd, VirtualHardDisk image, CachingType? caching, bool? writeAcceleratorEnabled, DiffDiskSettings diffDiskSettings, DiskCreateOptionType createOption, int? diskSizeGB, VirtualMachineManagedDisk managedDisk, DiskDeleteOptionType? deleteOption) { OSType = osType; @@ -48,9 +48,9 @@ internal VirtualMachineOSDisk(SupportedOperatingSystemType? osType, DiskEncrypti DeleteOption = deleteOption; } - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. public SupportedOperatingSystemType? OSType { get; set; } - /// Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15. + /// Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15. public DiskEncryptionSettings EncryptionSettings { get; set; } /// The disk name. public string Name { get; set; } @@ -82,19 +82,19 @@ public Uri ImageUri } } - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None** for Standard storage. **ReadOnly** for Premium storage. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**. public CachingType? Caching { get; set; } /// Specifies whether writeAccelerator should be enabled or disabled on the disk. public bool? WriteAcceleratorEnabled { get; set; } /// Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. public DiffDiskSettings DiffDiskSettings { get; set; } - /// Specifies how the virtual machine should be created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.<br><br> **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. public DiskCreateOptionType CreateOption { get; set; } - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. public int? DiskSizeGB { get; set; } /// The managed disk parameters. public VirtualMachineManagedDisk ManagedDisk { get; set; } - /// Specifies whether OS Disk should be deleted or detached upon VM deletion. <br><br> Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VM is deleted.<br><br> **Detach** If this value is used, the os disk is retained after VM is deleted. <br><br> The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. + /// Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk. public DiskDeleteOptionType? DeleteOption { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.cs index ea235c728f20..f84475ac3004 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineOSProfile.cs @@ -20,14 +20,14 @@ public VirtualMachineOSProfile() } /// Initializes a new instance of VirtualMachineOSProfile. - /// Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + /// Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "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". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). - /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). /// Specifies Windows operating system settings on the virtual machine. - /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). /// Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - /// Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine. + /// Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. /// Optional property which must either be set to True or omitted. internal VirtualMachineOSProfile(string computerName, string adminUsername, string adminPassword, string customData, WindowsConfiguration windowsConfiguration, LinuxConfiguration linuxConfiguration, IList secrets, bool? allowExtensionOperations, bool? requireGuestProvisionSignal) { @@ -42,21 +42,21 @@ internal VirtualMachineOSProfile(string computerName, string adminUsername, stri RequireGuestProvisionSignal = requireGuestProvisionSignal; } - /// Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + /// Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). public string ComputerName { get; set; } /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "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". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. public string AdminUsername { get; set; } /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). public string AdminPassword { get; set; } - /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). public string CustomData { get; set; } /// Specifies Windows operating system settings on the virtual machine. public WindowsConfiguration WindowsConfiguration { get; set; } - /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). public LinuxConfiguration LinuxConfiguration { get; set; } /// Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). public IList Secrets { get; } - /// Specifies whether extension operations should be allowed on the virtual machine. <br><br>This may only be set to False when no extensions are present on the virtual machine. + /// Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. public bool? AllowExtensionOperations { get; set; } /// Optional property which must either be set to True or omitted. public bool? RequireGuestProvisionSignal { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs index cd5fe602cb0f..ba87bf7a23df 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePatch.cs @@ -40,9 +40,9 @@ public VirtualMachinePatch() public VirtualMachineNetworkProfile NetworkProfile { get; set; } /// Specifies the Security related profile settings for the virtual machine. public SecurityProfile SecurityProfile { get; set; } - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; @@ -54,7 +54,7 @@ public BootDiagnostics BootDiagnostics } } - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. internal WritableSubResource AvailabilitySet { get; set; } /// Gets or sets Id. public ResourceIdentifier AvailabilitySetId @@ -68,7 +68,7 @@ public ResourceIdentifier AvailabilitySetId } } - /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01. + /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. internal WritableSubResource VirtualMachineScaleSet { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualMachineScaleSetId @@ -82,7 +82,7 @@ public ResourceIdentifier VirtualMachineScaleSetId } } - /// Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. internal WritableSubResource ProximityPlacementGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier ProximityPlacementGroupId @@ -96,11 +96,11 @@ public ResourceIdentifier ProximityPlacementGroupId } } - /// Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01. public VirtualMachinePriorityType? Priority { get; set; } - /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. public VirtualMachineEvictionPolicyType? EvictionPolicy { get; set; } - /// Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. internal BillingProfile BillingProfile { get; set; } /// Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01. public double? BillingMaxPrice @@ -114,7 +114,7 @@ public double? BillingMaxPrice } } - /// Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01. + /// Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. internal WritableSubResource Host { get; set; } /// Gets or sets Id. public ResourceIdentifier HostId @@ -128,7 +128,7 @@ public ResourceIdentifier HostId } } - /// Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties. + /// Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. internal WritableSubResource HostGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier HostGroupId @@ -150,15 +150,15 @@ public ResourceIdentifier HostGroupId public string LicenseType { get; set; } /// Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. public string VmId { get; } - /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01. + /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. public string ExtensionsTimeBudget { get; set; } - /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01. + /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. public int? PlatformFaultDomain { get; set; } /// Specifies Scheduled Event related configurations. public ComputeScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. public string UserData { get; set; } - /// Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01. + /// Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. internal CapacityReservationProfile CapacityReservation { get; set; } /// Gets or sets Id. public ResourceIdentifier CapacityReservationGroupId @@ -185,7 +185,7 @@ public IList GalleryApplications } } - /// Specifies the time at which the Virtual Machine resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePriorityType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePriorityType.cs index f28f120c8de4..f80ca4f41cd1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePriorityType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachinePriorityType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. <br><br> 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS. + /// Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS. public readonly partial struct VirtualMachinePriorityType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandData.Serialization.cs index eb9c862b8eba..4a5c0f16d947 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandData.Serialization.cs @@ -89,6 +89,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("errorBlobUri"u8); writer.WriteStringValue(ErrorBlobUri.AbsoluteUri); } + if (Optional.IsDefined(OutputBlobManagedIdentity)) + { + writer.WritePropertyName("outputBlobManagedIdentity"u8); + writer.WriteObjectValue(OutputBlobManagedIdentity); + } + if (Optional.IsDefined(ErrorBlobManagedIdentity)) + { + writer.WritePropertyName("errorBlobManagedIdentity"u8); + writer.WriteObjectValue(ErrorBlobManagedIdentity); + } + if (Optional.IsDefined(TreatFailureAsDeploymentFailure)) + { + writer.WritePropertyName("treatFailureAsDeploymentFailure"u8); + writer.WriteBooleanValue(TreatFailureAsDeploymentFailure.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -114,8 +129,11 @@ internal static VirtualMachineRunCommandData DeserializeVirtualMachineRunCommand Optional timeoutInSeconds = default; Optional outputBlobUri = default; Optional errorBlobUri = default; + Optional outputBlobManagedIdentity = default; + Optional errorBlobManagedIdentity = default; Optional provisioningState = default; Optional instanceView = default; + Optional treatFailureAsDeploymentFailure = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -253,6 +271,24 @@ internal static VirtualMachineRunCommandData DeserializeVirtualMachineRunCommand errorBlobUri = new Uri(property0.Value.GetString()); continue; } + if (property0.NameEquals("outputBlobManagedIdentity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputBlobManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property0.Value); + continue; + } + if (property0.NameEquals("errorBlobManagedIdentity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorBlobManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property0.Value); + continue; + } if (property0.NameEquals("provisioningState"u8)) { provisioningState = property0.Value.GetString(); @@ -267,11 +303,20 @@ internal static VirtualMachineRunCommandData DeserializeVirtualMachineRunCommand instanceView = VirtualMachineRunCommandInstanceView.DeserializeVirtualMachineRunCommandInstanceView(property0.Value); continue; } + if (property0.NameEquals("treatFailureAsDeploymentFailure"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + treatFailureAsDeploymentFailure = property0.Value.GetBoolean(); + continue; + } } continue; } } - return new VirtualMachineRunCommandData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, source.Value, Optional.ToList(parameters), Optional.ToList(protectedParameters), Optional.ToNullable(asyncExecution), runAsUser.Value, runAsPassword.Value, Optional.ToNullable(timeoutInSeconds), outputBlobUri.Value, errorBlobUri.Value, provisioningState.Value, instanceView.Value); + return new VirtualMachineRunCommandData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, source.Value, Optional.ToList(parameters), Optional.ToList(protectedParameters), Optional.ToNullable(asyncExecution), runAsUser.Value, runAsPassword.Value, Optional.ToNullable(timeoutInSeconds), outputBlobUri.Value, errorBlobUri.Value, outputBlobManagedIdentity.Value, errorBlobManagedIdentity.Value, provisioningState.Value, instanceView.Value, Optional.ToNullable(treatFailureAsDeploymentFailure)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs index d0d42c689813..7cb070009f27 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("commandId"u8); writer.WriteStringValue(CommandId); } + if (Optional.IsDefined(ScriptUriManagedIdentity)) + { + writer.WritePropertyName("scriptUriManagedIdentity"u8); + writer.WriteObjectValue(ScriptUriManagedIdentity); + } writer.WriteEndObject(); } @@ -43,6 +48,7 @@ internal static VirtualMachineRunCommandScriptSource DeserializeVirtualMachineRu Optional script = default; Optional scriptUri = default; Optional commandId = default; + Optional scriptUriManagedIdentity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("script"u8)) @@ -64,8 +70,17 @@ internal static VirtualMachineRunCommandScriptSource DeserializeVirtualMachineRu commandId = property.Value.GetString(); continue; } + if (property.NameEquals("scriptUriManagedIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptUriManagedIdentity = RunCommandManagedIdentity.DeserializeRunCommandManagedIdentity(property.Value); + continue; + } } - return new VirtualMachineRunCommandScriptSource(script.Value, scriptUri.Value, commandId.Value); + return new VirtualMachineRunCommandScriptSource(script.Value, scriptUri.Value, commandId.Value, scriptUriManagedIdentity.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs index 59546fb7d222..6ff236e62d4f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs @@ -9,7 +9,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Describes the script sources for run command. + /// Describes the script sources for run command. Use only one of script, scriptUri, commandId. public partial class VirtualMachineRunCommandScriptSource { /// Initializes a new instance of VirtualMachineRunCommandScriptSource. @@ -19,20 +19,24 @@ public VirtualMachineRunCommandScriptSource() /// Initializes a new instance of VirtualMachineRunCommandScriptSource. /// Specifies the script content to be executed on the VM. - /// Specifies the script download location. + /// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. /// Specifies a commandId of predefined built-in script. - internal VirtualMachineRunCommandScriptSource(string script, Uri scriptUri, string commandId) + /// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + internal VirtualMachineRunCommandScriptSource(string script, Uri scriptUri, string commandId, RunCommandManagedIdentity scriptUriManagedIdentity) { Script = script; ScriptUri = scriptUri; CommandId = commandId; + ScriptUriManagedIdentity = scriptUriManagedIdentity; } /// Specifies the script content to be executed on the VM. public string Script { get; set; } - /// Specifies the script download location. + /// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. public Uri ScriptUri { get; set; } /// Specifies a commandId of predefined built-in script. public string CommandId { get; set; } + /// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public RunCommandManagedIdentity ScriptUriManagedIdentity { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs index 278963739007..652752723d3a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.Serialization.cs @@ -83,6 +83,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("errorBlobUri"u8); writer.WriteStringValue(ErrorBlobUri.AbsoluteUri); } + if (Optional.IsDefined(OutputBlobManagedIdentity)) + { + writer.WritePropertyName("outputBlobManagedIdentity"u8); + writer.WriteObjectValue(OutputBlobManagedIdentity); + } + if (Optional.IsDefined(ErrorBlobManagedIdentity)) + { + writer.WritePropertyName("errorBlobManagedIdentity"u8); + writer.WriteObjectValue(ErrorBlobManagedIdentity); + } + if (Optional.IsDefined(TreatFailureAsDeploymentFailure)) + { + writer.WritePropertyName("treatFailureAsDeploymentFailure"u8); + writer.WriteBooleanValue(TreatFailureAsDeploymentFailure.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs index 1b702069c1b8..801b35adb313 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs @@ -35,13 +35,19 @@ public VirtualMachineRunCommandUpdate() public string RunAsPassword { get; set; } /// The timeout in seconds to execute the run command. public int? TimeoutInSeconds { get; set; } - /// Specifies the Azure storage blob where script output stream will be uploaded. + /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. public Uri OutputBlobUri { get; set; } - /// Specifies the Azure storage blob where script error stream will be uploaded. + /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. public Uri ErrorBlobUri { get; set; } - /// The provisioning state, which only appears in the response. + /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public RunCommandManagedIdentity OutputBlobManagedIdentity { get; set; } + /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public RunCommandManagedIdentity ErrorBlobManagedIdentity { get; set; } + /// The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. public string ProvisioningState { get; } /// The virtual machine run command instance view. public VirtualMachineRunCommandInstanceView InstanceView { get; } + /// Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. + public bool? TreatFailureAsDeploymentFailure { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.cs index 7100a8103cd1..801337496bed 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetDataDisk.cs @@ -22,10 +22,10 @@ public VirtualMachineScaleSetDataDisk(int lun, DiskCreateOptionType createOption /// Initializes a new instance of VirtualMachineScaleSetDataDisk. /// The disk name. /// Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. /// Specifies whether writeAccelerator should be enabled or disabled on the disk. /// The create option. - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. /// The managed disk parameters. /// Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. /// Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. @@ -48,13 +48,13 @@ internal VirtualMachineScaleSetDataDisk(string name, int lun, CachingType? cachi public string Name { get; set; } /// Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. public int Lun { get; set; } - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. public CachingType? Caching { get; set; } /// Specifies whether writeAccelerator should be enabled or disabled on the disk. public bool? WriteAcceleratorEnabled { get; set; } /// The create option. public DiskCreateOptionType CreateOption { get; set; } - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. public int? DiskSizeGB { get; set; } /// The managed disk parameters. public VirtualMachineScaleSetManagedDisk ManagedDisk { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.cs index bb44df8a6f53..9416132775ac 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionProfile.cs @@ -22,7 +22,7 @@ public VirtualMachineScaleSetExtensionProfile() /// Initializes a new instance of VirtualMachineScaleSetExtensionProfile. /// The virtual machine scale set child extension resources. - /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01. + /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. internal VirtualMachineScaleSetExtensionProfile(IList extensions, string extensionsTimeBudget) { Extensions = extensions; @@ -31,7 +31,7 @@ internal VirtualMachineScaleSetExtensionProfile(IList The virtual machine scale set child extension resources. public IList Extensions { get; } - /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01. + /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. public string ExtensionsTimeBudget { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs index 791edc21bc53..4bff084823ee 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs @@ -16,13 +16,13 @@ public VirtualMachineScaleSetHardwareProfile() } /// Initializes a new instance of VirtualMachineScaleSetHardwareProfile. - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. internal VirtualMachineScaleSetHardwareProfile(VirtualMachineSizeProperties vmSizeProperties) { VmSizeProperties = vmSizeProperties; } - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. public VirtualMachineSizeProperties VmSizeProperties { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.cs index f766253269a3..f6b3e0827a97 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSDisk.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Compute.Models public partial class VirtualMachineScaleSetOSDisk { /// Initializes a new instance of VirtualMachineScaleSetOSDisk. - /// Specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. public VirtualMachineScaleSetOSDisk(DiskCreateOptionType createOption) { CreateOption = createOption; @@ -24,12 +24,12 @@ public VirtualMachineScaleSetOSDisk(DiskCreateOptionType createOption) /// Initializes a new instance of VirtualMachineScaleSetOSDisk. /// The disk name. - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. /// Specifies whether writeAccelerator should be enabled or disabled on the disk. - /// Specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. /// Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. /// Specifies information about the unmanaged user image to base the scale set on. /// Specifies the container urls that are used to store operating system disks for the scale set. /// The managed disk parameters. @@ -51,17 +51,17 @@ internal VirtualMachineScaleSetOSDisk(string name, CachingType? caching, bool? w /// The disk name. public string Name { get; set; } - /// Specifies the caching requirements. <br><br> Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for Premium storage**. + /// Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**. public CachingType? Caching { get; set; } /// Specifies whether writeAccelerator should be enabled or disabled on the disk. public bool? WriteAcceleratorEnabled { get; set; } - /// Specifies how the virtual machines in the scale set should be created.<br><br> The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + /// Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. public DiskCreateOptionType CreateOption { get; set; } /// Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. public DiffDiskSettings DiffDiskSettings { get; set; } - /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. <br><br> diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + /// Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. public int? DiskSizeGB { get; set; } - /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux**. + /// This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. public SupportedOperatingSystemType? OSType { get; set; } /// Specifies information about the unmanaged user image to base the scale set on. internal VirtualHardDisk Image { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs index 77d67852cfc9..ddf2d907e0b9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetOSProfile.cs @@ -23,11 +23,11 @@ public VirtualMachineScaleSetOSProfile() /// Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. /// Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "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". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). - /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). /// Specifies Windows operating system settings on the virtual machine. - /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). /// Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). - /// Specifies whether extension operations should be allowed on the virtual machine scale set. <br><br>This may only be set to False when no extensions are present on the virtual machine scale set. + /// Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set. /// Optional property which must either be set to True or omitted. internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string adminUsername, string adminPassword, string customData, WindowsConfiguration windowsConfiguration, LinuxConfiguration linuxConfiguration, IList secrets, bool? allowExtensionOperations, bool? requireGuestProvisionSignal) { @@ -48,15 +48,15 @@ internal VirtualMachineScaleSetOSProfile(string computerNamePrefix, string admin public string AdminUsername { get; set; } /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). public string AdminPassword { get; set; } - /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. <br><br> For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + /// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). public string CustomData { get; set; } /// Specifies Windows operating system settings on the virtual machine. public WindowsConfiguration WindowsConfiguration { get; set; } - /// Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). public LinuxConfiguration LinuxConfiguration { get; set; } /// Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). public IList Secrets { get; } - /// Specifies whether extension operations should be allowed on the virtual machine scale set. <br><br>This may only be set to False when no extensions are present on the virtual machine scale set. + /// Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set. public bool? AllowExtensionOperations { get; set; } /// Optional property which must either be set to True or omitted. public bool? RequireGuestProvisionSignal { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs index 1820ea1c8b8f..00579e178717 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.Serialization.cs @@ -88,6 +88,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("proximityPlacementGroup"u8); JsonSerializer.Serialize(writer, ProximityPlacementGroup); } + if (Optional.IsDefined(PriorityMixPolicy)) + { + writer.WritePropertyName("priorityMixPolicy"u8); + writer.WriteObjectValue(PriorityMixPolicy); + } + if (Optional.IsDefined(SpotRestorePolicy)) + { + writer.WritePropertyName("spotRestorePolicy"u8); + writer.WriteObjectValue(SpotRestorePolicy); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.cs index 3fa1c8326e89..e313da27a306 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPatch.cs @@ -54,5 +54,10 @@ public ResourceIdentifier ProximityPlacementGroupId ProximityPlacementGroup.Id = value; } } + + /// Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. + public VirtualMachineScaleSetPriorityMixPolicy PriorityMixPolicy { get; set; } + /// Specifies the Spot Restore properties for the virtual machine scale set. + public SpotRestorePolicy SpotRestorePolicy { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.cs index 472384fd7dea..4f945243a74f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetPriorityMixPolicy.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. <br><br>With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached. + /// Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached. public partial class VirtualMachineScaleSetPriorityMixPolicy { /// Initializes a new instance of VirtualMachineScaleSetPriorityMixPolicy. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.cs index 6395aad16fe2..afd3bcb31389 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetStorageProfile.cs @@ -21,8 +21,8 @@ public VirtualMachineScaleSetStorageProfile() /// Initializes a new instance of VirtualMachineScaleSetStorageProfile. /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - /// Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - /// Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). /// internal VirtualMachineScaleSetStorageProfile(ImageReference imageReference, VirtualMachineScaleSetOSDisk osDisk, IList dataDisks, string diskControllerType) { @@ -34,9 +34,9 @@ internal VirtualMachineScaleSetStorageProfile(ImageReference imageReference, Vir /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. public ImageReference ImageReference { get; set; } - /// Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). public VirtualMachineScaleSetOSDisk OSDisk { get; set; } - /// Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). public IList DataDisks { get; } /// Gets or sets the disk controller type. public string DiskControllerType { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs index 148a3cc529d4..e9da14593e66 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.Serialization.cs @@ -5,10 +5,8 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -22,11 +20,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -92,145 +85,5 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); writer.WriteEndObject(); } - - internal static VirtualMachineScaleSetUpdateIPConfiguration DeserializeVirtualMachineScaleSetUpdateIPConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional id = default; - Optional subnet = default; - Optional primary = default; - Optional publicIPAddressConfiguration = default; - Optional privateIPAddressVersion = default; - Optional> applicationGatewayBackendAddressPools = default; - Optional> applicationSecurityGroups = default; - Optional> loadBalancerBackendAddressPools = default; - Optional> loadBalancerInboundNatPools = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("subnet"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnet = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("primary"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - primary = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("publicIPAddressConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicIPAddressConfiguration = VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.DeserializeVirtualMachineScaleSetUpdatePublicIPAddressConfiguration(property0.Value); - continue; - } - if (property0.NameEquals("privateIPAddressVersion"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAddressVersion = new IPVersion(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("applicationGatewayBackendAddressPools"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - applicationGatewayBackendAddressPools = array; - continue; - } - if (property0.NameEquals("applicationSecurityGroups"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - applicationSecurityGroups = array; - continue; - } - if (property0.NameEquals("loadBalancerBackendAddressPools"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - loadBalancerBackendAddressPools = array; - continue; - } - if (property0.NameEquals("loadBalancerInboundNatPools"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - loadBalancerInboundNatPools = array; - continue; - } - } - continue; - } - } - return new VirtualMachineScaleSetUpdateIPConfiguration(id.Value, name.Value, subnet, Optional.ToNullable(primary), publicIPAddressConfiguration.Value, Optional.ToNullable(privateIPAddressVersion), Optional.ToList(applicationGatewayBackendAddressPools), Optional.ToList(applicationSecurityGroups), Optional.ToList(loadBalancerBackendAddressPools), Optional.ToList(loadBalancerInboundNatPools)); - } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.cs index ad696d8a3cfd..a46ec9570d20 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateIPConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.Compute.Models { /// Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network. - public partial class VirtualMachineScaleSetUpdateIPConfiguration : ComputeWriteableSubResourceData + public partial class VirtualMachineScaleSetUpdateIPConfiguration { /// Initializes a new instance of VirtualMachineScaleSetUpdateIPConfiguration. public VirtualMachineScaleSetUpdateIPConfiguration() @@ -23,30 +23,6 @@ public VirtualMachineScaleSetUpdateIPConfiguration() LoadBalancerInboundNatPools = new ChangeTrackingList(); } - /// Initializes a new instance of VirtualMachineScaleSetUpdateIPConfiguration. - /// Resource Id. - /// The IP configuration name. - /// The subnet. - /// Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. - /// The publicIPAddressConfiguration. - /// Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. - /// The application gateway backend address pools. - /// Specifies an array of references to application security group. - /// The load balancer backend address pools. - /// The load balancer inbound nat pools. - internal VirtualMachineScaleSetUpdateIPConfiguration(ResourceIdentifier id, string name, WritableSubResource subnet, bool? primary, VirtualMachineScaleSetUpdatePublicIPAddressConfiguration publicIPAddressConfiguration, IPVersion? privateIPAddressVersion, IList applicationGatewayBackendAddressPools, IList applicationSecurityGroups, IList loadBalancerBackendAddressPools, IList loadBalancerInboundNatPools) : base(id) - { - Name = name; - Subnet = subnet; - Primary = primary; - PublicIPAddressConfiguration = publicIPAddressConfiguration; - PrivateIPAddressVersion = privateIPAddressVersion; - ApplicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools; - ApplicationSecurityGroups = applicationSecurityGroups; - LoadBalancerBackendAddressPools = loadBalancerBackendAddressPools; - LoadBalancerInboundNatPools = loadBalancerInboundNatPools; - } - /// The IP configuration name. public string Name { get; set; } /// The subnet. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs index 4dd885dab076..44cea2507a49 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.Serialization.cs @@ -5,10 +5,8 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -22,11 +20,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Primary)) @@ -82,140 +75,5 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); writer.WriteEndObject(); } - - internal static VirtualMachineScaleSetUpdateNetworkConfiguration DeserializeVirtualMachineScaleSetUpdateNetworkConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional id = default; - Optional primary = default; - Optional enableAcceleratedNetworking = default; - Optional disableTcpStateTracking = default; - Optional enableFpga = default; - Optional networkSecurityGroup = default; - Optional dnsSettings = default; - Optional> ipConfigurations = default; - Optional enableIPForwarding = default; - Optional deleteOption = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("primary"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - primary = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("enableAcceleratedNetworking"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableAcceleratedNetworking = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("disableTcpStateTracking"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableTcpStateTracking = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("enableFpga"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableFpga = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("networkSecurityGroup"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - networkSecurityGroup = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("dnsSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dnsSettings = VirtualMachineScaleSetNetworkConfigurationDnsSettings.DeserializeVirtualMachineScaleSetNetworkConfigurationDnsSettings(property0.Value); - continue; - } - if (property0.NameEquals("ipConfigurations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(VirtualMachineScaleSetUpdateIPConfiguration.DeserializeVirtualMachineScaleSetUpdateIPConfiguration(item)); - } - ipConfigurations = array; - continue; - } - if (property0.NameEquals("enableIPForwarding"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableIPForwarding = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("deleteOption"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteOption = new ComputeDeleteOption(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new VirtualMachineScaleSetUpdateNetworkConfiguration(id.Value, name.Value, Optional.ToNullable(primary), Optional.ToNullable(enableAcceleratedNetworking), Optional.ToNullable(disableTcpStateTracking), Optional.ToNullable(enableFpga), networkSecurityGroup, dnsSettings.Value, Optional.ToList(ipConfigurations), Optional.ToNullable(enableIPForwarding), Optional.ToNullable(deleteOption)); - } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.cs index 2295a9c78776..1e787195222b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateNetworkConfiguration.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.Compute.Models { /// Describes a virtual machine scale set network profile's network configurations. - public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : ComputeWriteableSubResourceData + public partial class VirtualMachineScaleSetUpdateNetworkConfiguration { /// Initializes a new instance of VirtualMachineScaleSetUpdateNetworkConfiguration. public VirtualMachineScaleSetUpdateNetworkConfiguration() @@ -20,32 +20,6 @@ public VirtualMachineScaleSetUpdateNetworkConfiguration() IPConfigurations = new ChangeTrackingList(); } - /// Initializes a new instance of VirtualMachineScaleSetUpdateNetworkConfiguration. - /// Resource Id. - /// The network configuration name. - /// Whether this is a primary NIC on a virtual machine. - /// Specifies whether the network interface is accelerated networking-enabled. - /// Specifies whether the network interface is disabled for tcp state tracking. - /// Specifies whether the network interface is FPGA networking-enabled. - /// The network security group. - /// The dns settings to be applied on the network interfaces. - /// The virtual machine scale set IP Configuration. - /// Whether IP forwarding enabled on this NIC. - /// Specify what happens to the network interface when the VM is deleted. - internal VirtualMachineScaleSetUpdateNetworkConfiguration(ResourceIdentifier id, string name, bool? primary, bool? enableAcceleratedNetworking, bool? isTcpStateTrackingDisabled, bool? enableFpga, WritableSubResource networkSecurityGroup, VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings, IList ipConfigurations, bool? enableIPForwarding, ComputeDeleteOption? deleteOption) : base(id) - { - Name = name; - Primary = primary; - EnableAcceleratedNetworking = enableAcceleratedNetworking; - IsTcpStateTrackingDisabled = isTcpStateTrackingDisabled; - EnableFpga = enableFpga; - NetworkSecurityGroup = networkSecurityGroup; - DnsSettings = dnsSettings; - IPConfigurations = ipConfigurations; - EnableIPForwarding = enableIPForwarding; - DeleteOption = deleteOption; - } - /// The network configuration name. public string Name { get; set; } /// Whether this is a primary NIC on a virtual machine. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs index 057c7de48635..bbe4ec8e1820 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.Serialization.cs @@ -7,7 +7,6 @@ using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute.Models { @@ -46,75 +45,5 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); writer.WriteEndObject(); } - - internal static VirtualMachineScaleSetUpdatePublicIPAddressConfiguration DeserializeVirtualMachineScaleSetUpdatePublicIPAddressConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional idleTimeoutInMinutes = default; - Optional dnsSettings = default; - Optional publicIPPrefix = default; - Optional deleteOption = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("idleTimeoutInMinutes"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - idleTimeoutInMinutes = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("dnsSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dnsSettings = VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.DeserializeVirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings(property0.Value); - continue; - } - if (property0.NameEquals("publicIPPrefix"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicIPPrefix = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("deleteOption"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deleteOption = new ComputeDeleteOption(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(name.Value, Optional.ToNullable(idleTimeoutInMinutes), dnsSettings.Value, publicIPPrefix, Optional.ToNullable(deleteOption)); - } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.cs index b5dc6bbd7a5b..e8f50294280b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.cs @@ -18,21 +18,6 @@ public VirtualMachineScaleSetUpdatePublicIPAddressConfiguration() { } - /// Initializes a new instance of VirtualMachineScaleSetUpdatePublicIPAddressConfiguration. - /// The publicIP address configuration name. - /// The idle timeout of the public IP address. - /// The dns settings to be applied on the publicIP addresses . - /// The PublicIPPrefix from which to allocate publicIP addresses. - /// Specify what happens to the public IP when the VM is deleted. - internal VirtualMachineScaleSetUpdatePublicIPAddressConfiguration(string name, int? idleTimeoutInMinutes, VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings, WritableSubResource publicIPPrefix, ComputeDeleteOption? deleteOption) - { - Name = name; - IdleTimeoutInMinutes = idleTimeoutInMinutes; - DnsSettings = dnsSettings; - PublicIPPrefix = publicIPPrefix; - DeleteOption = deleteOption; - } - /// The publicIP address configuration name. public string Name { get; set; } /// The idle timeout of the public IP address. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs index 310644b86a55..65949bbe8247 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVmProfile.cs @@ -25,7 +25,7 @@ public VirtualMachineScaleSetUpdateVmProfile() public SecurityProfile SecurityProfile { get; set; } /// The virtual machine scale set diagnostics profile. internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; @@ -41,7 +41,7 @@ public BootDiagnostics BootDiagnostics public VirtualMachineScaleSetExtensionProfile ExtensionProfile { get; set; } /// The license type, which is for bring your own license scenario. public string LicenseType { get; set; } - /// Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. internal BillingProfile BillingProfile { get; set; } /// Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01. public double? BillingMaxPrice @@ -59,9 +59,9 @@ public double? BillingMaxPrice public ComputeScheduledEventsProfile ScheduledEventsProfile { get; set; } /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. public string UserData { get; set; } - /// Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01. + /// Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. internal VirtualMachineScaleSetHardwareProfile HardwareProfile { get; set; } - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. public VirtualMachineSizeProperties HardwareVmSizeProperties { get => HardwareProfile is null ? default : HardwareProfile.VmSizeProperties; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionData.Serialization.cs index 68178138e110..a8b11b849053 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmExtensionData.Serialization.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Compute.Models; @@ -18,6 +19,11 @@ public partial class VirtualMachineScaleSetVmExtensionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForceUpdateTag)) @@ -83,6 +89,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("protectedSettingsFromKeyVault"u8); writer.WriteObjectValue(KeyVaultProtectedSettings); } + if (Optional.IsCollectionDefined(ProvisionAfterExtensions)) + { + writer.WritePropertyName("provisionAfterExtensions"u8); + writer.WriteStartArray(); + foreach (var item in ProvisionAfterExtensions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -93,6 +109,7 @@ internal static VirtualMachineScaleSetVmExtensionData DeserializeVirtualMachineS { return null; } + Optional location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -109,8 +126,18 @@ internal static VirtualMachineScaleSetVmExtensionData DeserializeVirtualMachineS Optional instanceView = default; Optional suppressFailures = default; Optional protectedSettingsFromKeyVault = default; + Optional> provisionAfterExtensions = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -232,11 +259,25 @@ internal static VirtualMachineScaleSetVmExtensionData DeserializeVirtualMachineS protectedSettingsFromKeyVault = KeyVaultSecretReference.DeserializeKeyVaultSecretReference(property0.Value); continue; } + if (property0.NameEquals("provisionAfterExtensions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + provisionAfterExtensions = array; + continue; + } } continue; } } - return new VirtualMachineScaleSetVmExtensionData(id, name, type, systemData.Value, forceUpdateTag.Value, publisher.Value, type0.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), Optional.ToNullable(enableAutomaticUpgrade), settings.Value, protectedSettings.Value, provisioningState.Value, instanceView.Value, Optional.ToNullable(suppressFailures), protectedSettingsFromKeyVault.Value); + return new VirtualMachineScaleSetVmExtensionData(id, name, type, systemData.Value, Optional.ToNullable(location), forceUpdateTag.Value, publisher.Value, type0.Value, typeHandlerVersion.Value, Optional.ToNullable(autoUpgradeMinorVersion), Optional.ToNullable(enableAutomaticUpgrade), settings.Value, protectedSettings.Value, provisioningState.Value, instanceView.Value, Optional.ToNullable(suppressFailures), protectedSettingsFromKeyVault.Value, Optional.ToList(provisionAfterExtensions)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.cs index 1ae79829afc5..0795caafcdae 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmInstanceView.cs @@ -30,9 +30,9 @@ internal VirtualMachineScaleSetVmInstanceView() /// The disks information. /// The extensions information. /// The health status for the VM. - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. /// The resource status information. - /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01. + /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. /// The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. /// Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). /// The Operating System running on the hybrid machine. @@ -80,11 +80,11 @@ public InstanceViewStatus VmHealthStatus get => VmHealth?.Status; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnosticsInstanceView BootDiagnostics { get; } /// The resource status information. public IReadOnlyList Statuses { get; } - /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. <br><br>Minimum api-version: 2020-06-01. + /// Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. public ResourceIdentifier AssignedHost { get; } /// The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. public string PlacementGroupId { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs index 733ee42e06d8..6ccb9d7d4369 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.Serialization.cs @@ -96,6 +96,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("serviceArtifactReference"u8); JsonSerializer.Serialize(writer, ServiceArtifactReference); } + if (Optional.IsDefined(SecurityPostureReference)) + { + writer.WritePropertyName("securityPostureReference"u8); + writer.WriteObjectValue(SecurityPostureReference); + } writer.WriteEndObject(); } @@ -121,6 +126,7 @@ internal static VirtualMachineScaleSetVmProfile DeserializeVirtualMachineScaleSe Optional applicationProfile = default; Optional hardwareProfile = default; Optional serviceArtifactReference = default; + Optional securityPostureReference = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("osProfile"u8)) @@ -259,8 +265,17 @@ internal static VirtualMachineScaleSetVmProfile DeserializeVirtualMachineScaleSe serviceArtifactReference = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("securityPostureReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityPostureReference = SecurityPostureReference.DeserializeSecurityPostureReference(property.Value); + continue; + } } - return new VirtualMachineScaleSetVmProfile(osProfile.Value, storageProfile.Value, networkProfile.Value, securityProfile.Value, diagnosticsProfile.Value, extensionProfile.Value, licenseType.Value, Optional.ToNullable(priority), Optional.ToNullable(evictionPolicy), billingProfile.Value, scheduledEventsProfile.Value, userData.Value, capacityReservation.Value, applicationProfile.Value, hardwareProfile.Value, serviceArtifactReference); + return new VirtualMachineScaleSetVmProfile(osProfile.Value, storageProfile.Value, networkProfile.Value, securityProfile.Value, diagnosticsProfile.Value, extensionProfile.Value, licenseType.Value, Optional.ToNullable(priority), Optional.ToNullable(evictionPolicy), billingProfile.Value, scheduledEventsProfile.Value, userData.Value, capacityReservation.Value, applicationProfile.Value, hardwareProfile.Value, serviceArtifactReference, securityPostureReference.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs index c599cf34fa88..75ca6f953751 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProfile.cs @@ -24,19 +24,20 @@ public VirtualMachineScaleSetVmProfile() /// Specifies the storage settings for the virtual machine disks. /// Specifies properties of the network interfaces of the virtual machines in the scale set. /// Specifies the Security related profile settings for the virtual machines in the scale set. - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. /// Specifies a collection of settings for extensions installed on virtual machines in the scale set. /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. - /// Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. - /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. - /// Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview. + /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + /// Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. /// Specifies Scheduled Event related configurations. - /// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. - /// Specifies the capacity reservation related details of a scale set. <br><br>Minimum api-version: 2021-04-01. + /// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + /// Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01. /// Specifies the gallery applications that should be made available to the VM/VMSS. - /// Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01. + /// Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. /// 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. - internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfile, VirtualMachineScaleSetStorageProfile storageProfile, VirtualMachineScaleSetNetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, VirtualMachineScaleSetExtensionProfile extensionProfile, string licenseType, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, BillingProfile billingProfile, ComputeScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile, VirtualMachineScaleSetHardwareProfile hardwareProfile, WritableSubResource serviceArtifactReference) + /// Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01. + internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfile, VirtualMachineScaleSetStorageProfile storageProfile, VirtualMachineScaleSetNetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, VirtualMachineScaleSetExtensionProfile extensionProfile, string licenseType, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, BillingProfile billingProfile, ComputeScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile, VirtualMachineScaleSetHardwareProfile hardwareProfile, WritableSubResource serviceArtifactReference, SecurityPostureReference securityPostureReference) { OSProfile = osProfile; StorageProfile = storageProfile; @@ -54,6 +55,7 @@ internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfi ApplicationProfile = applicationProfile; HardwareProfile = hardwareProfile; ServiceArtifactReference = serviceArtifactReference; + SecurityPostureReference = securityPostureReference; } /// Specifies the operating system settings for the virtual machines in the scale set. @@ -64,9 +66,9 @@ internal VirtualMachineScaleSetVmProfile(VirtualMachineScaleSetOSProfile osProfi public VirtualMachineScaleSetNetworkProfile NetworkProfile { get; set; } /// Specifies the Security related profile settings for the virtual machines in the scale set. public SecurityProfile SecurityProfile { get; set; } - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; @@ -82,11 +84,11 @@ public BootDiagnostics BootDiagnostics public VirtualMachineScaleSetExtensionProfile ExtensionProfile { get; set; } /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. public string LicenseType { get; set; } - /// Specifies the priority for the virtual machines in the scale set. <br><br>Minimum api-version: 2017-10-30-preview. + /// Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview. public VirtualMachinePriorityType? Priority { get; set; } - /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. public VirtualMachineEvictionPolicyType? EvictionPolicy { get; set; } - /// Specifies the billing related details of a Azure Spot VMSS. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. internal BillingProfile BillingProfile { get; set; } /// Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01. public double? BillingMaxPrice @@ -102,9 +104,9 @@ public double? BillingMaxPrice /// Specifies Scheduled Event related configurations. public ComputeScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. + /// UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. public string UserData { get; set; } - /// Specifies the capacity reservation related details of a scale set. <br><br>Minimum api-version: 2021-04-01. + /// Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01. internal CapacityReservationProfile CapacityReservation { get; set; } /// Gets or sets Id. public ResourceIdentifier CapacityReservationGroupId @@ -131,9 +133,9 @@ public IList GalleryApplications } } - /// Specifies the hardware profile related details of a scale set. <br><br>Minimum api-version: 2021-11-01. + /// Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. internal VirtualMachineScaleSetHardwareProfile HardwareProfile { get; set; } - /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. <br><br> Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + /// Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. public VirtualMachineSizeProperties HardwareVmSizeProperties { get => HardwareProfile is null ? default : HardwareProfile.VmSizeProperties; @@ -158,5 +160,8 @@ public ResourceIdentifier ServiceArtifactReferenceId ServiceArtifactReference.Id = value; } } + + /// Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01. + public SecurityPostureReference SecurityPostureReference { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.cs index d47a4e09132d..69280f8d22fb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeProperties.cs @@ -16,17 +16,17 @@ public VirtualMachineSizeProperties() } /// Initializes a new instance of VirtualMachineSizeProperties. - /// Specifies the number of vCPUs available for the VM. <br><br> When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . - /// Specifies the vCPU to physical core ratio. <br><br> When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) <br><br> Setting this property to 1 also means that hyper-threading is disabled. + /// Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). + /// Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**. internal VirtualMachineSizeProperties(int? vCpusAvailable, int? vCpusPerCore) { VCpusAvailable = vCpusAvailable; VCpusPerCore = vCpusPerCore; } - /// Specifies the number of vCPUs available for the VM. <br><br> When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . + /// Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). public int? VCpusAvailable { get; set; } - /// Specifies the vCPU to physical core ratio. <br><br> When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) <br><br> Setting this property to 1 also means that hyper-threading is disabled. + /// Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**. public int? VCpusPerCore { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeType.cs index f18a20fee270..a766b2c5f9f8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineSizeType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the size of the virtual machine. <br><br> The enum data type is currently deprecated and will be removed by December 23rd 2023. <br><br> Recommended way to get the list of available sizes is using these APIs: <br><br> [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) <br><br> [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list) <br><br> [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). <br><br> The available VM sizes depend on region and availability set. + /// Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. public readonly partial struct VirtualMachineSizeType : IEquatable { private readonly string _value; diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.cs index 3e9434290f39..5f0f16197e16 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineStorageProfile.cs @@ -21,9 +21,9 @@ public VirtualMachineStorageProfile() /// Initializes a new instance of VirtualMachineStorageProfile. /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. - /// Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - /// Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - /// Specifies the disk controller type configured for the VM. <br><br>NOTE: This property will be set to the default disk controller type if not specified provided virtual machine is being created as a hyperVGeneration: V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. <br>You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. <br><br> Minimum api-version: 2022-08-01. + /// Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. internal VirtualMachineStorageProfile(ImageReference imageReference, VirtualMachineOSDisk osDisk, IList dataDisks, DiskControllerType? diskControllerType) { ImageReference = imageReference; @@ -34,11 +34,11 @@ internal VirtualMachineStorageProfile(ImageReference imageReference, VirtualMach /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. public ImageReference ImageReference { get; set; } - /// Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). public VirtualMachineOSDisk OSDisk { get; set; } - /// Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + /// Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). public IList DataDisks { get; } - /// Specifies the disk controller type configured for the VM. <br><br>NOTE: This property will be set to the default disk controller type if not specified provided virtual machine is being created as a hyperVGeneration: V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. <br>You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. <br><br> Minimum api-version: 2022-08-01. + /// Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. public DiskControllerType? DiskControllerType { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.cs index 8f4a7311a932..e0c8c030b3c2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListener.cs @@ -18,17 +18,17 @@ public WinRMListener() } /// Initializes a new instance of WinRMListener. - /// Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. - /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + /// Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. + /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). internal WinRMListener(WinRMListenerProtocolType? protocol, Uri certificateUri) { Protocol = protocol; CertificateUri = certificateUri; } - /// Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. + /// Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. public WinRMListenerProtocolType? Protocol { get; set; } - /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). public Uri CertificateUri { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListenerProtocolType.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListenerProtocolType.cs index df408932a8da..2adcb0b41425 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListenerProtocolType.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WinRMListenerProtocolType.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Compute.Models { - /// Specifies the protocol of WinRM listener. <br><br> Possible values are: <br>**http** <br><br> **https**. + /// Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. public enum WinRMListenerProtocolType { /// Http. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.cs index d4adbd824672..b6500d28c03a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsConfiguration.cs @@ -20,9 +20,9 @@ public WindowsConfiguration() } /// Initializes a new instance of WindowsConfiguration. - /// Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. - /// Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. <br><br> For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. - /// Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". <br><br> Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + /// Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + /// Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. + /// Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). /// Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. /// [Preview Feature] Specifies settings related to VM Guest Patching on Windows. /// Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. @@ -38,11 +38,11 @@ internal WindowsConfiguration(bool? provisionVmAgent, bool? isAutomaticUpdatesEn IsVmAgentPlatformUpdatesEnabled = isVmAgentPlatformUpdatesEnabled; } - /// Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + /// Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. public bool? ProvisionVmAgent { get; set; } - /// Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. <br><br> For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. + /// Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. public bool? IsAutomaticUpdatesEnabled { get; set; } - /// Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". <br><br> Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + /// Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). public string TimeZone { get; set; } /// Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. public IList AdditionalUnattendContent { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs index 7f36c0b77a8c..14d59e12a1ec 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Compute.Models { - internal partial class WindowsVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonSerializable + public partial class WindowsVmGuestPatchAutomaticByPlatformSettings : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("rebootSetting"u8); writer.WriteStringValue(RebootSetting.Value.ToString()); } + if (Optional.IsDefined(BypassPlatformSafetyChecksOnUserSchedule)) + { + writer.WritePropertyName("bypassPlatformSafetyChecksOnUserSchedule"u8); + writer.WriteBooleanValue(BypassPlatformSafetyChecksOnUserSchedule.Value); + } writer.WriteEndObject(); } @@ -30,6 +35,7 @@ internal static WindowsVmGuestPatchAutomaticByPlatformSettings DeserializeWindow return null; } Optional rebootSetting = default; + Optional bypassPlatformSafetyChecksOnUserSchedule = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("rebootSetting"u8)) @@ -41,8 +47,17 @@ internal static WindowsVmGuestPatchAutomaticByPlatformSettings DeserializeWindow rebootSetting = new WindowsVmGuestPatchAutomaticByPlatformRebootSetting(property.Value.GetString()); continue; } + if (property.NameEquals("bypassPlatformSafetyChecksOnUserSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassPlatformSafetyChecksOnUserSchedule = property.Value.GetBoolean(); + continue; + } } - return new WindowsVmGuestPatchAutomaticByPlatformSettings(Optional.ToNullable(rebootSetting)); + return new WindowsVmGuestPatchAutomaticByPlatformSettings(Optional.ToNullable(rebootSetting), Optional.ToNullable(bypassPlatformSafetyChecksOnUserSchedule)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.cs index cf78514559fc..7178dbc1374c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/WindowsVmGuestPatchAutomaticByPlatformSettings.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.Compute.Models { /// Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings. - internal partial class WindowsVmGuestPatchAutomaticByPlatformSettings + public partial class WindowsVmGuestPatchAutomaticByPlatformSettings { /// Initializes a new instance of WindowsVmGuestPatchAutomaticByPlatformSettings. public WindowsVmGuestPatchAutomaticByPlatformSettings() @@ -17,12 +17,16 @@ public WindowsVmGuestPatchAutomaticByPlatformSettings() /// Initializes a new instance of WindowsVmGuestPatchAutomaticByPlatformSettings. /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. - internal WindowsVmGuestPatchAutomaticByPlatformSettings(WindowsVmGuestPatchAutomaticByPlatformRebootSetting? rebootSetting) + /// Enables customer to schedule patching without accidental upgrades. + internal WindowsVmGuestPatchAutomaticByPlatformSettings(WindowsVmGuestPatchAutomaticByPlatformRebootSetting? rebootSetting, bool? bypassPlatformSafetyChecksOnUserSchedule) { RebootSetting = rebootSetting; + BypassPlatformSafetyChecksOnUserSchedule = bypassPlatformSafetyChecksOnUserSchedule; } /// Specifies the reboot setting for all AutomaticByPlatform patch installation operations. public WindowsVmGuestPatchAutomaticByPlatformRebootSetting? RebootSetting { get; set; } + /// Enables customer to schedule patching without accidental upgrades. + public bool? BypassPlatformSafetyChecksOnUserSchedule { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.cs index 3ab8dfc13176..81a282f10370 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupData.cs @@ -36,7 +36,7 @@ public ProximityPlacementGroupData(AzureLocation location) : base(location) /// The tags. /// The location. /// Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. - /// Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. + /// Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. /// A list of references to all virtual machines in the proximity placement group. /// A list of references to all virtual machine scale sets in the proximity placement group. /// A list of references to all availability sets in the proximity placement group. @@ -55,7 +55,7 @@ internal ProximityPlacementGroupData(ResourceIdentifier id, string name, Resourc /// Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. public IList Zones { get; } - /// Specifies the type of the proximity placement group. <br><br> Possible values are: <br><br> **Standard** : Co-locate resources within an Azure region or Availability Zone. <br><br> **Ultra** : For future use. + /// Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. public ProximityPlacementGroupType? ProximityPlacementGroupType { get; set; } /// A list of references to all virtual machines in the proximity placement group. public IReadOnlyList VirtualMachines { get; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs index a7232bf13e66..52bee214511b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/AvailabilitySetsRestOperations.cs @@ -33,7 +33,7 @@ public AvailabilitySetsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs index 99d58aece4fe..42be34e5ed0f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationGroupsRestOperations.cs @@ -33,7 +33,7 @@ public CapacityReservationGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs index 3a6c246ac772..a59c613b77b9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/CapacityReservationsRestOperations.cs @@ -33,7 +33,7 @@ public CapacityReservationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs index 1d7518f9f391..62a47b2b2e62 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostGroupsRestOperations.cs @@ -33,7 +33,7 @@ public DedicatedHostGroupsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs index 7b800812ef40..c74ab5b65b91 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DedicatedHostsRestOperations.cs @@ -33,7 +33,7 @@ public DedicatedHostsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -147,7 +147,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Update an dedicated host . + /// Update a dedicated host . /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the dedicated host group. @@ -175,7 +175,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Update an dedicated host . + /// Update a dedicated host . /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the dedicated host group. @@ -529,6 +529,91 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } + internal HttpMessage CreateListAvailableSizesRequest(string subscriptionId, string resourceGroupName, string hostGroupName, string hostName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/hostGroups/", false); + uri.AppendPath(hostGroupName, true); + uri.AppendPath("/hosts/", false); + uri.AppendPath(hostName, true); + uri.AppendPath("/hostSizes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the dedicated host group. + /// The name of the dedicated host. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAvailableSizesAsync(string subscriptionId, string resourceGroupName, string hostGroupName, string hostName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostGroupName, nameof(hostGroupName)); + Argument.AssertNotNullOrEmpty(hostName, nameof(hostName)); + + using var message = CreateListAvailableSizesRequest(subscriptionId, resourceGroupName, hostGroupName, hostName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DedicatedHostSizeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DedicatedHostSizeListResult.DeserializeDedicatedHostSizeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the dedicated host group. + /// The name of the dedicated host. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListAvailableSizes(string subscriptionId, string resourceGroupName, string hostGroupName, string hostName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostGroupName, nameof(hostGroupName)); + Argument.AssertNotNullOrEmpty(hostName, nameof(hostName)); + + using var message = CreateListAvailableSizesRequest(subscriptionId, resourceGroupName, hostGroupName, hostName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DedicatedHostSizeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DedicatedHostSizeListResult.DeserializeDedicatedHostSizeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByHostGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string hostGroupName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs index 53954b64f7a1..cfd044825acd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ImagesRestOperations.cs @@ -33,7 +33,7 @@ public ImagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs index e5fead7fb0da..be68674ac6f5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/LogAnalyticsRestOperations.cs @@ -32,7 +32,7 @@ public LogAnalyticsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs index 73529eb91e5e..64b590a56b39 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/ProximityPlacementGroupsRestOperations.cs @@ -33,7 +33,7 @@ public ProximityPlacementGroupsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs index 998c053f0e35..047b1d2c785a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointCollectionsRestOperations.cs @@ -33,7 +33,7 @@ public RestorePointCollectionsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs index 8157953c532a..0e93c783194f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/RestorePointsRestOperations.cs @@ -33,7 +33,7 @@ public RestorePointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs index 555f1bc4116c..7c9ccdb31453 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SshPublicKeysRestOperations.cs @@ -33,7 +33,7 @@ public SshPublicKeysRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs index 4fe22233e8da..4e4df7b78421 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/UsageRestOperations.cs @@ -33,7 +33,7 @@ public UsageRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs index 768149a1fc29..a8e9520dc8e6 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionImagesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineExtensionImagesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs index 1362ac732f87..b768e3752d88 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineExtensionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs index 1aa0484fd4ed..9215cf181e29 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesEdgeZoneRestOperations.cs @@ -34,7 +34,7 @@ public VirtualMachineImagesEdgeZoneRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs index c822059c2140..9174ade78e18 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineImagesRestOperations.cs @@ -34,7 +34,7 @@ public VirtualMachineImagesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs index 4e8566c0dfaa..1681450cb2f9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineRunCommandsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineRunCommandsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs index ee100e3456ab..6f183ffa9d13 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetExtensionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs index 4d5b49f1738d..e3d25550b14d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetRollingUpgradesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualMachineScaleSetRollingUpgradesRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs index 101c32583d59..2e2f1eac38f9 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMExtensionsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMExtensionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs index 70c25f34ada9..66437662f48c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMRunCommandsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMRunCommandsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs index f156e0962204..56d4fc12a076 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetVMsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetVMsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1067,7 +1067,7 @@ internal HttpMessage CreateRetrieveBootDiagnosticsDataRequest(string subscriptio /// The name of the resource group. /// The name of the VM scale set. /// The instance ID of the virtual machine. - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -1099,7 +1099,7 @@ public async Task> RetrieveBootDiagn /// The name of the resource group. /// The name of the VM scale set. /// The instance ID of the virtual machine. - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs index e4975cd383c2..83dc8868d00f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineScaleSetsRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineScaleSetsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -428,7 +428,7 @@ public Response Get(string subscriptionId, string re } } - internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds) + internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds, bool? hibernate) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -442,6 +442,10 @@ internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resou uri.AppendPath("/providers/Microsoft.Compute/virtualMachineScaleSets/", false); uri.AppendPath(virtualMachineScaleSetName, true); uri.AppendPath("/deallocate", false); + if (hibernate != null) + { + uri.AppendQuery("hibernate", hibernate.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -461,16 +465,17 @@ internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resou /// The name of the resource group. /// The name of the VM scale set. /// A list of virtual machine instance IDs from the VM scale set. + /// Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeallocateAsync(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, CancellationToken cancellationToken = default) + public async Task DeallocateAsync(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(virtualMachineScaleSetName, nameof(virtualMachineScaleSetName)); - using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName, vmInstanceIds); + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName, vmInstanceIds, hibernate); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -487,16 +492,17 @@ public async Task DeallocateAsync(string subscriptionId, string resour /// The name of the resource group. /// The name of the VM scale set. /// A list of virtual machine instance IDs from the VM scale set. + /// Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Deallocate(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, CancellationToken cancellationToken = default) + public Response Deallocate(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(virtualMachineScaleSetName, nameof(virtualMachineScaleSetName)); - using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName, vmInstanceIds); + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName, vmInstanceIds, hibernate); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1216,6 +1222,77 @@ public Response Start(string subscriptionId, string resourceGroupName, string vi } } + internal HttpMessage CreateReapplyRequest(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/virtualMachineScaleSets/", false); + uri.AppendPath(virtualMachineScaleSetName, true); + uri.AppendPath("/reapply", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the VM scale set. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ReapplyAsync(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualMachineScaleSetName, nameof(virtualMachineScaleSetName)); + + using var message = CreateReapplyRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances. + /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the VM scale set. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Reapply(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(virtualMachineScaleSetName, nameof(virtualMachineScaleSetName)); + + using var message = CreateReapplyRequest(subscriptionId, resourceGroupName, virtualMachineScaleSetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string virtualMachineScaleSetName, VirtualMachineScaleSetVmInstanceIds vmInstanceIds) { var message = _pipeline.CreateMessage(); diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs index 0f7d9ef5f9b3..9c89d5e7b369 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineSizesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs index 3a34a56cb6c2..dc2fb350d06a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/VirtualMachinesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-11-01"; + _apiVersion = apiVersion ?? "2023-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -755,7 +755,7 @@ internal HttpMessage CreateGeneralizeRequest(string subscriptionId, string resou return message; } - /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. @@ -779,7 +779,7 @@ public async Task GeneralizeAsync(string subscriptionId, string resour } } - /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. @@ -803,7 +803,7 @@ public Response Generalize(string subscriptionId, string resourceGroupName, stri } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string filter) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string filter, ExpandTypeForListVm? expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -819,6 +819,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("$filter", filter, true); } + if (expand != null) + { + uri.AppendQuery("$expand", expand.Value.ToString(), true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -830,15 +834,16 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, filter); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -858,15 +863,16 @@ public async Task> ListAsync(string subscript /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, filter); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -882,7 +888,7 @@ public Response List(string subscriptionId, string res } } - internal HttpMessage CreateListAllRequest(string subscriptionId, string statusOnly, string filter) + internal HttpMessage CreateListAllRequest(string subscriptionId, string statusOnly, string filter, ExpandTypesForListVm? expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -901,6 +907,10 @@ internal HttpMessage CreateListAllRequest(string subscriptionId, string statusOn { uri.AppendQuery("$filter", filter, true); } + if (expand != null) + { + uri.AppendQuery("$expand", expand.Value.ToString(), true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -911,14 +921,15 @@ internal HttpMessage CreateListAllRequest(string subscriptionId, string statusOn /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListAllAsync(string subscriptionId, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public async Task> ListAllAsync(string subscriptionId, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListAllRequest(subscriptionId, statusOnly, filter); + using var message = CreateListAllRequest(subscriptionId, statusOnly, filter, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -938,14 +949,15 @@ public async Task> ListAllAsync(string subscr /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListAll(string subscriptionId, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public Response ListAll(string subscriptionId, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListAllRequest(subscriptionId, statusOnly, filter); + using var message = CreateListAllRequest(subscriptionId, statusOnly, filter, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1510,7 +1522,7 @@ internal HttpMessage CreateRetrieveBootDiagnosticsDataRequest(string subscriptio /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1540,7 +1552,7 @@ public async Task> RetrieveBootDiagn /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The name of the virtual machine. - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -2005,7 +2017,7 @@ public Response ListByLocationNextPage(string nextLink } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, ExpandTypeForListVm? expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2024,16 +2036,17 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2054,16 +2067,17 @@ public async Task> ListNextPageAsync(string n /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2079,7 +2093,7 @@ public Response ListNextPage(string nextLink, string s } } - internal HttpMessage CreateListAllNextPageRequest(string nextLink, string subscriptionId, string statusOnly, string filter) + internal HttpMessage CreateListAllNextPageRequest(string nextLink, string subscriptionId, string statusOnly, string filter, ExpandTypesForListVm? expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2098,15 +2112,16 @@ internal HttpMessage CreateListAllNextPageRequest(string nextLink, string subscr /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListAllNextPageAsync(string nextLink, string subscriptionId, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public async Task> ListAllNextPageAsync(string nextLink, string subscriptionId, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListAllNextPageRequest(nextLink, subscriptionId, statusOnly, filter); + using var message = CreateListAllNextPageRequest(nextLink, subscriptionId, statusOnly, filter, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2127,15 +2142,16 @@ public async Task> ListAllNextPageAsync(strin /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListAllNextPage(string nextLink, string subscriptionId, string statusOnly = null, string filter = null, CancellationToken cancellationToken = default) + public Response ListAllNextPage(string nextLink, string subscriptionId, string statusOnly = null, string filter = null, ExpandTypesForListVm? expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListAllNextPageRequest(nextLink, subscriptionId, statusOnly, filter); + using var message = CreateListAllNextPageRequest(nextLink, subscriptionId, statusOnly, filter, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.cs index aa64b0a10723..bec195acaa9e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointData.cs @@ -52,7 +52,7 @@ internal RestorePointData(ResourceIdentifier id, string name, ResourceType resou /// List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. public IList ExcludeDisks { get; } /// Gets the details of the VM captured at the time of the restore point creation. - public RestorePointSourceMetadata SourceMetadata { get; } + public RestorePointSourceMetadata SourceMetadata { get; set; } /// Gets the provisioning state of the restore point. public string ProvisioningState { get; } /// ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineCollection.cs index 23759a9b11e8..81690a35518c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineCollection.cs @@ -226,12 +226,13 @@ public virtual Response Get(string vmName, InstanceViewT /// /// /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter); + HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VirtualMachineResource(Client, VirtualMachineData.DeserializeVirtualMachineData(e)), _virtualMachineClientDiagnostics, Pipeline, "VirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -249,12 +250,13 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'. + /// The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string filter = null, ExpandTypeForListVm? expand = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter); + HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VirtualMachineResource(Client, VirtualMachineData.DeserializeVirtualMachineData(e)), _virtualMachineClientDiagnostics, Pipeline, "VirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs index 4ded14679d34..bff63fcfb01e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineData.cs @@ -46,26 +46,26 @@ public VirtualMachineData(AzureLocation location) : base(location) /// Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. /// Specifies the network interfaces of the virtual machine. /// Specifies the Security related profile settings for the virtual machine. - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. - /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01. - /// Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01. - /// Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. - /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. - /// Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01. - /// Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01. - /// Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. + /// Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. + /// Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01. + /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + /// Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. + /// Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. + /// Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. /// The provisioning state, which only appears in the response. /// The virtual machine instance view. /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. /// Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. - /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01. - /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01. + /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. + /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. /// Specifies Scheduled Event related configurations. - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. - /// Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + /// Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. /// Specifies the gallery applications that should be made available to the VM/VMSS. - /// Specifies the time at which the Virtual Machine resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. internal VirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputePlan plan, IReadOnlyList resources, ManagedServiceIdentity identity, IList zones, ExtendedLocation extendedLocation, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, VirtualMachineNetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, WritableSubResource virtualMachineScaleSet, WritableSubResource proximityPlacementGroup, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, BillingProfile billingProfile, WritableSubResource host, WritableSubResource hostGroup, string provisioningState, VirtualMachineInstanceView instanceView, string licenseType, string vmId, string extensionsTimeBudget, int? platformFaultDomain, ComputeScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile, DateTimeOffset? timeCreated) : base(id, name, resourceType, systemData, tags, location) { Plan = plan; @@ -123,9 +123,9 @@ internal VirtualMachineData(ResourceIdentifier id, string name, ResourceType res public VirtualMachineNetworkProfile NetworkProfile { get; set; } /// Specifies the Security related profile settings for the virtual machine. public SecurityProfile SecurityProfile { get; set; } - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; @@ -137,7 +137,7 @@ public BootDiagnostics BootDiagnostics } } - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. internal WritableSubResource AvailabilitySet { get; set; } /// Gets or sets Id. public ResourceIdentifier AvailabilitySetId @@ -151,7 +151,7 @@ public ResourceIdentifier AvailabilitySetId } } - /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01. + /// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. internal WritableSubResource VirtualMachineScaleSet { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualMachineScaleSetId @@ -165,7 +165,7 @@ public ResourceIdentifier VirtualMachineScaleSetId } } - /// Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. internal WritableSubResource ProximityPlacementGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier ProximityPlacementGroupId @@ -179,11 +179,11 @@ public ResourceIdentifier ProximityPlacementGroupId } } - /// Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01. public VirtualMachinePriorityType? Priority { get; set; } - /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + /// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. public VirtualMachineEvictionPolicyType? EvictionPolicy { get; set; } - /// Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01. + /// Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. internal BillingProfile BillingProfile { get; set; } /// Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01. public double? BillingMaxPrice @@ -197,7 +197,7 @@ public double? BillingMaxPrice } } - /// Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01. + /// Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. internal WritableSubResource Host { get; set; } /// Gets or sets Id. public ResourceIdentifier HostId @@ -211,7 +211,7 @@ public ResourceIdentifier HostId } } - /// Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties. + /// Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. internal WritableSubResource HostGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier HostGroupId @@ -233,15 +233,15 @@ public ResourceIdentifier HostGroupId public string LicenseType { get; set; } /// Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. public string VmId { get; } - /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01. + /// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. public string ExtensionsTimeBudget { get; set; } - /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01. + /// Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. public int? PlatformFaultDomain { get; set; } /// Specifies Scheduled Event related configurations. public ComputeScheduledEventsProfile ScheduledEventsProfile { get; set; } - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. public string UserData { get; set; } - /// Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01. + /// Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. internal CapacityReservationProfile CapacityReservation { get; set; } /// Gets or sets Id. public ResourceIdentifier CapacityReservationGroupId @@ -268,7 +268,7 @@ public IList GalleryApplications } } - /// Specifies the time at which the Virtual Machine resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.cs index 6755a03d1a2a..0e8134cd2486 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionData.cs @@ -23,6 +23,7 @@ public partial class VirtualMachineExtensionData : TrackedResourceData /// The location. public VirtualMachineExtensionData(AzureLocation location) : base(location) { + ProvisionAfterExtensions = new ChangeTrackingList(); } /// Initializes a new instance of VirtualMachineExtensionData. @@ -44,7 +45,8 @@ public VirtualMachineExtensionData(AzureLocation location) : base(location) /// The virtual machine extension instance view. /// Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. /// The extensions protected settings that are passed by reference, and consumed from key vault. - internal VirtualMachineExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string forceUpdateTag, string publisher, string extensionType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, bool? enableAutomaticUpgrade, BinaryData settings, BinaryData protectedSettings, string provisioningState, VirtualMachineExtensionInstanceView instanceView, bool? suppressFailures, KeyVaultSecretReference keyVaultProtectedSettings) : base(id, name, resourceType, systemData, tags, location) + /// Collection of extension names after which this extension needs to be provisioned. + internal VirtualMachineExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string forceUpdateTag, string publisher, string extensionType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, bool? enableAutomaticUpgrade, BinaryData settings, BinaryData protectedSettings, string provisioningState, VirtualMachineExtensionInstanceView instanceView, bool? suppressFailures, KeyVaultSecretReference keyVaultProtectedSettings, IList provisionAfterExtensions) : base(id, name, resourceType, systemData, tags, location) { ForceUpdateTag = forceUpdateTag; Publisher = publisher; @@ -58,6 +60,7 @@ internal VirtualMachineExtensionData(ResourceIdentifier id, string name, Resourc InstanceView = instanceView; SuppressFailures = suppressFailures; KeyVaultProtectedSettings = keyVaultProtectedSettings; + ProvisionAfterExtensions = provisionAfterExtensions; } /// How the extension handler should be forced to update even if the extension configuration has not changed. @@ -142,5 +145,7 @@ internal VirtualMachineExtensionData(ResourceIdentifier id, string name, Resourc public bool? SuppressFailures { get; set; } /// The extensions protected settings that are passed by reference, and consumed from key vault. public KeyVaultSecretReference KeyVaultProtectedSettings { get; set; } + /// Collection of extension names after which this extension needs to be provisioned. + public IList ProvisionAfterExtensions { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs index 878db8919362..1b5f069d9933 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.cs @@ -686,7 +686,7 @@ public virtual ArmOperation Deallocate(WaitUntil waitUntil, bool? hibernate = nu } /// - /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). /// /// /// Request Path @@ -716,7 +716,7 @@ public virtual async Task GeneralizeAsync(CancellationToken cancellati } /// - /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + /// Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). /// /// /// Request Path @@ -1212,7 +1212,7 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, VirtualMachineReimageCo /// /// /// - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. public virtual async Task> RetrieveBootDiagnosticsDataAsync(int? sasUriExpirationTimeInMinutes = null, CancellationToken cancellationToken = default) { @@ -1243,7 +1243,7 @@ public virtual async Task> RetrieveB /// /// /// - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. public virtual Response RetrieveBootDiagnosticsData(int? sasUriExpirationTimeInMinutes = null, CancellationToken cancellationToken = default) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.cs index 54e69a177102..8922930756f0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandData.cs @@ -41,11 +41,14 @@ public VirtualMachineRunCommandData(AzureLocation location) : base(location) /// Specifies the user account on the VM when executing the run command. /// Specifies the user account password on the VM when executing the run command. /// The timeout in seconds to execute the run command. - /// Specifies the Azure storage blob where script output stream will be uploaded. - /// Specifies the Azure storage blob where script error stream will be uploaded. - /// The provisioning state, which only appears in the response. + /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + /// The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. /// The virtual machine run command instance view. - internal VirtualMachineRunCommandData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, VirtualMachineRunCommandScriptSource source, IList parameters, IList protectedParameters, bool? asyncExecution, string runAsUser, string runAsPassword, int? timeoutInSeconds, Uri outputBlobUri, Uri errorBlobUri, string provisioningState, VirtualMachineRunCommandInstanceView instanceView) : base(id, name, resourceType, systemData, tags, location) + /// Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. + internal VirtualMachineRunCommandData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, VirtualMachineRunCommandScriptSource source, IList parameters, IList protectedParameters, bool? asyncExecution, string runAsUser, string runAsPassword, int? timeoutInSeconds, Uri outputBlobUri, Uri errorBlobUri, RunCommandManagedIdentity outputBlobManagedIdentity, RunCommandManagedIdentity errorBlobManagedIdentity, string provisioningState, VirtualMachineRunCommandInstanceView instanceView, bool? treatFailureAsDeploymentFailure) : base(id, name, resourceType, systemData, tags, location) { Source = source; Parameters = parameters; @@ -56,8 +59,11 @@ internal VirtualMachineRunCommandData(ResourceIdentifier id, string name, Resour TimeoutInSeconds = timeoutInSeconds; OutputBlobUri = outputBlobUri; ErrorBlobUri = errorBlobUri; + OutputBlobManagedIdentity = outputBlobManagedIdentity; + ErrorBlobManagedIdentity = errorBlobManagedIdentity; ProvisioningState = provisioningState; InstanceView = instanceView; + TreatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure; } /// The source of the run command script. @@ -74,13 +80,19 @@ internal VirtualMachineRunCommandData(ResourceIdentifier id, string name, Resour public string RunAsPassword { get; set; } /// The timeout in seconds to execute the run command. public int? TimeoutInSeconds { get; set; } - /// Specifies the Azure storage blob where script output stream will be uploaded. + /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. public Uri OutputBlobUri { get; set; } - /// Specifies the Azure storage blob where script error stream will be uploaded. + /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. public Uri ErrorBlobUri { get; set; } - /// The provisioning state, which only appears in the response. + /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public RunCommandManagedIdentity OutputBlobManagedIdentity { get; set; } + /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + public RunCommandManagedIdentity ErrorBlobManagedIdentity { get; set; } + /// The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. public string ProvisioningState { get; } /// The virtual machine run command instance view. public VirtualMachineRunCommandInstanceView InstanceView { get; } + /// Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results. + public bool? TreatFailureAsDeploymentFailure { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs index e3ead596fc2a..0e05585a6146 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetData.cs @@ -49,14 +49,14 @@ public VirtualMachineScaleSetData(AzureLocation location) : base(location) /// When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. /// Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. /// Fault Domain count for each placement group. - /// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01. - /// Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01. + /// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01. + /// Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01. /// Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. /// Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. /// Specifies the orchestration mode for the virtual machine scale set. /// Specifies the Spot Restore properties for the virtual machine scale set. /// Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. - /// Specifies the time at which the Virtual Machine Scale Set resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. /// Optional property which must either be set to True or omitted. internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputeSku sku, ComputePlan plan, ManagedServiceIdentity identity, IList zones, ExtendedLocation extendedLocation, VirtualMachineScaleSetUpgradePolicy upgradePolicy, AutomaticRepairsPolicy automaticRepairsPolicy, VirtualMachineScaleSetVmProfile virtualMachineProfile, string provisioningState, bool? overprovision, bool? doNotRunExtensionsOnOverprovisionedVms, string uniqueId, bool? singlePlacementGroup, bool? zoneBalance, int? platformFaultDomainCount, WritableSubResource proximityPlacementGroup, WritableSubResource hostGroup, AdditionalCapabilities additionalCapabilities, ScaleInPolicy scaleInPolicy, OrchestrationMode? orchestrationMode, SpotRestorePolicy spotRestorePolicy, VirtualMachineScaleSetPriorityMixPolicy priorityMixPolicy, DateTimeOffset? timeCreated, bool? isMaximumCapacityConstrained) : base(id, name, resourceType, systemData, tags, location) { @@ -116,7 +116,7 @@ internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, Resource public bool? ZoneBalance { get; set; } /// Fault Domain count for each placement group. public int? PlatformFaultDomainCount { get; set; } - /// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. <br><br>Minimum api-version: 2018-04-01. + /// Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01. internal WritableSubResource ProximityPlacementGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier ProximityPlacementGroupId @@ -130,7 +130,7 @@ public ResourceIdentifier ProximityPlacementGroupId } } - /// Specifies information about the dedicated host group that the virtual machine scale set resides in. <br><br>Minimum api-version: 2020-06-01. + /// Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01. internal WritableSubResource HostGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier HostGroupId @@ -154,7 +154,7 @@ public ResourceIdentifier HostGroupId public SpotRestorePolicy SpotRestorePolicy { get; set; } /// Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. public VirtualMachineScaleSetPriorityMixPolicy PriorityMixPolicy { get; set; } - /// Specifies the time at which the Virtual Machine Scale Set resource was created.<br><br>Minimum api-version: 2021-11-01. + /// Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. public DateTimeOffset? TimeCreated { get; } /// Optional property which must either be set to True or omitted. public bool? IsMaximumCapacityConstrained { get; set; } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.cs index 2b13fda17aeb..94c23d1faef3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.cs @@ -438,15 +438,16 @@ public virtual ArmOperation Update(WaitUntil wai /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// A list of virtual machine instance IDs from the VM scale set. + /// Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). /// The cancellation token to use. - public virtual async Task DeallocateAsync(WaitUntil waitUntil, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, CancellationToken cancellationToken = default) + public virtual async Task DeallocateAsync(WaitUntil waitUntil, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = null, CancellationToken cancellationToken = default) { using var scope = _virtualMachineScaleSetClientDiagnostics.CreateScope("VirtualMachineScaleSetResource.Deallocate"); scope.Start(); try { - var response = await _virtualMachineScaleSetRestClient.DeallocateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, cancellationToken).ConfigureAwait(false); - var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds).Request, response, OperationFinalStateVia.Location); + var response = await _virtualMachineScaleSetRestClient.DeallocateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, hibernate, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, hibernate).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -473,15 +474,16 @@ public virtual async Task DeallocateAsync(WaitUntil waitUntil, Vir /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// A list of virtual machine instance IDs from the VM scale set. + /// Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). /// The cancellation token to use. - public virtual ArmOperation Deallocate(WaitUntil waitUntil, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Deallocate(WaitUntil waitUntil, VirtualMachineScaleSetVmInstanceIds vmInstanceIds = null, bool? hibernate = null, CancellationToken cancellationToken = default) { using var scope = _virtualMachineScaleSetClientDiagnostics.CreateScope("VirtualMachineScaleSetResource.Deallocate"); scope.Start(); try { - var response = _virtualMachineScaleSetRestClient.Deallocate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, cancellationToken); - var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds).Request, response, OperationFinalStateVia.Location); + var response = _virtualMachineScaleSetRestClient.Deallocate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, hibernate, cancellationToken); + var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, vmInstanceIds, hibernate).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -931,6 +933,74 @@ public virtual ArmOperation PowerOn(WaitUntil waitUntil, VirtualMachineScaleSetV } } + /// + /// Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reapply + /// + /// + /// Operation Id + /// VirtualMachineScaleSets_Reapply + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ReapplyAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _virtualMachineScaleSetClientDiagnostics.CreateScope("VirtualMachineScaleSetResource.Reapply"); + scope.Start(); + try + { + var response = await _virtualMachineScaleSetRestClient.ReapplyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateReapplyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reapply + /// + /// + /// Operation Id + /// VirtualMachineScaleSets_Reapply + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Reapply(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _virtualMachineScaleSetClientDiagnostics.CreateScope("VirtualMachineScaleSetResource.Reapply"); + scope.Start(); + try + { + var response = _virtualMachineScaleSetRestClient.Reapply(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ComputeArmOperation(_virtualMachineScaleSetClientDiagnostics, Pipeline, _virtualMachineScaleSetRestClient.CreateReapplyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. /// diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs index b75e67c5f804..fb80e798feb3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs @@ -50,8 +50,8 @@ public VirtualMachineScaleSetVmData(AzureLocation location) : base(location) /// Specifies the Security related profile settings for the virtual machine. /// Specifies the network interfaces of the virtual machine. /// Specifies the network profile configuration of the virtual machine. - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. /// The provisioning state, which only appears in the response. /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. @@ -127,9 +127,9 @@ public IList NetworkInterfaceConfigu } } - /// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. <br>**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. <br><br> You can easily view the output of your console log. <br><br> Azure also enables you to see a screenshot of the VM from the hypervisor. + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. public BootDiagnostics BootDiagnostics { get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; @@ -141,7 +141,7 @@ public BootDiagnostics BootDiagnostics } } - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. internal WritableSubResource AvailabilitySet { get; set; } /// Gets or sets Id. public ResourceIdentifier AvailabilitySetId diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.cs index 405b4d2316e1..5e4d4bab8a09 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionData.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; @@ -21,6 +22,7 @@ public partial class VirtualMachineScaleSetVmExtensionData : ResourceData /// Initializes a new instance of VirtualMachineScaleSetVmExtensionData. public VirtualMachineScaleSetVmExtensionData() { + ProvisionAfterExtensions = new ChangeTrackingList(); } /// Initializes a new instance of VirtualMachineScaleSetVmExtensionData. @@ -28,6 +30,7 @@ public VirtualMachineScaleSetVmExtensionData() /// The name. /// The resourceType. /// The systemData. + /// The location of the extension. /// How the extension handler should be forced to update even if the extension configuration has not changed. /// The name of the extension handler publisher. /// Specifies the type of the extension; an example is "CustomScriptExtension". @@ -40,8 +43,10 @@ public VirtualMachineScaleSetVmExtensionData() /// The virtual machine extension instance view. /// Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. /// The extensions protected settings that are passed by reference, and consumed from key vault. - internal VirtualMachineScaleSetVmExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string forceUpdateTag, string publisher, string extensionType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, bool? enableAutomaticUpgrade, BinaryData settings, BinaryData protectedSettings, string provisioningState, VirtualMachineExtensionInstanceView instanceView, bool? suppressFailures, KeyVaultSecretReference keyVaultProtectedSettings) : base(id, name, resourceType, systemData) + /// Collection of extension names after which this extension needs to be provisioned. + internal VirtualMachineScaleSetVmExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, string forceUpdateTag, string publisher, string extensionType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, bool? enableAutomaticUpgrade, BinaryData settings, BinaryData protectedSettings, string provisioningState, VirtualMachineExtensionInstanceView instanceView, bool? suppressFailures, KeyVaultSecretReference keyVaultProtectedSettings, IList provisionAfterExtensions) : base(id, name, resourceType, systemData) { + Location = location; ForceUpdateTag = forceUpdateTag; Publisher = publisher; ExtensionType = extensionType; @@ -54,8 +59,11 @@ internal VirtualMachineScaleSetVmExtensionData(ResourceIdentifier id, string nam InstanceView = instanceView; SuppressFailures = suppressFailures; KeyVaultProtectedSettings = keyVaultProtectedSettings; + ProvisionAfterExtensions = provisionAfterExtensions; } + /// The location of the extension. + public AzureLocation? Location { get; set; } /// How the extension handler should be forced to update even if the extension configuration has not changed. public string ForceUpdateTag { get; set; } /// The name of the extension handler publisher. @@ -138,5 +146,7 @@ internal VirtualMachineScaleSetVmExtensionData(ResourceIdentifier id, string nam public bool? SuppressFailures { get; set; } /// The extensions protected settings that are passed by reference, and consumed from key vault. public KeyVaultSecretReference KeyVaultProtectedSettings { get; set; } + /// Collection of extension names after which this extension needs to be provisioned. + public IList ProvisionAfterExtensions { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.cs index dae9b718eab5..b673223741f5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.cs @@ -963,7 +963,7 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken canc /// /// /// - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. public virtual async Task> RetrieveBootDiagnosticsDataAsync(int? sasUriExpirationTimeInMinutes = null, CancellationToken cancellationToken = default) { @@ -994,7 +994,7 @@ public virtual async Task> RetrieveB /// /// /// - /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + /// Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. /// The cancellation token to use. public virtual Response RetrieveBootDiagnosticsData(int? sasUriExpirationTimeInMinutes = null, CancellationToken cancellationToken = default) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 56552995b525..48ac5f724cbf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -11,7 +11,7 @@ azure-arm: true generate-model-factory: false library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/03261080b3083a9e8cb0b61d840cc8291c596590/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 skip-csproj: true