Skip to content

[Compute] Update SDK to ComputeRP 2025-11-01#29441

Merged
NoriZC merged 3 commits into
Azure:mainfrom
audreyttt:audreyttt/cplat-2025-11-01
Apr 24, 2026
Merged

[Compute] Update SDK to ComputeRP 2025-11-01#29441
NoriZC merged 3 commits into
Azure:mainfrom
audreyttt:audreyttt/cplat-2025-11-01

Conversation

@audreyttt

Copy link
Copy Markdown
Member

Description

This PR updates the Compute SDK to the ComputeRP 2025-11-01 version.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings April 22, 2026 21:47
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@audreyttt audreyttt changed the title Update SDK version [Compute] Update SDK to ComputeRP 2025-11-01 Apr 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.).

Comment on lines 31 to +36
- 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

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 42 to 47
/// <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:
/// &#39;/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}&#39;.
/// </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>))

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 44 to 48
/// form:
/// &#39;/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}&#39;.
/// </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>))

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 43 to 47
/// dictionary key references will be ARM resource ids in the form:
/// &#39;/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}&#39;.
/// </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>))

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 48 to 52
/// form:
/// &#39;/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}&#39;.
/// </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>))

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 579 to 585
/// <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();
}

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 60 to 66
/// <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))
{

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
## 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.

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)").

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 23, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 82 changed files in this pull request and generated 2 comments.

Comment on lines +142 to 147
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();
}

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
## 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.

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Copilot uses AI. Check for mistakes.
@VeryEarly VeryEarly self-assigned this Apr 24, 2026
@NoriZC NoriZC merged commit b43c4d7 into Azure:main Apr 24, 2026
17 checks passed
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @act-observability-squad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants