[health-models] Mark all commands as preview and update entity command to be plural#10058
Conversation
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @abossard, |
|
AAZ Azure/aaz#1039 |
There was a problem hiding this comment.
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=Trueacrossmonitor health-modelscommand 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
updatecommand 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]}}" |
|
health-models |
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
|
[Release] Update index.json for extension [ health-models-1.0.0b2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=170669312&view=results |
Summary
Regenerate the
health-modelsextension from theaazcommand models (Azure Monitor Cloud Health,Microsoft.CloudHealthAPI2026-05-01-preview) usingaaz-dev-tools.monitor health-modelscommand 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).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.updatecommand examples from the latestaazmodels.No user-facing command names change; only the
[Preview]tag is added. Regenerated withaaz-dev-tools, not hand-edited.Related command
az monitor health-modelsGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (azdevrequired; see.azure-pipelines/templates/azdev_setup.ymlfor the install command untilazdev==0.2.11b1is on PyPI)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.jsonautomatically.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.Also verified locally:
azdev linter health-models(no violations),azdev scan(no secrets), andazdev test health-models(2 passed).