azure.mgmt.alertsmanagement.operations module

class azure.mgmt.alertsmanagement.operations.AlertProcessingRulesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through AlertsManagementClient’s alert_processing_rules attribute.

create_or_update(resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule: _models.AlertProcessingRule, *, content_type: str = "'application/json'", **kwargs: Any)_models.AlertProcessingRule[source]
create_or_update(resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.AlertProcessingRule

Create or update an alert processing rule.

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

  • alert_processing_rule_name (str) – The name of the alert processing rule that needs to be created/updated. Required.

  • alert_processing_rule (AlertProcessingRule or IO) – Alert processing rule to be created/updated. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

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

Returns

AlertProcessingRule or the result of cls(response)

Return type

AlertProcessingRule

Raises

HttpResponseError

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

Delete an alert processing rule.

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

  • alert_processing_rule_name (str) – The name of the alert processing rule that needs to be deleted. Required.

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

HttpResponseError

get_by_name(resource_group_name: str, alert_processing_rule_name: str, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.AlertProcessingRule[source]

Get an alert processing rule by name.

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

  • alert_processing_rule_name (str) – The name of the alert processing rule that needs to be fetched. Required.

Keyword Arguments

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

Returns

AlertProcessingRule or the result of cls(response)

Return type

AlertProcessingRule

Raises

HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.alertsmanagement.models._models_py3.AlertProcessingRule][source]

List all alert processing rules in a resource group.

Parameters

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

Keyword Arguments

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

Returns

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

Return type

ItemPaged[AlertProcessingRule]

Raises

HttpResponseError

list_by_subscription(**kwargs: Any)Iterable[azure.mgmt.alertsmanagement.models._models_py3.AlertProcessingRule][source]

List all alert processing rules in a subscription.

Keyword Arguments

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

Returns

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

Return type

ItemPaged[AlertProcessingRule]

Raises

HttpResponseError

update(resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule_patch: _models.PatchObject, *, content_type: str = "'application/json'", **kwargs: Any)_models.AlertProcessingRule[source]
update(resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule_patch: IO, *, content_type: str = "'application/json'", **kwargs: Any)_models.AlertProcessingRule

Enable, disable, or update tags for an alert processing rule.

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

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

  • alert_processing_rule_patch (PatchObject or IO) – Parameters supplied to the operation. Is either a model type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

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

Returns

AlertProcessingRule or the result of cls(response)

Return type

AlertProcessingRule

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through AlertsManagementClient’s alerts attribute.

change_state(alert_id: str, new_state: Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState], comment: Optional[str] = None, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.Alert[source]

Change the state of an alert.

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

  • new_state (str or AlertState) – New state of the alert. Known values are: “New”, “Acknowledged”, and “Closed”. Required.

  • comment (str) – reason of change alert state. Default value is None.

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

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, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorService]] = None, monitor_condition: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorCondition]] = None, severity: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Severity]] = None, alert_state: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.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, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertsSortByFields]] = None, sort_order: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.SortOrder]] = None, select: Optional[str] = None, time_range: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.TimeRange]] = None, custom_time_range: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.alertsmanagement.models._models_py3.Alert][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. Default value is None.

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

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

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all. Known values are: “Application Insights”, “ActivityLog Administrative”, “ActivityLog Security”, “ActivityLog Recommendation”, “ActivityLog Policy”, “ActivityLog Autoscale”, “Log Analytics”, “Nagios”, “Platform”, “SCOM”, “ServiceHealth”, “SmartDetector”, “VM Insights”, and “Zabbix”. Default value is None.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all. Known values are: “Fired” and “Resolved”. Default value is None.

  • severity (str or Severity) – Filter by severity. Default value is select all. Known values are: “Sev0”, “Sev1”, “Sev2”, “Sev3”, and “Sev4”. Default value is None.

  • alert_state (str or AlertState) – Filter by state of the alert instance. Default value is to select all. Known values are: “New”, “Acknowledged”, and “Closed”. Default value is None.

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

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

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

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

  • 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. Default value is None.

  • sort_by (str or AlertsSortByFields) – Sort the query results by input field, Default value is ‘lastModifiedDateTime’. Known values are: “name”, “severity”, “alertState”, “monitorCondition”, “targetResource”, “targetResourceName”, “targetResourceGroup”, “targetResourceType”, “startDateTime”, and “lastModifiedDateTime”. Default value is None.

  • sort_order (str or SortOrder) – Sort the query results order in either ascending or descending. Default value is ‘desc’ for time fields and ‘asc’ for others. Known values are: “asc” and “desc”. Default value is None.

  • 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. Default value is None.

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day. Known values are: “1h”, “1d”, “7d”, and “30d”. Default value is None.

  • 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. Default value 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 Alert or the result of cls(response)

Return type

ItemPaged[Alert]

Raises

HttpResponseError

get_by_id(alert_id: str, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.Alert[source]

Get a specific alert.

Get information related to a specific alert.

Parameters

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

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

HttpResponseError

get_history(alert_id: str, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.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. Required.

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

HttpResponseError

get_summary(groupby: Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.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, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorService]] = None, monitor_condition: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorCondition]] = None, severity: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Severity]] = None, alert_state: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState]] = None, alert_rule: Optional[str] = None, time_range: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.TimeRange]] = None, custom_time_range: Optional[str] = None, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.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. Known values are: “severity”, “alertState”, “monitorCondition”, “monitorService”, “signalType”, and “alertRule”. Required.

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

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

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

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

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all. Known values are: “Application Insights”, “ActivityLog Administrative”, “ActivityLog Security”, “ActivityLog Recommendation”, “ActivityLog Policy”, “ActivityLog Autoscale”, “Log Analytics”, “Nagios”, “Platform”, “SCOM”, “ServiceHealth”, “SmartDetector”, “VM Insights”, and “Zabbix”. Default value is None.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all. Known values are: “Fired” and “Resolved”. Default value is None.

  • severity (str or Severity) – Filter by severity. Default value is select all. Known values are: “Sev0”, “Sev1”, “Sev2”, “Sev3”, and “Sev4”. Default value is None.

  • alert_state (str or AlertState) – Filter by state of the alert instance. Default value is to select all. Known values are: “New”, “Acknowledged”, and “Closed”. Default value is None.

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

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day. Known values are: “1h”, “1d”, “7d”, and “30d”. Default value is None.

  • 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. Default value 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

HttpResponseError

meta_data(identifier: Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Identifier], **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.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. “MonitorServiceList” Required.

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

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through AlertsManagementClient’s operations attribute.

list(**kwargs: Any)Iterable[azure.mgmt.alertsmanagement.models._models_py3.Operation][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 Operation or the result of cls(response)

Return type

ItemPaged[Operation]

Raises

HttpResponseError

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

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through AlertsManagementClient’s smart_groups attribute.

change_state(smart_group_id: str, new_state: Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState], **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.SmartGroup[source]

Change the state of a Smart Group.

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

  • new_state (str or AlertState) – New state of the alert. Known values are: “New”, “Acknowledged”, and “Closed”. Required.

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

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, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorService]] = None, monitor_condition: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorCondition]] = None, severity: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Severity]] = None, smart_group_state: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState]] = None, time_range: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.TimeRange]] = None, page_count: Optional[int] = None, sort_by: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.SmartGroupsSortByFields]] = None, sort_order: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.SortOrder]] = None, **kwargs: Any)Iterable[azure.mgmt.alertsmanagement.models._models_py3.SmartGroup][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. Default value is None.

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

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

  • monitor_service (str or MonitorService) – Filter by monitor service which generates the alert instance. Default value is select all. Known values are: “Application Insights”, “ActivityLog Administrative”, “ActivityLog Security”, “ActivityLog Recommendation”, “ActivityLog Policy”, “ActivityLog Autoscale”, “Log Analytics”, “Nagios”, “Platform”, “SCOM”, “ServiceHealth”, “SmartDetector”, “VM Insights”, and “Zabbix”. Default value is None.

  • monitor_condition (str or MonitorCondition) – Filter by monitor condition which is either ‘Fired’ or ‘Resolved’. Default value is to select all. Known values are: “Fired” and “Resolved”. Default value is None.

  • severity (str or Severity) – Filter by severity. Default value is select all. Known values are: “Sev0”, “Sev1”, “Sev2”, “Sev3”, and “Sev4”. Default value is None.

  • smart_group_state (str or AlertState) – Filter by state of the smart group. Default value is to select all. Known values are: “New”, “Acknowledged”, and “Closed”. Default value is None.

  • time_range (str or TimeRange) – Filter by time range by below listed values. Default value is 1 day. Known values are: “1h”, “1d”, “7d”, and “30d”. Default value is None.

  • 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. Default value is None.

  • sort_by (str or SmartGroupsSortByFields) – Sort the query results by input field. Default value is sort by ‘lastModifiedDateTime’. Known values are: “alertsCount”, “state”, “severity”, “startDateTime”, and “lastModifiedDateTime”. Default value is None.

  • sort_order (str or SortOrder) – Sort the query results order in either ascending or descending. Default value is ‘desc’ for time fields and ‘asc’ for others. Known values are: “asc” and “desc”. Default value 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 SmartGroup or the result of cls(response)

Return type

ItemPaged[SmartGroup]

Raises

HttpResponseError

get_by_id(smart_group_id: str, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.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. Required.

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

HttpResponseError

get_history(smart_group_id: str, **kwargs: Any)azure.mgmt.alertsmanagement.models._models_py3.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. Required.

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

HttpResponseError

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