Azure / Azure/azure-cli

[Compute] Add VM extension image release metadata support

Open
#33,896 6 comments 0 reactions 1 assignee Claimed by @yanzhudd View on GitHub
act-observability-squad Auto-Assign Azure CLI Team Compute feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Preconditions

- [x] No need to upgrade the Python SDK or the Python SDK is ready.

The affected commands are generated with [CodeGen - AAZ](https://azure.github.io/aaz-dev-tools/), so a Python SDK upgrade is not required.

### Related command

```text
az vm extension image list-versions --location --publisher --name [--expand properties]
az vm extension image show --location --publisher --name --version
az vmss extension image list-versions --location --publisher --name [--expand properties]
az vmss extension image show --location --publisher --name --version
```

### Resource Provider

`Microsoft.Compute/locations/publishers/artifactTypes/vmExtension/types/versions`

### Description of Feature or Work Requested

Update the AAZ-generated VM and VMSS extension-image commands from API version `2024-11-01` to the stable `2026-04-01` API version.

The new API version adds read-only release and execution metadata to virtual machine extension images.

For the `list-versions` commands:

- Add an optional `--expand` argument.
- The supported value is `properties`.
- When `--expand properties` is provided, send `$expand=properties` to the service.
- Include these properties in each result:
- `releaseCategory`
- `urgencyLevel`
- `runProfile`

For the `show` commands, include these additional properties in the response:

- `releaseNotes`
- `releaseCategory`
- `urgencyLevel`
- `runProfile`
- `extensionFeatureMetadata.extensionFeatureTags`
- `key`
- `value`

This enables customers and automation to identify security fixes, urgent updates, execution behavior, release notes, and extension capability or compliance metadata.

Expected usage:

```azurecli
# List versions with expanded release metadata.
az vm extension image list-versions \
--location eastus \
--publisher Microsoft.Compute \
--name CustomScriptExtension \
--expand properties \
--query "[].{version:name, category:releaseCategory, urgency:urgencyLevel, profile:runProfile}" \
--output table

# Select an emergency security update.
version=$(az vm extension image list-versions \
--location eastus \
--publisher Microsoft.Compute \
--name CustomScriptExtension \
--expand properties \
--query "[?releaseCategory=='SecurityFix' && urgencyLevel=='Emergency'].name | [0]" \
--output tsv)

# Retrieve complete metadata for the selected version.
az vm extension image show \
--location eastus \
--publisher Microsoft.Compute \
--name CustomScriptExtension \
--version "$version" \
--query "{version:name, releaseNotes:releaseNotes, category:releaseCategory, urgency:urgencyLevel, profile:runProfile, featureMetadata:extensionFeatureMetadata}"
```

The existing behavior and output remain compatible when `--expand` is not provided. No feature registration, subscription allowlist, or feature flag is required. The API is a stable General Availability API.

### Minimum API Version Required

`2026-04-01`

### Swagger PR link / SDK link

- REST API specification PR: https://github.com/Azure/azure-rest-api-specs/pull/42856
- Stable OpenAPI specification: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-04-01/ComputeRP.json

### Request Example

- List versions with `$expand=properties`: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-04-01/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListVersions_WithExpandProperties_Gen.json
- Get a specific extension image with complete metadata: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-04-01/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_Get_MaximumSet_Gen.json

Example list request:

```http
GET /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifactTypes/VMExtension/types/{type}/versions?$expand=properties&api-version=2026-04-01
```

Example expanded list response:

```json
[
{
"name": "1.10.15",
"properties": {
"releaseCategory": "SecurityFix",
"urgencyLevel": "Emergency",
"runProfile": "LongRunning"
}
}
]
```

### Target Date

09/15/2026

### PM Contact

Gabby.Staskiewicz@microsoft.com

### Engineer Contact

@nidhjain-ms1, nidhjain@microsoft.com

### Additional context

- The corresponding Azure PowerShell design-review request is Azure/azure-powershell-cmdlet-review-pr#1571.
- The REST API specification PR is merged.
- Existing Azure CLI commands are generated with AAZ and currently use API version `2024-11-01`.
- This request changes existing commands only; no new command group is required.
- `--expand` applies only to `list-versions`. The `show` operation returns the complete metadata for a specific version without an expand argument.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.