From 76bf1aac82688ecf636e165eeda7575860ad0742 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 4 Aug 2023 04:46:40 +0000 Subject: [PATCH] CodeGen from PR 25160 in Azure/azure-rest-api-specs Merge aa2cebc705fde7a066fd8563247839701b49a492 into d8fa7c9cd34a49124288aa2bded6c5ce51cd8a89 --- .../Azure.ResourceManager.Compute.netstandard2.0.cs | 7 +++++-- .../src/Generated/ArmComputeModelFactory.cs | 10 ++++++---- .../src/Generated/ManagedDiskData.cs | 6 +++++- .../src/Generated/Models/DiskCreateOption.cs | 3 +++ .../Models/DiskCreationData.Serialization.cs | 13 ++++++++++++- .../src/Generated/Models/DiskCreationData.cs | 6 +++++- .../Models/ManagedDiskData.Serialization.cs | 12 +++++++++++- .../RestOperations/DiskAccessesRestOperations.cs | 2 +- .../DiskEncryptionSetsRestOperations.cs | 2 +- .../DiskRestorePointRestOperations.cs | 2 +- .../Generated/RestOperations/DisksRestOperations.cs | 2 +- .../RestOperations/SnapshotsRestOperations.cs | 2 +- .../Azure.ResourceManager.Compute/src/autorest.md | 2 +- 13 files changed, 53 insertions(+), 16 deletions(-) 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 9986601a22b6..7c6d94cededf 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 @@ -1276,6 +1276,7 @@ public ManagedDiskData(Azure.Core.AzureLocation location) : base (default(Azure. public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.HyperVGeneration? HyperVGeneration { get { throw null; } set { } } public bool? IsOptimizedForFrequentAttach { get { throw null; } set { } } + public System.DateTimeOffset? LastOwnershipUpdateOn { get { throw null; } } public Azure.Core.ResourceIdentifier ManagedBy { get { throw null; } } public System.Collections.Generic.IReadOnlyList ManagedByExtended { get { throw null; } } public int? MaxShares { get { throw null; } set { } } @@ -2443,7 +2444,7 @@ public static partial class ArmComputeModelFactory public static Azure.ResourceManager.Compute.Models.DedicatedHostInstanceView DedicatedHostInstanceView(string assetId = null, System.Collections.Generic.IEnumerable availableCapacityAllocatableVms = null, System.Collections.Generic.IEnumerable statuses = null) { throw null; } public static Azure.ResourceManager.Compute.Models.DedicatedHostInstanceViewWithName DedicatedHostInstanceViewWithName(string assetId = null, System.Collections.Generic.IEnumerable availableCapacityAllocatableVms = null, System.Collections.Generic.IEnumerable statuses = null, string name = null) { throw null; } public static Azure.ResourceManager.Compute.DiskAccessData DiskAccessData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string provisioningState = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Compute.Models.DiskCreationData DiskCreationData(Azure.ResourceManager.Compute.Models.DiskCreateOption createOption = default(Azure.ResourceManager.Compute.Models.DiskCreateOption), Azure.Core.ResourceIdentifier storageAccountId = null, Azure.ResourceManager.Compute.Models.ImageDiskReference imageReference = null, Azure.ResourceManager.Compute.Models.ImageDiskReference galleryImageReference = null, System.Uri sourceUri = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceUniqueId = null, long? uploadSizeBytes = default(long?), int? logicalSectorSize = default(int?), System.Uri securityDataUri = null, bool? isPerformancePlusEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.Compute.Models.DiskCreationData DiskCreationData(Azure.ResourceManager.Compute.Models.DiskCreateOption createOption = default(Azure.ResourceManager.Compute.Models.DiskCreateOption), Azure.Core.ResourceIdentifier storageAccountId = null, Azure.ResourceManager.Compute.Models.ImageDiskReference imageReference = null, Azure.ResourceManager.Compute.Models.ImageDiskReference galleryImageReference = null, System.Uri sourceUri = null, Azure.Core.ResourceIdentifier sourceResourceId = null, string sourceUniqueId = null, long? uploadSizeBytes = default(long?), int? logicalSectorSize = default(int?), System.Uri securityDataUri = null, bool? isPerformancePlusEnabled = default(bool?), string elasticSanResourceId = null) { throw null; } public static Azure.ResourceManager.Compute.DiskEncryptionSetData DiskEncryptionSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Compute.Models.DiskEncryptionSetType? encryptionType = default(Azure.ResourceManager.Compute.Models.DiskEncryptionSetType?), Azure.ResourceManager.Compute.Models.KeyForDiskEncryptionSet activeKey = null, System.Collections.Generic.IEnumerable previousKeys = null, string provisioningState = null, bool? rotationToLatestKeyVersionEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.ComputeApiError autoKeyRotationError = null, string federatedClientId = null) { throw null; } public static Azure.ResourceManager.Compute.DiskImageData DiskImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.Core.ResourceIdentifier sourceVirtualMachineId = null, Azure.ResourceManager.Compute.Models.ImageStorageProfile storageProfile = null, string provisioningState = null, Azure.ResourceManager.Compute.Models.HyperVGeneration? hyperVGeneration = default(Azure.ResourceManager.Compute.Models.HyperVGeneration?)) { throw null; } public static Azure.ResourceManager.Compute.Models.DiskInstanceView DiskInstanceView(string name = null, System.Collections.Generic.IEnumerable encryptionSettings = null, System.Collections.Generic.IEnumerable statuses = null) { throw null; } @@ -2471,7 +2472,7 @@ public static partial class ArmComputeModelFactory public static Azure.ResourceManager.Compute.Models.LastPatchInstallationSummary LastPatchInstallationSummary(Azure.ResourceManager.Compute.Models.PatchOperationStatus? status = default(Azure.ResourceManager.Compute.Models.PatchOperationStatus?), string installationActivityId = null, bool? maintenanceWindowExceeded = default(bool?), int? notSelectedPatchCount = default(int?), int? excludedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.ComputeApiError error = null) { throw null; } public static Azure.ResourceManager.Compute.Models.LogAnalytics LogAnalytics(string logAnalyticsOutput = null) { throw null; } public static Azure.ResourceManager.Compute.Models.MaintenanceRedeployStatus MaintenanceRedeployStatus(bool? isCustomerInitiatedMaintenanceAllowed = default(bool?), System.DateTimeOffset? preMaintenanceWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? preMaintenanceWindowEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? maintenanceWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? maintenanceWindowEndOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.MaintenanceOperationResultCodeType? lastOperationResultCode = default(Azure.ResourceManager.Compute.Models.MaintenanceOperationResultCodeType?), string lastOperationMessage = null) { throw null; } - public static Azure.ResourceManager.Compute.ManagedDiskData ManagedDiskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier managedBy = null, System.Collections.Generic.IEnumerable managedByExtended = null, Azure.ResourceManager.Compute.Models.DiskSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? osType = default(Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType?), Azure.ResourceManager.Compute.Models.HyperVGeneration? hyperVGeneration = default(Azure.ResourceManager.Compute.Models.HyperVGeneration?), Azure.ResourceManager.Compute.Models.DiskPurchasePlan purchasePlan = null, Azure.ResourceManager.Compute.Models.SupportedCapabilities supportedCapabilities = null, Azure.ResourceManager.Compute.Models.DiskCreationData creationData = null, int? diskSizeGB = default(int?), long? diskSizeBytes = default(long?), string uniqueId = null, Azure.ResourceManager.Compute.Models.EncryptionSettingsGroup encryptionSettingsGroup = null, string provisioningState = null, long? diskIopsReadWrite = default(long?), long? diskMBpsReadWrite = default(long?), long? diskIopsReadOnly = default(long?), long? diskMBpsReadOnly = default(long?), Azure.ResourceManager.Compute.Models.DiskState? diskState = default(Azure.ResourceManager.Compute.Models.DiskState?), Azure.ResourceManager.Compute.Models.DiskEncryption encryption = null, int? maxShares = default(int?), System.Collections.Generic.IEnumerable shareInfo = null, Azure.ResourceManager.Compute.Models.NetworkAccessPolicy? networkAccessPolicy = default(Azure.ResourceManager.Compute.Models.NetworkAccessPolicy?), Azure.Core.ResourceIdentifier diskAccessId = null, System.DateTimeOffset? burstingEnabledOn = default(System.DateTimeOffset?), string tier = null, bool? burstingEnabled = default(bool?), string propertyUpdatesInProgressTargetTier = null, bool? supportsHibernation = default(bool?), Azure.ResourceManager.Compute.Models.DiskSecurityProfile securityProfile = null, float? completionPercent = default(float?), Azure.ResourceManager.Compute.Models.DiskPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Compute.Models.DiskPublicNetworkAccess?), Azure.ResourceManager.Compute.Models.DataAccessAuthMode? dataAccessAuthMode = default(Azure.ResourceManager.Compute.Models.DataAccessAuthMode?), bool? isOptimizedForFrequentAttach = default(bool?)) { throw null; } + public static Azure.ResourceManager.Compute.ManagedDiskData ManagedDiskData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier managedBy = null, System.Collections.Generic.IEnumerable managedByExtended = null, Azure.ResourceManager.Compute.Models.DiskSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType? osType = default(Azure.ResourceManager.Compute.Models.SupportedOperatingSystemType?), Azure.ResourceManager.Compute.Models.HyperVGeneration? hyperVGeneration = default(Azure.ResourceManager.Compute.Models.HyperVGeneration?), Azure.ResourceManager.Compute.Models.DiskPurchasePlan purchasePlan = null, Azure.ResourceManager.Compute.Models.SupportedCapabilities supportedCapabilities = null, Azure.ResourceManager.Compute.Models.DiskCreationData creationData = null, int? diskSizeGB = default(int?), long? diskSizeBytes = default(long?), string uniqueId = null, Azure.ResourceManager.Compute.Models.EncryptionSettingsGroup encryptionSettingsGroup = null, string provisioningState = null, long? diskIopsReadWrite = default(long?), long? diskMBpsReadWrite = default(long?), long? diskIopsReadOnly = default(long?), long? diskMBpsReadOnly = default(long?), Azure.ResourceManager.Compute.Models.DiskState? diskState = default(Azure.ResourceManager.Compute.Models.DiskState?), Azure.ResourceManager.Compute.Models.DiskEncryption encryption = null, int? maxShares = default(int?), System.Collections.Generic.IEnumerable shareInfo = null, Azure.ResourceManager.Compute.Models.NetworkAccessPolicy? networkAccessPolicy = default(Azure.ResourceManager.Compute.Models.NetworkAccessPolicy?), Azure.Core.ResourceIdentifier diskAccessId = null, System.DateTimeOffset? burstingEnabledOn = default(System.DateTimeOffset?), string tier = null, bool? burstingEnabled = default(bool?), string propertyUpdatesInProgressTargetTier = null, bool? supportsHibernation = default(bool?), Azure.ResourceManager.Compute.Models.DiskSecurityProfile securityProfile = null, float? completionPercent = default(float?), Azure.ResourceManager.Compute.Models.DiskPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Compute.Models.DiskPublicNetworkAccess?), Azure.ResourceManager.Compute.Models.DataAccessAuthMode? dataAccessAuthMode = default(Azure.ResourceManager.Compute.Models.DataAccessAuthMode?), bool? isOptimizedForFrequentAttach = default(bool?), System.DateTimeOffset? lastOwnershipUpdateOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Compute.Models.OrchestrationServiceSummary OrchestrationServiceSummary(Azure.ResourceManager.Compute.Models.OrchestrationServiceName? serviceName = default(Azure.ResourceManager.Compute.Models.OrchestrationServiceName?), Azure.ResourceManager.Compute.Models.OrchestrationServiceState? serviceState = default(Azure.ResourceManager.Compute.Models.OrchestrationServiceState?)) { throw null; } public static Azure.ResourceManager.Compute.Models.OSVersionPropertiesBase OSVersionPropertiesBase(string version = null, string label = null, bool? isDefault = default(bool?), bool? isActive = default(bool?)) { throw null; } public static Azure.ResourceManager.Compute.Models.PatchInstallationDetail PatchInstallationDetail(string patchId = null, string name = null, string version = null, string kbId = null, System.Collections.Generic.IEnumerable classifications = null, Azure.ResourceManager.Compute.Models.PatchInstallationState? installationState = default(Azure.ResourceManager.Compute.Models.PatchInstallationState?)) { throw null; } @@ -3354,6 +3355,7 @@ public DiskAccessPatch() { } public DiskCreateOption(string value) { throw null; } public static Azure.ResourceManager.Compute.Models.DiskCreateOption Attach { get { throw null; } } public static Azure.ResourceManager.Compute.Models.DiskCreateOption Copy { get { throw null; } } + public static Azure.ResourceManager.Compute.Models.DiskCreateOption CopyFromSanSnapshot { get { throw null; } } public static Azure.ResourceManager.Compute.Models.DiskCreateOption CopyStart { get { throw null; } } public static Azure.ResourceManager.Compute.Models.DiskCreateOption Empty { get { throw null; } } public static Azure.ResourceManager.Compute.Models.DiskCreateOption FromImage { get { throw null; } } @@ -3395,6 +3397,7 @@ public partial class DiskCreationData { public DiskCreationData(Azure.ResourceManager.Compute.Models.DiskCreateOption createOption) { } public Azure.ResourceManager.Compute.Models.DiskCreateOption CreateOption { get { throw null; } set { } } + public string ElasticSanResourceId { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageDiskReference GalleryImageReference { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ImageDiskReference ImageReference { get { throw null; } set { } } public bool? IsPerformancePlusEnabled { get { throw null; } set { } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs index d8eb0651dac5..c5b8098cba6d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs @@ -1424,15 +1424,16 @@ public static VirtualMachineRunCommandInstanceView VirtualMachineRunCommandInsta /// Policy for controlling export on the disk. /// Additional authentication requirements when exporting or uploading to a disk or snapshot. /// Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. + /// The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. /// A new instance for mocking. - public static ManagedDiskData ManagedDiskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier managedBy = null, IEnumerable managedByExtended = null, DiskSku sku = null, IEnumerable zones = null, ExtendedLocation extendedLocation = null, DateTimeOffset? timeCreated = null, SupportedOperatingSystemType? osType = null, HyperVGeneration? hyperVGeneration = null, DiskPurchasePlan purchasePlan = null, SupportedCapabilities supportedCapabilities = null, DiskCreationData creationData = null, int? diskSizeGB = null, long? diskSizeBytes = null, string uniqueId = null, EncryptionSettingsGroup encryptionSettingsGroup = null, string provisioningState = null, long? diskIopsReadWrite = null, long? diskMBpsReadWrite = null, long? diskIopsReadOnly = null, long? diskMBpsReadOnly = null, DiskState? diskState = null, DiskEncryption encryption = null, int? maxShares = null, IEnumerable shareInfo = null, NetworkAccessPolicy? networkAccessPolicy = null, ResourceIdentifier diskAccessId = null, DateTimeOffset? burstingEnabledOn = null, string tier = null, bool? burstingEnabled = null, string propertyUpdatesInProgressTargetTier = null, bool? supportsHibernation = null, DiskSecurityProfile securityProfile = null, float? completionPercent = null, DiskPublicNetworkAccess? publicNetworkAccess = null, DataAccessAuthMode? dataAccessAuthMode = null, bool? isOptimizedForFrequentAttach = null) + public static ManagedDiskData ManagedDiskData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier managedBy = null, IEnumerable managedByExtended = null, DiskSku sku = null, IEnumerable zones = null, ExtendedLocation extendedLocation = null, DateTimeOffset? timeCreated = null, SupportedOperatingSystemType? osType = null, HyperVGeneration? hyperVGeneration = null, DiskPurchasePlan purchasePlan = null, SupportedCapabilities supportedCapabilities = null, DiskCreationData creationData = null, int? diskSizeGB = null, long? diskSizeBytes = null, string uniqueId = null, EncryptionSettingsGroup encryptionSettingsGroup = null, string provisioningState = null, long? diskIopsReadWrite = null, long? diskMBpsReadWrite = null, long? diskIopsReadOnly = null, long? diskMBpsReadOnly = null, DiskState? diskState = null, DiskEncryption encryption = null, int? maxShares = null, IEnumerable shareInfo = null, NetworkAccessPolicy? networkAccessPolicy = null, ResourceIdentifier diskAccessId = null, DateTimeOffset? burstingEnabledOn = null, string tier = null, bool? burstingEnabled = null, string propertyUpdatesInProgressTargetTier = null, bool? supportsHibernation = null, DiskSecurityProfile securityProfile = null, float? completionPercent = null, DiskPublicNetworkAccess? publicNetworkAccess = null, DataAccessAuthMode? dataAccessAuthMode = null, bool? isOptimizedForFrequentAttach = null, DateTimeOffset? lastOwnershipUpdateOn = null) { tags ??= new Dictionary(); managedByExtended ??= new List(); zones ??= new List(); shareInfo ??= new List(); - return new ManagedDiskData(id, name, resourceType, systemData, tags, location, managedBy, managedByExtended?.ToList(), sku, zones?.ToList(), extendedLocation, timeCreated, osType, hyperVGeneration, purchasePlan, supportedCapabilities, creationData, diskSizeGB, diskSizeBytes, uniqueId, encryptionSettingsGroup, provisioningState, diskIopsReadWrite, diskMBpsReadWrite, diskIopsReadOnly, diskMBpsReadOnly, diskState, encryption, maxShares, shareInfo?.ToList(), networkAccessPolicy, diskAccessId, burstingEnabledOn, tier, burstingEnabled, propertyUpdatesInProgressTargetTier != null ? new PropertyUpdatesInProgress(propertyUpdatesInProgressTargetTier) : null, supportsHibernation, securityProfile, completionPercent, publicNetworkAccess, dataAccessAuthMode, isOptimizedForFrequentAttach); + return new ManagedDiskData(id, name, resourceType, systemData, tags, location, managedBy, managedByExtended?.ToList(), sku, zones?.ToList(), extendedLocation, timeCreated, osType, hyperVGeneration, purchasePlan, supportedCapabilities, creationData, diskSizeGB, diskSizeBytes, uniqueId, encryptionSettingsGroup, provisioningState, diskIopsReadWrite, diskMBpsReadWrite, diskIopsReadOnly, diskMBpsReadOnly, diskState, encryption, maxShares, shareInfo?.ToList(), networkAccessPolicy, diskAccessId, burstingEnabledOn, tier, burstingEnabled, propertyUpdatesInProgressTargetTier != null ? new PropertyUpdatesInProgress(propertyUpdatesInProgressTargetTier) : null, supportsHibernation, securityProfile, completionPercent, publicNetworkAccess, dataAccessAuthMode, isOptimizedForFrequentAttach, lastOwnershipUpdateOn); } /// Initializes a new instance of DiskSku. @@ -1456,10 +1457,11 @@ public static DiskSku DiskSku(DiskStorageAccountType? name = null, string tier = /// Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. /// If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. /// Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. + /// Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. /// A new instance for mocking. - public static DiskCreationData DiskCreationData(DiskCreateOption createOption = default, ResourceIdentifier storageAccountId = null, ImageDiskReference imageReference = null, ImageDiskReference galleryImageReference = null, Uri sourceUri = null, ResourceIdentifier sourceResourceId = null, string sourceUniqueId = null, long? uploadSizeBytes = null, int? logicalSectorSize = null, Uri securityDataUri = null, bool? isPerformancePlusEnabled = null) + public static DiskCreationData DiskCreationData(DiskCreateOption createOption = default, ResourceIdentifier storageAccountId = null, ImageDiskReference imageReference = null, ImageDiskReference galleryImageReference = null, Uri sourceUri = null, ResourceIdentifier sourceResourceId = null, string sourceUniqueId = null, long? uploadSizeBytes = null, int? logicalSectorSize = null, Uri securityDataUri = null, bool? isPerformancePlusEnabled = null, string elasticSanResourceId = null) { - return new DiskCreationData(createOption, storageAccountId, imageReference, galleryImageReference, sourceUri, sourceResourceId, sourceUniqueId, uploadSizeBytes, logicalSectorSize, securityDataUri, isPerformancePlusEnabled); + return new DiskCreationData(createOption, storageAccountId, imageReference, galleryImageReference, sourceUri, sourceResourceId, sourceUniqueId, uploadSizeBytes, logicalSectorSize, securityDataUri, isPerformancePlusEnabled, elasticSanResourceId); } /// Initializes a new instance of ShareInfoElement. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.cs index c5dd11fec00b..71d01666e368 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskData.cs @@ -72,7 +72,8 @@ public ManagedDiskData(AzureLocation location) : base(location) /// Policy for controlling export on the disk. /// Additional authentication requirements when exporting or uploading to a disk or snapshot. /// Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. - internal ManagedDiskData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier managedBy, IReadOnlyList managedByExtended, DiskSku sku, IList zones, ExtendedLocation extendedLocation, DateTimeOffset? timeCreated, SupportedOperatingSystemType? osType, HyperVGeneration? hyperVGeneration, DiskPurchasePlan purchasePlan, SupportedCapabilities supportedCapabilities, DiskCreationData creationData, int? diskSizeGB, long? diskSizeBytes, string uniqueId, EncryptionSettingsGroup encryptionSettingsGroup, string provisioningState, long? diskIopsReadWrite, long? diskMBpsReadWrite, long? diskIopsReadOnly, long? diskMBpsReadOnly, DiskState? diskState, DiskEncryption encryption, int? maxShares, IReadOnlyList shareInfo, NetworkAccessPolicy? networkAccessPolicy, ResourceIdentifier diskAccessId, DateTimeOffset? burstingEnabledOn, string tier, bool? burstingEnabled, PropertyUpdatesInProgress propertyUpdatesInProgress, bool? supportsHibernation, DiskSecurityProfile securityProfile, float? completionPercent, DiskPublicNetworkAccess? publicNetworkAccess, DataAccessAuthMode? dataAccessAuthMode, bool? isOptimizedForFrequentAttach) : base(id, name, resourceType, systemData, tags, location) + /// The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. + internal ManagedDiskData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier managedBy, IReadOnlyList managedByExtended, DiskSku sku, IList zones, ExtendedLocation extendedLocation, DateTimeOffset? timeCreated, SupportedOperatingSystemType? osType, HyperVGeneration? hyperVGeneration, DiskPurchasePlan purchasePlan, SupportedCapabilities supportedCapabilities, DiskCreationData creationData, int? diskSizeGB, long? diskSizeBytes, string uniqueId, EncryptionSettingsGroup encryptionSettingsGroup, string provisioningState, long? diskIopsReadWrite, long? diskMBpsReadWrite, long? diskIopsReadOnly, long? diskMBpsReadOnly, DiskState? diskState, DiskEncryption encryption, int? maxShares, IReadOnlyList shareInfo, NetworkAccessPolicy? networkAccessPolicy, ResourceIdentifier diskAccessId, DateTimeOffset? burstingEnabledOn, string tier, bool? burstingEnabled, PropertyUpdatesInProgress propertyUpdatesInProgress, bool? supportsHibernation, DiskSecurityProfile securityProfile, float? completionPercent, DiskPublicNetworkAccess? publicNetworkAccess, DataAccessAuthMode? dataAccessAuthMode, bool? isOptimizedForFrequentAttach, DateTimeOffset? lastOwnershipUpdateOn) : base(id, name, resourceType, systemData, tags, location) { ManagedBy = managedBy; ManagedByExtended = managedByExtended; @@ -110,6 +111,7 @@ internal ManagedDiskData(ResourceIdentifier id, string name, ResourceType resour PublicNetworkAccess = publicNetworkAccess; DataAccessAuthMode = dataAccessAuthMode; IsOptimizedForFrequentAttach = isOptimizedForFrequentAttach; + LastOwnershipUpdateOn = lastOwnershipUpdateOn; } /// A relative URI containing the ID of the VM that has the disk attached. @@ -190,5 +192,7 @@ public string PropertyUpdatesInProgressTargetTier public DataAccessAuthMode? DataAccessAuthMode { get; set; } /// Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. public bool? IsOptimizedForFrequentAttach { get; set; } + /// The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. + public DateTimeOffset? LastOwnershipUpdateOn { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOption.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOption.cs index fdadbda21dde..e6b4be112a1a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOption.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreateOption.cs @@ -32,6 +32,7 @@ public DiskCreateOption(string value) private const string CopyStartValue = "CopyStart"; private const string ImportSecureValue = "ImportSecure"; private const string UploadPreparedSecureValue = "UploadPreparedSecure"; + private const string CopyFromSanSnapshotValue = "CopyFromSanSnapshot"; /// Create an empty data disk of a size given by diskSizeGB. public static DiskCreateOption Empty { get; } = new DiskCreateOption(EmptyValue); @@ -53,6 +54,8 @@ public DiskCreateOption(string value) public static DiskCreateOption ImportSecure { get; } = new DiskCreateOption(ImportSecureValue); /// Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state. public static DiskCreateOption UploadPreparedSecure { get; } = new DiskCreateOption(UploadPreparedSecureValue); + /// Create a new disk by exporting from elastic san volume snapshot. + public static DiskCreateOption CopyFromSanSnapshot { get; } = new DiskCreateOption(CopyFromSanSnapshotValue); /// Determines if two values are the same. public static bool operator ==(DiskCreateOption left, DiskCreateOption right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs index 76507e2526bc..611f29a86e76 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.Serialization.cs @@ -63,6 +63,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("performancePlus"u8); writer.WriteBooleanValue(IsPerformancePlusEnabled.Value); } + if (Optional.IsDefined(ElasticSanResourceId)) + { + writer.WritePropertyName("elasticSanResourceId"u8); + writer.WriteStringValue(ElasticSanResourceId); + } writer.WriteEndObject(); } @@ -83,6 +88,7 @@ internal static DiskCreationData DeserializeDiskCreationData(JsonElement element Optional logicalSectorSize = default; Optional securityDataUri = default; Optional performancePlus = default; + Optional elasticSanResourceId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("createOption"u8)) @@ -176,8 +182,13 @@ internal static DiskCreationData DeserializeDiskCreationData(JsonElement element performancePlus = property.Value.GetBoolean(); continue; } + if (property.NameEquals("elasticSanResourceId"u8)) + { + elasticSanResourceId = property.Value.GetString(); + continue; + } } - return new DiskCreationData(createOption, storageAccountId.Value, imageReference.Value, galleryImageReference.Value, sourceUri.Value, sourceResourceId.Value, sourceUniqueId.Value, Optional.ToNullable(uploadSizeBytes), Optional.ToNullable(logicalSectorSize), securityDataUri.Value, Optional.ToNullable(performancePlus)); + return new DiskCreationData(createOption, storageAccountId.Value, imageReference.Value, galleryImageReference.Value, sourceUri.Value, sourceResourceId.Value, sourceUniqueId.Value, Optional.ToNullable(uploadSizeBytes), Optional.ToNullable(logicalSectorSize), securityDataUri.Value, Optional.ToNullable(performancePlus), elasticSanResourceId.Value); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.cs index 550dbf1dac1f..74ed382acfc2 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/DiskCreationData.cs @@ -32,7 +32,8 @@ public DiskCreationData(DiskCreateOption createOption) /// Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. /// If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. /// Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. - internal DiskCreationData(DiskCreateOption createOption, ResourceIdentifier storageAccountId, ImageDiskReference imageReference, ImageDiskReference galleryImageReference, Uri sourceUri, ResourceIdentifier sourceResourceId, string sourceUniqueId, long? uploadSizeBytes, int? logicalSectorSize, Uri securityDataUri, bool? isPerformancePlusEnabled) + /// Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. + internal DiskCreationData(DiskCreateOption createOption, ResourceIdentifier storageAccountId, ImageDiskReference imageReference, ImageDiskReference galleryImageReference, Uri sourceUri, ResourceIdentifier sourceResourceId, string sourceUniqueId, long? uploadSizeBytes, int? logicalSectorSize, Uri securityDataUri, bool? isPerformancePlusEnabled, string elasticSanResourceId) { CreateOption = createOption; StorageAccountId = storageAccountId; @@ -45,6 +46,7 @@ internal DiskCreationData(DiskCreateOption createOption, ResourceIdentifier stor LogicalSectorSize = logicalSectorSize; SecurityDataUri = securityDataUri; IsPerformancePlusEnabled = isPerformancePlusEnabled; + ElasticSanResourceId = elasticSanResourceId; } /// This enumerates the possible sources of a disk's creation. @@ -69,5 +71,7 @@ internal DiskCreationData(DiskCreateOption createOption, ResourceIdentifier stor public Uri SecurityDataUri { get; set; } /// Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. public bool? IsPerformancePlusEnabled { get; set; } + /// Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. + public string ElasticSanResourceId { get; set; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskData.Serialization.cs index e51727b76622..fb038a691e24 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/ManagedDiskData.Serialization.cs @@ -222,6 +222,7 @@ internal static ManagedDiskData DeserializeManagedDiskData(JsonElement element) Optional publicNetworkAccess = default; Optional dataAccessAuthMode = default; Optional optimizedForFrequentAttach = default; + Optional lastOwnershipUpdateTime = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("managedBy"u8)) @@ -610,11 +611,20 @@ internal static ManagedDiskData DeserializeManagedDiskData(JsonElement element) optimizedForFrequentAttach = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("LastOwnershipUpdateTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastOwnershipUpdateTime = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } } - return new ManagedDiskData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, managedBy.Value, Optional.ToList(managedByExtended), sku.Value, Optional.ToList(zones), extendedLocation, Optional.ToNullable(timeCreated), Optional.ToNullable(osType), Optional.ToNullable(hyperVGeneration), purchasePlan.Value, supportedCapabilities.Value, creationData.Value, Optional.ToNullable(diskSizeGB), Optional.ToNullable(diskSizeBytes), uniqueId.Value, encryptionSettingsGroup.Value, provisioningState.Value, Optional.ToNullable(diskIOPSReadWrite), Optional.ToNullable(diskMBpsReadWrite), Optional.ToNullable(diskIOPSReadOnly), Optional.ToNullable(diskMBpsReadOnly), Optional.ToNullable(diskState), encryption.Value, Optional.ToNullable(maxShares), Optional.ToList(shareInfo), Optional.ToNullable(networkAccessPolicy), diskAccessId.Value, Optional.ToNullable(burstingEnabledTime), tier.Value, Optional.ToNullable(burstingEnabled), propertyUpdatesInProgress.Value, Optional.ToNullable(supportsHibernation), securityProfile.Value, Optional.ToNullable(completionPercent), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(dataAccessAuthMode), Optional.ToNullable(optimizedForFrequentAttach)); + return new ManagedDiskData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, managedBy.Value, Optional.ToList(managedByExtended), sku.Value, Optional.ToList(zones), extendedLocation, Optional.ToNullable(timeCreated), Optional.ToNullable(osType), Optional.ToNullable(hyperVGeneration), purchasePlan.Value, supportedCapabilities.Value, creationData.Value, Optional.ToNullable(diskSizeGB), Optional.ToNullable(diskSizeBytes), uniqueId.Value, encryptionSettingsGroup.Value, provisioningState.Value, Optional.ToNullable(diskIOPSReadWrite), Optional.ToNullable(diskMBpsReadWrite), Optional.ToNullable(diskIOPSReadOnly), Optional.ToNullable(diskMBpsReadOnly), Optional.ToNullable(diskState), encryption.Value, Optional.ToNullable(maxShares), Optional.ToList(shareInfo), Optional.ToNullable(networkAccessPolicy), diskAccessId.Value, Optional.ToNullable(burstingEnabledTime), tier.Value, Optional.ToNullable(burstingEnabled), propertyUpdatesInProgress.Value, Optional.ToNullable(supportsHibernation), securityProfile.Value, Optional.ToNullable(completionPercent), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(dataAccessAuthMode), Optional.ToNullable(optimizedForFrequentAttach), Optional.ToNullable(lastOwnershipUpdateTime)); } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs index af0bb626f2a2..28b6dc7b6359 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskAccessesRestOperations.cs @@ -33,7 +33,7 @@ public DiskAccessesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-02"; + _apiVersion = apiVersion ?? "2023-04-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs index d83814538b55..5aff445d19a8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskEncryptionSetsRestOperations.cs @@ -33,7 +33,7 @@ public DiskEncryptionSetsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-02"; + _apiVersion = apiVersion ?? "2023-04-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs index 54dd1ed9b488..aa8433fe2be5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DiskRestorePointRestOperations.cs @@ -33,7 +33,7 @@ public DiskRestorePointRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-02"; + _apiVersion = apiVersion ?? "2023-04-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs index 7b0a78eae540..aec775c85151 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/DisksRestOperations.cs @@ -33,7 +33,7 @@ public DisksRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-02"; + _apiVersion = apiVersion ?? "2023-04-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs index c148cf8ba591..84df50ab2369 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestOperations/SnapshotsRestOperations.cs @@ -33,7 +33,7 @@ public SnapshotsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-01-02"; + _apiVersion = apiVersion ?? "2023-04-02"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 0b6e1b7d9887..2c033a452aa8 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -10,7 +10,7 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Compute namespace: Azure.ResourceManager.Compute -require: https://github.com/Azure/azure-rest-api-specs/blob/f31a209b4013a8661200718a9e441efee4f379c3/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