[Compute] Update SDK to ComputeRP 2025-11-01#29441
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Az.Compute module’s generated management SDK to target ComputeRP API version 2025-11-01, regenerating the Compute.Management.Sdk client/operations/models and updating release notes to reflect the API version change.
Changes:
- Updated ComputeRP API version references across generated operations (e.g.,
apiVersion = "2025-11-01"). - Regenerated SDK surface area to include new/updated operations and models (e.g., lifecycle hook events, resiliency/external health-related models).
- Added a Compute module changelog entry for the ComputeRP API version update.
Reviewed changes
Copilot reviewed 2 out of 85 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/Compute/Compute/ChangeLog.md |
Adds release note about ComputeRP API version update. |
src/Compute/Compute.Management.Sdk/README.md |
Updates AutoRest spec commit and input-file URLs for regeneration. |
src/Compute/Compute.Management.Sdk/Generated/VirtualMachinesOperations*.cs |
Updates ComputeRP API version strings and adds forceDeallocate support to VM deallocate methods. |
src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperations*.cs |
Adds $expand support to capacity reservation listing and updates API version. |
src/Compute/Compute.Management.Sdk/Generated/*LifeCycleHookEvents*.cs |
Introduces new lifecycle hook events operation group and related models. |
src/Compute/Compute.Management.Sdk/Generated/Models/*.cs |
Adds/updates models for new API version features (resiliency, storage alignment, lifecycle hooks, etc.). |
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/common-types/resource-management/v3/types.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/ComputeRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/DiskRP/stable/2025-01-02/DiskRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2025-03-03/GalleryRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/skus.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/common-types/v1/common.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-11-01/ComputeRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-01-02/DiskRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json | ||
| - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2021-07-01/skus.json |
There was a problem hiding this comment.
The AutoRest input-file URLs were changed from the standard ComputeRP/DiskRP/GalleryRP paths to a single "Microsoft.Compute/Compute/stable/..." path for ComputeRP.json, DiskRP.json, and GalleryRP.json. This is inconsistent with other repo AutoRest configs (which use ".../ComputeRP/", ".../DiskRP/", ".../GalleryRP/") and risks pointing to non-existent spec paths, breaking regeneration. Please verify the spec layout at the referenced commit and revert to the correct per-RP paths if needed.
| /// <param name="userAssignedIdentities">The list of user identities associated with the Virtual Machine. The user | ||
| /// identity dictionary key references will be ARM resource ids in the form: | ||
| /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | ||
| /// </param> | ||
| public VirtualMachineIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue>)) | ||
| public VirtualMachineIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue>)) | ||
|
|
There was a problem hiding this comment.
Changing VirtualMachineIdentity.UserAssignedIdentities from IDictionary<string, UserAssignedIdentitiesValue> to IDictionary<string, CommonUserAssignedIdentitiesValue> is a breaking change for the Compute module (Compute.csproj references this SDK and existing cmdlet code uses UserAssignedIdentitiesValue). This will cause compile failures unless all call sites are updated. Consider keeping the existing UserAssignedIdentitiesValue type for compatibility (or providing an adapter/alias/overload) instead of introducing a duplicate equivalent model type.
| /// form: | ||
| /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | ||
| /// </param> | ||
| public VirtualMachineScaleSetIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue>)) | ||
| public VirtualMachineScaleSetIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue>)) | ||
|
|
There was a problem hiding this comment.
VirtualMachineScaleSetIdentity.UserAssignedIdentities now uses CommonUserAssignedIdentitiesValue instead of the existing UserAssignedIdentitiesValue model. This duplicates an equivalent type and is a source-breaking change for module code that currently populates UserAssignedIdentitiesValue entries. Please keep the original model type (or introduce a backward-compatible shim) to avoid breaking existing callers and to prevent having two identical identity-value models in the SDK.
| /// dictionary key references will be ARM resource ids in the form: | ||
| /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | ||
| /// </param> | ||
| public GalleryIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue>)) | ||
| public GalleryIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue>)) | ||
|
|
There was a problem hiding this comment.
GalleryIdentity.UserAssignedIdentities was switched to CommonUserAssignedIdentitiesValue, while UserAssignedIdentitiesValue still exists and is used elsewhere in the module. This introduces duplicate equivalent models and breaks existing code that builds dictionaries of UserAssignedIdentitiesValue. Please keep the original type (or add a compatibility layer) so callers don't need a repo-wide refactor for an SDK regen.
| /// form: | ||
| /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. | ||
| /// </param> | ||
| public EncryptionSetIdentity(string type = default(string), string principalId = default(string), string tenantId = default(string), System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, UserAssignedIdentitiesValue>)) | ||
| public EncryptionSetIdentity(string type = default(string), string principalId = default(string), string tenantId = default(string), System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, CommonUserAssignedIdentitiesValue>)) | ||
|
|
There was a problem hiding this comment.
EncryptionSetIdentity.UserAssignedIdentities now uses CommonUserAssignedIdentitiesValue instead of UserAssignedIdentitiesValue. Since the module codebase constructs UserAssignedIdentitiesValue dictionaries today, this change will break compilation unless all call sites are updated. Please preserve the existing model type or add a backward-compatible bridge to avoid duplicating identity-value models and breaking callers.
| /// <param name='cancellationToken'> | ||
| /// The cancellation token. | ||
| /// </param> | ||
| public static async System.Threading.Tasks.Task DeallocateAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? hibernate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
| public static async System.Threading.Tasks.Task DeallocateAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? hibernate = default(bool?), bool? forceDeallocate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
| { | ||
| (await operations.DeallocateWithHttpMessagesAsync(resourceGroupName, vmName, hibernate, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
| (await operations.DeallocateWithHttpMessagesAsync(resourceGroupName, vmName, hibernate, forceDeallocate, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
| } |
There was a problem hiding this comment.
Adding the new optional parameter forceDeallocate before cancellationToken changes the positional argument order for the existing DeallocateAsync/BeginDeallocateAsync extension methods. Any caller passing a CancellationToken positionally (the common pattern for these generated extensions) will no longer compile. To preserve source compatibility, consider keeping the old overloads (hibernate, cancellationToken) and adding new overloads that include forceDeallocate, forwarding to the new core method.
| /// <param name='cancellationToken'> | ||
| /// The cancellation token. | ||
| /// </param> | ||
| public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<CapacityReservation>> ListByCapacityReservationGroupAsync(this ICapacityReservationsOperations operations, string resourceGroupName, string capacityReservationGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
| public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<CapacityReservation>> ListByCapacityReservationGroupAsync(this ICapacityReservationsOperations operations, string resourceGroupName, string capacityReservationGroupName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) | ||
| { | ||
| using (var _result = await operations.ListByCapacityReservationGroupWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, null, cancellationToken).ConfigureAwait(false)) | ||
| using (var _result = await operations.ListByCapacityReservationGroupWithHttpMessagesAsync(resourceGroupName, capacityReservationGroupName, expand, null, cancellationToken).ConfigureAwait(false)) | ||
| { |
There was a problem hiding this comment.
The new optional expand parameter was inserted before cancellationToken in the ListByCapacityReservationGroupAsync extension method. This breaks callers that previously passed a CancellationToken as the third positional argument. If this SDK is consumed by other projects, consider preserving the old overload (resourceGroupName, capacityReservationGroupName, cancellationToken) and adding a new overload that includes expand.
| ## Upcoming Release | ||
| * Added `-Feature` parameter to `Update-AzGalleryImageDefinition` cmdlet to allow updating existing gallery image features (such as DiskControllerTypes, SecurityType, IsAcceleratedNetwork, and IsHibernate). Each feature supports a `StartsAtVersion` property to specify the minimum gallery image version that supports the updated feature. | ||
| * Added `-AllowUpdateImage` parameter to `Update-AzGalleryImageDefinition` cmdlet. Must be set to true when using the `-Feature` parameter to update gallery image features. | ||
| * Compute ComputeRP related cmdlets will now use 2025-11-01 version of the ComputeRP API. |
There was a problem hiding this comment.
The changelog entry is not user-focused and has wording issues: it repeats "Compute" ("Compute ComputeRP"), uses the ComputeRP acronym without explanation, and uses future-ish phrasing ("will now use") instead of past tense under "Upcoming Release". Please rephrase to clearly describe the user impact and expand ComputeRP on first use (e.g., "Compute Resource Provider (ComputeRP)").
| op = this.VirtualMachineClient.BeginDeallocateWithHttpMessagesAsync(this.ResourceGroupName, this.Name, this.Hibernate, null, null, CancellationToken.None).GetAwaiter().GetResult(); | ||
| } | ||
| else | ||
| { | ||
| op = this.VirtualMachineClient.DeallocateWithHttpMessagesAsync(this.ResourceGroupName, this.Name, this.Hibernate, null, CancellationToken.None).GetAwaiter().GetResult(); | ||
| op = this.VirtualMachineClient.DeallocateWithHttpMessagesAsync(this.ResourceGroupName, this.Name, this.Hibernate, null, null, CancellationToken.None).GetAwaiter().GetResult(); | ||
| } |
There was a problem hiding this comment.
The new Stop-AzVM hibernate branch call now passes two positional nulls (for the new SDK parameter and customHeaders). This is hard to read and easy to break if the SDK signature changes again; prefer using named arguments (e.g., forceDeallocate: null, customHeaders: null) to make the intent unambiguous.
| ## Upcoming Release | ||
| * Added `-Feature` parameter to `Update-AzGalleryImageDefinition` cmdlet to allow updating existing gallery image features (such as DiskControllerTypes, SecurityType, IsAcceleratedNetwork, and IsHibernate). Each feature supports a `StartsAtVersion` property to specify the minimum gallery image version that supports the updated feature. | ||
| * Added `-AllowUpdateImage` parameter to `Update-AzGalleryImageDefinition` cmdlet. Must be set to true when using the `-Feature` parameter to update gallery image features. | ||
| * Compute ComputeRP related cmdlets will now use 2025-11-01 version of the ComputeRP API. |
There was a problem hiding this comment.
ChangeLog entry should be user-focused and written in past tense; the current line reads awkwardly ("Compute ComputeRP") and uses future/present phrasing ("will now"). Consider rewording to something like: "Updated Az.Compute cmdlets to use Compute Resource Provider (ComputeRP) API version 2025-11-01."
|
🔔 Routing this PR to @act-observability-squad. |
Description
This PR updates the Compute SDK to the ComputeRP 2025-11-01 version.
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.