Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/health-models/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b2
++++++
* Mark the ``az monitor health-models`` command group and all of its commands as preview (``[Preview]``), matching the extension's preview status.

1.0.0b1
++++++
* Initial preview release. Supports the ``Microsoft.CloudHealth`` resource provider at API version ``2026-05-01-preview``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
Comment thread
abossard marked this conversation as resolved.
"""Manage the Azure Monitor Service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

@register_command_group(
"monitor health-models",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Healthmodel
"""Manage Azure Monitor health models.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a HealthModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models list",
is_preview=True,
)
class List(AAZCommand):
"""List HealthModel resources by subscription ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a HealthModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

@register_command(
"monitor health-models update",
is_preview=True,
)
class Update(AAZCommand):
"""Update a HealthModel

: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}"
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor health-models authentication-setting",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Authenticationsetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models authentication-setting create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a AuthenticationSetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models authentication-setting delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models authentication-setting list",
is_preview=True,
)
class List(AAZCommand):
"""List AuthenticationSetting resources by HealthModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models authentication-setting show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a AuthenticationSetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

@register_command(
"monitor health-models authentication-setting update",
is_preview=True,
)
class Update(AAZCommand):
"""Update a AuthenticationSetting

:example: AuthenticationSettings_CreateOrUpdate
az monitor health-models authentication-setting update --resource-group myResourceGroup --health-model-name myHealthModel --authentication-setting-name myAuthSetting
az monitor health-models authentication-setting update --resource-group myResourceGroup --health-model-name myHealthModel --authentication-setting-name myAuthSetting --display-name myDisplayName
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor health-models discovery-rule",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Discoveryrule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models discovery-rule create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a DiscoveryRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models discovery-rule delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models discovery-rule list",
is_preview=True,
)
class List(AAZCommand):
"""List DiscoveryRule resources by HealthModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models discovery-rule show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a DiscoveryRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

@register_command(
"monitor health-models discovery-rule update",
is_preview=True,
)
class Update(AAZCommand):
"""Update a DiscoveryRule

:example: DiscoveryRules_CreateOrUpdate
az monitor health-models discovery-rule update --resource-group myResourceGroup --health-model-name myHealthModel --discovery-rule-name myDiscoveryRule
az monitor health-models discovery-rule update --resource-group myResourceGroup --health-model-name myHealthModel --discovery-rule-name myDiscoveryRule --authentication-setting authSetting1 --display-name myDisplayName --discover-relationships Enabled --add-recommended-signals Enabled --specification "{kind:ResourceGraphQuery,resourceGraphQuery:'resources | where subscriptionId == '/7ddfffd7-9b32-40df-1234-828cbd55d6f4'/ | where resourceGroup == '/my-rg'/'}" --add-resource-health-signal Enabled
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor health-models entity",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity add-data-annotation",
is_preview=True,
)
class AddDataAnnotation(AAZCommand):
"""Add a data annotation to an entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

@register_command(
"monitor health-models entity get-data-annotations",
is_preview=True,
)
class GetDataAnnotation(AAZCommand):
class GetDataAnnotations(AAZCommand):
"""Retrieve data annotations for an entity

:example: Entities_GetDataAnnotations
Expand Down Expand Up @@ -259,8 +260,8 @@ def _build_schema_on_200(cls):
return cls._schema_on_200


class _GetDataAnnotationHelper:
"""Helper class for GetDataAnnotation"""
class _GetDataAnnotationsHelper:
"""Helper class for GetDataAnnotations"""


__all__ = ["GetDataAnnotation"]
__all__ = ["GetDataAnnotations"]
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity get-history",
is_preview=True,
)
class GetHistory(AAZCommand):
"""Retrieve the health state transition history for an entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity get-signal-history",
is_preview=True,
)
class GetSignalHistory(AAZCommand):
"""Retrieve the time series history for a signal on an entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

@register_command(
"monitor health-models entity get-signal-recommendations",
is_preview=True,
)
class GetSignalRecommendation(AAZCommand):
class GetSignalRecommendations(AAZCommand):
"""Get recommended signal configurations for a given Entity (only applicable for Entities representing Azure resources)

:example: Entities_GetSignalRecommendations
Expand Down Expand Up @@ -180,17 +181,17 @@ def _build_schema_on_200(cls):

recommended_configurations = cls._schema_on_200.recommended_configurations
recommended_configurations.Element = AAZObjectType()
_GetSignalRecommendationHelper._build_schema_signal_configuration_read(recommended_configurations.Element)
_GetSignalRecommendationsHelper._build_schema_signal_configuration_read(recommended_configurations.Element)

recommended_signals = cls._schema_on_200.recommended_signals
recommended_signals.Element = AAZObjectType()
_GetSignalRecommendationHelper._build_schema_signal_configuration_read(recommended_signals.Element)
_GetSignalRecommendationsHelper._build_schema_signal_configuration_read(recommended_signals.Element)

return cls._schema_on_200


class _GetSignalRecommendationHelper:
"""Helper class for GetSignalRecommendation"""
class _GetSignalRecommendationsHelper:
"""Helper class for GetSignalRecommendations"""

_schema_signal_configuration_read = None

Expand Down Expand Up @@ -283,4 +284,4 @@ def _build_schema_threshold_rule_v2_read(cls, _schema):
_schema.threshold = cls._schema_threshold_rule_v2_read.threshold


__all__ = ["GetSignalRecommendation"]
__all__ = ["GetSignalRecommendations"]
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity ingest-health-report",
is_preview=True,
)
class IngestHealthReport(AAZCommand):
"""Ingest a health report for a specific signal on an entity (the entity must already exist)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity list",
is_preview=True,
)
class List(AAZCommand):
"""List Entity resources by HealthModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models entity show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

@register_command(
"monitor health-models entity update",
is_preview=True,
)
class Update(AAZCommand):
"""Update a Entity

: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]}}"
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor health-models identity",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models identity assign",
is_preview=True,
)
class Assign(AAZCommand):
"""Assign the user or system managed identities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models identity remove",
is_preview=True,
)
class Remove(AAZCommand):
"""Remove the user or system managed identities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models identity show",
is_preview=True,
)
class Show(AAZCommand):
"""Show the details of managed identities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"monitor health-models relationship",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Relationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models relationship create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a Relationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"monitor health-models relationship delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Loading
Loading