B
Beacon Globe News

azure.mgmt.alertsmanagement.operations module — Azure SDK for Python 2.0.0 documentation

Author

John Shaw

Published Feb 16, 2026

class azure.mgmt.alertsmanagement.operations.ActionRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

ActionRulesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_update(resource_group_name: str, action_rule_name: str, action_rule: ‘_models.ActionRule’, **kwargs: Any) → ’_models.ActionRule’[source]

Create/update an action rule.

Creates/Updates a specific action rule.

Parameters
  • resource_group_name (str) – Resource group name where the resource is created.

  • action_rule_name (str) – The name of action rule that needs to be created/updated.

  • action_rule (ActionRule) – action rule to be created/updated.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ActionRule, or the result of cls(response)

Return type

ActionRule

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, action_rule_name: str, **kwargs: Any)bool[source]

Delete action rule.

Deletes a given action rule.

Parameters
  • resource_group_name (str) – Resource group name where the resource is created.

  • action_rule_name (str) – The name that needs to be deleted.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

bool, or the result of cls(response)

Return type

bool

Raises

~azure.core.exceptions.HttpResponseError

get_by_name(resource_group_name: str, action_rule_name: str, **kwargs: Any) → ’_models.ActionRule’[source]

Get action rule by name.

Get a specific action rule.

Parameters
  • resource_group_name (str) – Resource group name where the resource is created.

  • action_rule_name (str) – The name of action rule that needs to be fetched.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ActionRule, or the result of cls(response)

Return type

ActionRule

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, target_resource_group: Optional[str] = None, target_resource_type: Optional[str] = None, target_resource: Optional[str] = None, severity: Optional[Union[str, ‘_models.Severity’]] = None, monitor_service: Optional[Union[str, ‘_models.MonitorService’]] = None, impacted_scope: Optional[str] = None, description: Optional[str] = None, alert_rule_id: Optional[str] = None, action_group: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.ActionRulesList’][source]

Get all action rules created in a resource group.

List all action rules of the subscription, created in given resource group and given input filters.

Parameters
  • resource_group_name (str) – Resource group name where the resource is created.

  • target_resource_group (str) – Filter by target resource group name. Default value is select all.

  • target_resource_type (str) – Filter by target resource type. Default value is select all.

  • target_resource (str) – Filter by target resource( which is full ARM ID) Default value is select all.

  • severity (str or Severity) – Filter by severity. Default value is select all.

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all.

  • impacted_scope (str) – filter by impacted/target scope (provide comma separated list for multiple scopes). The value should be an well constructed ARM id of the scope.

  • description (str) – filter by alert rule description.

  • alert_rule_id (str) – filter by alert rule id.

  • action_group (str) – filter by action group configured as part of action rule.

  • name (str) – filter by action rule name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ActionRulesList or the result of cls(response)

Return type

ItemPaged[ActionRulesList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_subscription(target_resource_group: Optional[str] = None, target_resource_type: Optional[str] = None, target_resource: Optional[str] = None, severity: Optional[Union[str, ‘_models.Severity’]] = None, monitor_service: Optional[Union[str, ‘_models.MonitorService’]] = None, impacted_scope: Optional[str] = None, description: Optional[str] = None, alert_rule_id: Optional[str] = None, action_group: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.ActionRulesList’][source]

Get all action rule in a given subscription.

List all action rules of the subscription and given input filters.

Parameters
  • target_resource_group (str) – Filter by target resource group name. Default value is select all.

  • target_resource_type (str) – Filter by target resource type. Default value is select all.

  • target_resource (str) – Filter by target resource( which is full ARM ID) Default value is select all.

  • severity (str or Severity) – Filter by severity. Default value is select all.

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all.

  • impacted_scope (str) – filter by impacted/target scope (provide comma separated list for multiple scopes). The value should be an well constructed ARM id of the scope.

  • description (str) – filter by alert rule description.

  • alert_rule_id (str) – filter by alert rule id.

  • action_group (str) – filter by action group configured as part of action rule.

  • name (str) – filter by action rule name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ActionRulesList or the result of cls(response)

Return type

ItemPaged[ActionRulesList]

Raises

~azure.core.exceptions.HttpResponseError

update(resource_group_name: str, action_rule_name: str, action_rule_patch: ‘_models.PatchObject’, **kwargs: Any) → ’_models.ActionRule’[source]

Patch action rule.

Update enabled flag and/or tags for the given action rule.

Parameters
  • resource_group_name (str) – Resource group name where the resource is created.

  • action_rule_name (str) – The name that needs to be updated.

  • action_rule_patch (PatchObject) – Parameters supplied to the operation.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ActionRule, or the result of cls(response)

Return type

ActionRule

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.alertsmanagement.models' from '/mnt/vss/_work/1/s/sdk/alertsmanagement/azure-mgmt-alertsmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/alertsmanagement/models/__init__.py'>
class azure.mgmt.alertsmanagement.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(**kwargs: Any) → Iterable[‘_models.OperationsList’][source]

List all operations available through Azure Alerts Management Resource Provider.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either OperationsList or the result of cls(response)

Return type

ItemPaged[OperationsList]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.alertsmanagement.models' from '/mnt/vss/_work/1/s/sdk/alertsmanagement/azure-mgmt-alertsmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/alertsmanagement/models/__init__.py'>
class azure.mgmt.alertsmanagement.operations.AlertsOperations(client, config, serializer, deserializer)[source]

Bases: object

AlertsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

change_state(alert_id: str, new_state: Union[str, ‘_models.AlertState’], **kwargs: Any) → ’_models.Alert’[source]

Change the state of an alert.

Parameters
  • alert_id (str) – Unique ID of an alert instance.

  • new_state (str or AlertState) – New state of the alert.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Alert, or the result of cls(response)

Return type

Alert

Raises

~azure.core.exceptions.HttpResponseError

get_all(target_resource: Optional[str] = None, target_resource_type: Optional[str] = None, target_resource_group: Optional[str] = None, monitor_service: Optional[Union[str, ‘_models.MonitorService’]] = None, monitor_condition: Optional[Union[str, ‘_models.MonitorCondition’]] = None, severity: Optional[Union[str, ‘_models.Severity’]] = None, alert_state: Optional[Union[str, ‘_models.AlertState’]] = None, alert_rule: Optional[str] = None, smart_group_id: Optional[str] = None, include_context: Optional[bool] = None, include_egress_config: Optional[bool] = None, page_count: Optional[int] = None, sort_by: Optional[Union[str, ‘_models.AlertsSortByFields’]] = None, sort_order: Optional[Union[str, ‘_models.Enum11’]] = None, select: Optional[str] = None, time_range: Optional[Union[str, ‘_models.TimeRange’]] = None, custom_time_range: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.AlertsList’][source]

List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime.

Parameters
  • target_resource (str) – Filter by target resource( which is full ARM ID) Default value is select all.

  • target_resource_type (str) – Filter by target resource type. Default value is select all.

  • target_resource_group (str) – Filter by target resource group name. Default value is select all.

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all.

  • severity (str or Severity) – Filter by severity. Default value is select all.

  • alert_state (str or AlertState) – Filter by state of the alert instance. Default value is to select all.

  • alert_rule (str) – Filter by specific alert rule. Default value is to select all.

  • smart_group_id (str) – Filter the alerts list by the Smart Group Id. Default value is none.

  • include_context (bool) – Include context which has contextual data specific to the monitor service. Default value is false’.

  • include_egress_config (bool) – Include egress config which would be used for displaying the content in portal. Default value is ‘false’.

  • page_count (int) – Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the “includeContent” filter is selected, maximum value allowed is 25. Default value is 25.

  • sort_by (str or AlertsSortByFields) – Sort the query results by input field, Default value is ‘lastModifiedDateTime’.

  • sort_order (str or Enum11) – Sort the query results order in either ascending or descending. Default value is ‘desc’ for time fields and ‘asc’ for others.

  • select (str) – This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day.

  • custom_time_range (str) – Filter by custom time range in the format <start-time>/<end-time> where time is in (ISO-8601 format)’. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either AlertsList or the result of cls(response)

Return type

ItemPaged[AlertsList]

Raises

~azure.core.exceptions.HttpResponseError

get_by_id(alert_id: str, **kwargs: Any) → ’_models.Alert’[source]

Get a specific alert.

Get information related to a specific alert.

Parameters

alert_id (str) – Unique ID of an alert instance.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Alert, or the result of cls(response)

Return type

Alert

Raises

~azure.core.exceptions.HttpResponseError

get_history(alert_id: str, **kwargs: Any) → ’_models.AlertModification’[source]

Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).

Parameters

alert_id (str) – Unique ID of an alert instance.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertModification, or the result of cls(response)

Return type

AlertModification

Raises

~azure.core.exceptions.HttpResponseError

get_summary(groupby: Union[str, ‘_models.AlertsSummaryGroupByFields’], include_smart_groups_count: Optional[bool] = None, target_resource: Optional[str] = None, target_resource_type: Optional[str] = None, target_resource_group: Optional[str] = None, monitor_service: Optional[Union[str, ‘_models.MonitorService’]] = None, monitor_condition: Optional[Union[str, ‘_models.MonitorCondition’]] = None, severity: Optional[Union[str, ‘_models.Severity’]] = None, alert_state: Optional[Union[str, ‘_models.AlertState’]] = None, alert_rule: Optional[str] = None, time_range: Optional[Union[str, ‘_models.TimeRange’]] = None, custom_time_range: Optional[str] = None, **kwargs: Any) → ’_models.AlertsSummary’[source]

Get a summarized count of your alerts grouped by various parameters (e.g. grouping by ‘Severity’ returns the count of alerts for each severity).

Parameters
  • groupby (str or AlertsSummaryGroupByFields) – This parameter allows the result set to be grouped by input fields (Maximum 2 comma separated fields supported). For example, groupby=severity or groupby=severity,alertstate.

  • include_smart_groups_count (bool) – Include count of the SmartGroups as part of the summary. Default value is ‘false’.

  • target_resource (str) – Filter by target resource( which is full ARM ID) Default value is select all.

  • target_resource_type (str) – Filter by target resource type. Default value is select all.

  • target_resource_group (str) – Filter by target resource group name. Default value is select all.

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all.

  • severity (str or Severity) – Filter by severity. Default value is select all.

  • alert_state (str or AlertState) – Filter by state of the alert instance. Default value is to select all.

  • alert_rule (str) – Filter by specific alert rule. Default value is to select all.

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day.

  • custom_time_range (str) – Filter by custom time range in the format <start-time>/<end-time> where time is in (ISO-8601 format)’. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertsSummary, or the result of cls(response)

Return type

AlertsSummary

Raises

~azure.core.exceptions.HttpResponseError

meta_data(identifier: Union[str, ‘_models.Identifier’], **kwargs: Any) → ’_models.AlertsMetaData’[source]

List alerts meta data information based on value of identifier parameter.

Parameters

identifier (str or Identifier) – Identification of the information to be retrieved by API call.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertsMetaData, or the result of cls(response)

Return type

AlertsMetaData

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.alertsmanagement.models' from '/mnt/vss/_work/1/s/sdk/alertsmanagement/azure-mgmt-alertsmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/alertsmanagement/models/__init__.py'>
class azure.mgmt.alertsmanagement.operations.SmartGroupsOperations(client, config, serializer, deserializer)[source]

Bases: object

SmartGroupsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

change_state(smart_group_id: str, new_state: Union[str, ‘_models.AlertState’], **kwargs: Any) → ’_models.SmartGroup’[source]

Change the state of a Smart Group.

Parameters
  • smart_group_id (str) – Smart group unique id.

  • new_state (str or AlertState) – New state of the alert.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SmartGroup, or the result of cls(response)

Return type

SmartGroup

Raises

~azure.core.exceptions.HttpResponseError

get_all(target_resource: Optional[str] = None, target_resource_group: Optional[str] = None, target_resource_type: Optional[str] = None, monitor_service: Optional[Union[str, ‘_models.MonitorService’]] = None, monitor_condition: Optional[Union[str, ‘_models.MonitorCondition’]] = None, severity: Optional[Union[str, ‘_models.Severity’]] = None, smart_group_state: Optional[Union[str, ‘_models.AlertState’]] = None, time_range: Optional[Union[str, ‘_models.TimeRange’]] = None, page_count: Optional[int] = None, sort_by: Optional[Union[str, ‘_models.SmartGroupsSortByFields’]] = None, sort_order: Optional[Union[str, ‘_models.Enum11’]] = None, **kwargs: Any) → Iterable[‘_models.SmartGroupsList’][source]

Get all Smart Groups within a specified subscription.

List all the Smart Groups within a specified subscription.

Parameters
  • target_resource (str) – Filter by target resource( which is full ARM ID) Default value is select all.

  • target_resource_group (str) – Filter by target resource group name. Default value is select all.

  • target_resource_type (str) – Filter by target resource type. Default value is select all.

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all.

  • severity (str or Severity) – Filter by severity. Default value is select all.

  • smart_group_state (str or AlertState) – Filter by state of the smart group. Default value is to select all.

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day.

  • page_count (int) – Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the “includeContent” filter is selected, maximum value allowed is 25. Default value is 25.

  • sort_by (str or SmartGroupsSortByFields) – Sort the query results by input field. Default value is sort by ‘lastModifiedDateTime’.

  • sort_order (str or Enum11) – Sort the query results order in either ascending or descending. Default value is ‘desc’ for time fields and ‘asc’ for others.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SmartGroupsList or the result of cls(response)

Return type

ItemPaged[SmartGroupsList]

Raises

~azure.core.exceptions.HttpResponseError

get_by_id(smart_group_id: str, **kwargs: Any) → ’_models.SmartGroup’[source]

Get information related to a specific Smart Group.

Get information related to a specific Smart Group.

Parameters

smart_group_id (str) – Smart group unique id.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SmartGroup, or the result of cls(response)

Return type

SmartGroup

Raises

~azure.core.exceptions.HttpResponseError

get_history(smart_group_id: str, **kwargs: Any) → ’_models.SmartGroupModification’[source]

Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .

Parameters

smart_group_id (str) – Smart group unique id.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

SmartGroupModification, or the result of cls(response)

Return type

SmartGroupModification

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.alertsmanagement.models' from '/mnt/vss/_work/1/s/sdk/alertsmanagement/azure-mgmt-alertsmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/alertsmanagement/models/__init__.py'>
class azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

SmartDetectorAlertRulesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_or_update(resource_group_name: str, alert_rule_name: str, parameters: ‘_models.AlertRule’, **kwargs: Any) → ’_models.AlertRule’[source]

Create or update a Smart Detector alert rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • alert_rule_name (str) – The name of the alert rule.

  • parameters (AlertRule) – Parameters supplied to the operation.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertRule, or the result of cls(response)

Return type

AlertRule

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, alert_rule_name: str, **kwargs: Any)None[source]

Delete an existing Smart Detector alert rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • alert_rule_name (str) – The name of the alert rule.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, alert_rule_name: str, expand_detector: Optional[bool] = None, **kwargs: Any) → ’_models.AlertRule’[source]

Get a specific Smart Detector alert rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • alert_rule_name (str) – The name of the alert rule.

  • expand_detector (bool) – Indicates if Smart Detector should be expanded.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertRule, or the result of cls(response)

Return type

AlertRule

Raises

~azure.core.exceptions.HttpResponseError

list(expand_detector: Optional[bool] = None, **kwargs: Any) → Iterable[‘_models.AlertRulesList’][source]

List all the existing Smart Detector alert rules within the subscription.

Parameters

expand_detector (bool) – Indicates if Smart Detector should be expanded.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either AlertRulesList or the result of cls(response)

Return type

ItemPaged[AlertRulesList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, expand_detector: Optional[bool] = None, **kwargs: Any) → Iterable[‘_models.AlertRulesList’][source]

List all the existing Smart Detector alert rules within the subscription and resource group.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • expand_detector (bool) – Indicates if Smart Detector should be expanded.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either AlertRulesList or the result of cls(response)

Return type

ItemPaged[AlertRulesList]

Raises

~azure.core.exceptions.HttpResponseError

patch(resource_group_name: str, alert_rule_name: str, parameters: ‘_models.AlertRulePatchObject’, **kwargs: Any) → ’_models.AlertRule’[source]

Patch a specific Smart Detector alert rule.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • alert_rule_name (str) – The name of the alert rule.

  • parameters (AlertRulePatchObject) – Parameters supplied to the operation.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

AlertRule, or the result of cls(response)

Return type

AlertRule

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.alertsmanagement.models' from '/mnt/vss/_work/1/s/sdk/alertsmanagement/azure-mgmt-alertsmanagement/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/alertsmanagement/models/__init__.py'>