Skip to content

[health-models] Mark all commands as preview and update entity command to be plural#10058

Merged
necusjz merged 4 commits into
Azure:mainfrom
abossard:health-models-preview
Jul 2, 2026
Merged

[health-models] Mark all commands as preview and update entity command to be plural#10058
necusjz merged 4 commits into
Azure:mainfrom
abossard:health-models-preview

Conversation

@abossard

@abossard abossard commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerate the health-models extension from the aaz command models (Azure Monitor Cloud Health, Microsoft.CloudHealth API 2026-05-01-preview) using aaz-dev-tools.

  • Mark all monitor health-models command groups and commands as preview (is_preview=True) to match the extension's preview status (azext.isPreview=true). This follows the existing convention for extensions that contribute preview commands under a shared root group (e.g. eventgrid).
  • Use plural entity command names (get-data-annotations, get-signal-recommendations) to match the REST API operations and the shipped command names; the generated class names are now consistent with the command names.
  • Refresh command-group help text and update command examples from the latest aaz models.

No user-facing command names change; only the [Preview] tag is added. Regenerated with aaz-dev-tools, not hand-edited.

Related command

az monitor health-models

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (azdev required; see .azure-pipelines/templates/azdev_setup.yml for the install command until azdev==0.2.11b1 is on PyPI)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.


Draft — remaining before ready for review: bump the extension version (setup.py 1.0.0b11.0.0b2) and add a matching HISTORY.rst entry (the version checkbox above is intentionally unchecked until then).

Also verified locally: azdev linter health-models (no violations), azdev scan (no secrets), and azdev test health-models (2 passed).

Signed-off-by: Andre Bossard <anbossar@microsoft.com>
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jul 1, 2026

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @abossard,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@abossard

abossard commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

AAZ Azure/aaz#1039

@abossard abossard changed the title {health-models} Mark commands as preview and sync entity command names [health-models] Mark commands as preview and sync entity command names Jul 1, 2026
@abossard abossard changed the title [health-models] Mark commands as preview and sync entity command names [health-models] Mark all commands as preview and update entity command to be plural Jul 1, 2026
@abossard abossard marked this pull request as ready for review July 1, 2026 18:15
Copilot AI review requested due to automatic review settings July 1, 2026 18:15

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 regenerates the health-models Azure CLI extension (AAZ-generated) to align with the Microsoft.CloudHealth 2026-05-01-preview API models, primarily by marking monitor health-models commands as preview and updating the generated help/examples and internal command class naming.

Changes:

  • Add is_preview=True across monitor health-models command groups/commands so help shows the [Preview] tag.
  • Rename entity “get-*” command classes/helpers to pluralized forms (GetDataAnnotations, GetSignalRecommendations) to match the shipped command names / REST operations.
  • Refresh help text and update command examples from the latest AAZ models.

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/health-models/azext_health_models/aaz/latest/monitor/__cmd_group.py Adds preview metadata at the monitor root group (this has broader impact than intended).
src/health-models/azext_health_models/aaz/latest/monitor/health_models/__cmd_group.py Marks monitor health-models group as preview and updates group help text.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/_update.py Marks command as preview and refreshes the example.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/authentication_setting/_update.py Marks command as preview and refreshes the example.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/discovery_rule/_update.py Marks command as preview and refreshes the example.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_add_data_annotation.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_data_annotations.py Marks command as preview and pluralizes generated class/helper exports.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_history.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_signal_history.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_get_signal_recommendations.py Marks command as preview and pluralizes generated class/helper exports.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_ingest_health_report.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/entity/_update.py Marks command as preview and refreshes the example.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/_assign.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/_remove.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/identity/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/relationship/_update.py Marks command as preview and refreshes the example.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/__cmd_group.py Marks subgroup as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_create.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_delete.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_list.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_show.py Marks command as preview.
src/health-models/azext_health_models/aaz/latest/monitor/health_models/signal_definition/_update.py Marks command as preview and refreshes the example.


:example: SignalDefinitions_CreateOrUpdate
az monitor health-models signal-definition update --resource-group rgopenapi --health-model-name myHealthModel --signal-definition-name sig1
az monitor health-models signal-definition update --resource-group rgopenapi --health-model-name myHealthModel --signal-definition-name sig1 --display-name cpu usage --refresh-interval PT1M --tags "{key4788:ixfvzsfnpvkkbrce}" --data-unit byte --evaluation-rules "{degraded-rule:{operator:GreaterThan,threshold:70},unhealthy-rule:{operator:Dynamic,sensitivity:Medium,lookBackWindow:PT1H}}"

:example: Relationships_CreateOrUpdate
az monitor health-models relationship update --resource-group rgopenapi --health-model-name model1 --relationship-name rel1
az monitor health-models relationship update --resource-group rgopenapi --health-model-name model1 --relationship-name rel1 --display-name My relationship --tags "{key9681:ixfvzsfnpvkkbrce}"
:example: HealthModels_Create
az monitor health-models update --resource-group rgopenapi --health-model-name model1
az monitor health-models update --resource-group rgopenapi --health-model-name model1 --type SystemAssigned, UserAssigned --user-assigned-identities "{/subscriptions/4980D7D5-4E07-47AD-AD34-E76C6BC9F061/resourceGroups/rgopenapi/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ua1:{}}" --tags "{key2961:hbljozzkqrpcthsjtfkyozpwyx}"

:example: Entities_CreateOrUpdate
az monitor health-models entity update --resource-group rgopenapi --health-model-name myHealthModel --entity-name uszrxbdkxesdrxhmagmzywebgbjj
az monitor health-models entity update --resource-group rgopenapi --health-model-name myHealthModel --entity-name uszrxbdkxesdrxhmagmzywebgbjj --display-name My entity --canvas-position "{x:14,y:13}" --icon "{icon-name:Custom,custom-data:rcitntvapruccrhtxmkqjphbxunkz}" --health-objective 62 --impact Standard --tags "{key1376:'sample tag'}" --signal-groups "{azure-resource:{authentication-setting:auth123,azure-resource-id:/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1,azure-resource-kind:functionapp,signals:[{signalKind:AzureResourceMetric,name:uniqueSignalName1,signal-definition-name:sigdef1,metric-namespace:microsoft.compute/virtualMachines,metric-name:cpuusage,aggregation-type:None,dimension-filter:'node eq '/node1'/',display-name:'CPU usage',refresh-interval:PT1M,time-grain:PT1M,data-unit:Count,evaluation-rules:{degradedRule:{operator:LowerThan,threshold:10},unhealthyRule:{operator:LowerThan,threshold:1}}}]},azure-log-analytics:{authentication-setting:auth123,log-analytics-workspace-resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace,signals:[{signalKind:LogAnalyticsQuery,name:uniqueSignalName2,signal-definition-name:null,evaluation-rules:{degradedRule:{operator:GreaterThan,threshold:1},unhealthyRule:{operator:GreaterThan,threshold:5}},refresh-interval:PT1M,query-text:'print 1',time-grain:PT30M,value-column-name:result,display-name:'Test LA signal',data-unit:'my unit'}]},azure-monitor-workspace:{authentication-setting:auth123,azure-monitor-workspace-resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace,signals:[{signalKind:PrometheusMetricsQuery,name:pod-cpu-usage,signal-definition-name:PodCpuUsageDefinition,display-name:'Pod CPU Usage',refresh-interval:PT1M,data-unit:Percent,query-text:\\'rate(container_cpu_usage_seconds_total{pod=~"my-app-.*"}[5m]) * 100\\',time-grain:PT5M,evaluation-rules:{degradedRule:{operator:GreaterThan,threshold:70},unhealthyRule:{operator:GreaterThan,threshold:90}}}]},dependencies:{aggregation-type:MinHealthy,unit:Percentage,degraded-threshold:80,unhealthy-threshold:50}}" --alerts "{unhealthy:{severity:Sev1,description:'Alert description',actionGroupIds:[/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup]},degraded:{severity:Sev4,description:'Alert description',actionGroupIds:[/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup]}}"
@yonzhan yonzhan requested a review from necusjz July 1, 2026 23:22
@yonzhan

yonzhan commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

health-models

Signed-off-by: Andre Bossard <anbossar@microsoft.com>
necusjz
necusjz previously approved these changes Jul 2, 2026
@abossard abossard marked this pull request as draft July 2, 2026 05:34
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
@abossard abossard marked this pull request as ready for review July 2, 2026 05:54
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
@necusjz necusjz merged commit d9529fa into Azure:main Jul 2, 2026
24 checks passed
@azclibot

azclibot commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ health-models-1.0.0b2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=170669312&view=results

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

Labels

Auto-Assign Auto assign by bot Event Grid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants