Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ src/build
*.pubxml

# [begoldsm] ignore virtual env if it exists.
adlEnv/
adlEnv/

code_reports
3 changes: 3 additions & 0 deletions azure-mgmt-alertsmanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@


class Essentials(Model):
"""This object contains normalized fields across different monitor service and
also contains state related fields.
"""This object contains consistent fields across different monitor services.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar severity: Severity of alert Sev0 being highest and Sev3 being
:ivar severity: Severity of alert Sev0 being highest and Sev4 being
lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
:vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity
:ivar signal_type: Log based alert or metric based alert. Possible values
include: 'Metric', 'Log', 'Unknown'
:ivar signal_type: The type of signal the alert is based on, which could
be metrics, logs or activity logs. Possible values include: 'Metric',
'Log', 'Unknown'
:vartype signal_type: str or
~azure.mgmt.alertsmanagement.models.SignalType
:ivar alert_state: Alert object state, which is modified by the user.
:ivar alert_state: Alert object state, which can be modified by the user.
Possible values include: 'New', 'Acknowledged', 'Closed'
:vartype alert_state: str or
~azure.mgmt.alertsmanagement.models.AlertState
:ivar monitor_condition: Represents rule condition(Fired/Resolved)
maintained by monitor service depending on the state of the state.
Possible values include: 'Fired', 'Resolved'
:ivar monitor_condition: Can be 'Fired' or 'Resolved', which represents
whether the underlying conditions have crossed the defined alert rule
thresholds. Possible values include: 'Fired', 'Resolved'
:vartype monitor_condition: str or
~azure.mgmt.alertsmanagement.models.MonitorCondition
:param target_resource: Target ARM resource, on which alert got created.
Expand Down Expand Up @@ -73,7 +73,7 @@ class Essentials(Model):
:vartype last_modified_date_time: datetime
:ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format)
of alert instance. This will be updated when monitor service resolves the
alert instance because of the rule condition is not met.
alert instance because the rule condition is no longer met.
:vartype monitor_condition_resolved_date_time: datetime
:ivar last_modified_user_name: User who last modified the alert, in case
of monitor service updates user would be 'system', otherwise name of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@


class Essentials(Model):
"""This object contains normalized fields across different monitor service and
also contains state related fields.
"""This object contains consistent fields across different monitor services.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar severity: Severity of alert Sev0 being highest and Sev3 being
:ivar severity: Severity of alert Sev0 being highest and Sev4 being
lowest. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'
:vartype severity: str or ~azure.mgmt.alertsmanagement.models.Severity
:ivar signal_type: Log based alert or metric based alert. Possible values
include: 'Metric', 'Log', 'Unknown'
:ivar signal_type: The type of signal the alert is based on, which could
be metrics, logs or activity logs. Possible values include: 'Metric',
'Log', 'Unknown'
:vartype signal_type: str or
~azure.mgmt.alertsmanagement.models.SignalType
:ivar alert_state: Alert object state, which is modified by the user.
:ivar alert_state: Alert object state, which can be modified by the user.
Possible values include: 'New', 'Acknowledged', 'Closed'
:vartype alert_state: str or
~azure.mgmt.alertsmanagement.models.AlertState
:ivar monitor_condition: Represents rule condition(Fired/Resolved)
maintained by monitor service depending on the state of the state.
Possible values include: 'Fired', 'Resolved'
:ivar monitor_condition: Can be 'Fired' or 'Resolved', which represents
whether the underlying conditions have crossed the defined alert rule
thresholds. Possible values include: 'Fired', 'Resolved'
:vartype monitor_condition: str or
~azure.mgmt.alertsmanagement.models.MonitorCondition
:param target_resource: Target ARM resource, on which alert got created.
Expand Down Expand Up @@ -73,7 +73,7 @@ class Essentials(Model):
:vartype last_modified_date_time: datetime
:ivar monitor_condition_resolved_date_time: Resolved time(ISO-8601 format)
of alert instance. This will be updated when monitor service resolves the
alert instance because of the rule condition is not met.
alert instance because the rule condition is no longer met.
:vartype monitor_condition_resolved_date_time: datetime
:ivar last_modified_user_name: User who last modified the alert, in case
of monitor service updates user would be 'system', otherwise name of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def __init__(self, client, config, serializer, deserializer):

def get_all(
self, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, smart_group_id=None, include_context=None, include_egress_config=None, page_count=None, sort_by=None, sort_order=None, select=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config):
"""List all the existing alerts, where the results can be selective by
passing multiple filter parameters including time range and sorted on
specific fields. .
"""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. .

:param target_resource: Filter by target resource( which is full ARM
ID) Default value is select all.
Expand All @@ -51,18 +52,17 @@ def get_all(
:param target_resource_group: Filter by target resource group name.
Default value is select all.
:type target_resource_group: str
:param monitor_service: Filter by monitor service which is the source
of the alert instance. Default value is select all. Possible values
include: 'Application Insights', 'ActivityLog Administrative',
'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog
Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios',
'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights',
'Zabbix'
:param monitor_service: Filter by monitor service which generates the
alert instance. Default value is select all. Possible values include:
'Application Insights', 'ActivityLog Administrative', 'ActivityLog
Security', 'ActivityLog Recommendation', 'ActivityLog Policy',
'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform',
'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix'
:type monitor_service: str or
~azure.mgmt.alertsmanagement.models.MonitorService
:param monitor_condition: Filter by monitor condition which is the
state of the monitor(alertRule) at monitor service. Default value is
to select all. Possible values include: 'Fired', 'Resolved'
:param monitor_condition: Filter by monitor condition which is either
'Fired' or 'Resolved'. Default value is to select all. Possible values
include: 'Fired', 'Resolved'
:type monitor_condition: str or
~azure.mgmt.alertsmanagement.models.MonitorCondition
:param severity: Filter by severity. Defaut value is select all.
Expand All @@ -73,14 +73,14 @@ def get_all(
'Acknowledged', 'Closed'
:type alert_state: str or
~azure.mgmt.alertsmanagement.models.AlertState
:param alert_rule: Filter by alert rule(monitor) which fired alert
instance. Default value is to select all.
:param alert_rule: Filter by specific alert rule. Default value is to
select all.
:type alert_rule: str
:param smart_group_id: Filter the alerts list by the Smart Group Id.
Default value is none.
:type smart_group_id: str
:param include_context: Include context which has data contextual to
the monitor service. Default value is false'
:param include_context: Include context which has contextual data
specific to the monitor service. Default value is false'
:type include_context: bool
:param include_egress_config: Include egress config which would be
used for displaying the content in portal. Default value is 'false'.
Expand Down Expand Up @@ -272,7 +272,7 @@ def get_by_id(

def change_state(
self, alert_id, new_state, custom_headers=None, raw=False, **operation_config):
"""Change the state of the alert.
"""Change the state of an alert.

:param alert_id: Unique ID of an alert instance.
:type alert_id: str
Expand Down Expand Up @@ -334,7 +334,9 @@ def change_state(

def get_history(
self, alert_id, custom_headers=None, raw=False, **operation_config):
"""Get the history of the changes of an alert.
"""Get the history of an alert, which captures any monitor condition
changes (Fired/Resolved) and alert state changes
(New/Acknowledged/Closed).

:param alert_id: Unique ID of an alert instance.
:type alert_id: str
Expand Down Expand Up @@ -392,10 +394,12 @@ def get_history(

def get_summary(
self, groupby, include_smart_groups_count=None, target_resource=None, target_resource_type=None, target_resource_group=None, monitor_service=None, monitor_condition=None, severity=None, alert_state=None, alert_rule=None, time_range=None, custom_time_range=None, custom_headers=None, raw=False, **operation_config):
"""Summary of alerts with the count each severity.
"""Get a summarized count of your alerts grouped by various parameters
(e.g. grouping by 'Severity' returns the count of alerts for each
severity).

:param groupby: This parameter allows the result set to be aggregated
by input fields. For example, groupby=severity,alertstate. Possible
:param groupby: This parameter allows the result set to be grouped by
input fields. For example, groupby=severity,alertstate. Possible
values include: 'severity', 'alertState', 'monitorCondition',
'monitorService', 'signalType', 'alertRule'
:type groupby: str or
Expand All @@ -412,18 +416,17 @@ def get_summary(
:param target_resource_group: Filter by target resource group name.
Default value is select all.
:type target_resource_group: str
:param monitor_service: Filter by monitor service which is the source
of the alert instance. Default value is select all. Possible values
include: 'Application Insights', 'ActivityLog Administrative',
'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog
Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios',
'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights',
'Zabbix'
:param monitor_service: Filter by monitor service which generates the
alert instance. Default value is select all. Possible values include:
'Application Insights', 'ActivityLog Administrative', 'ActivityLog
Security', 'ActivityLog Recommendation', 'ActivityLog Policy',
'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform',
'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix'
:type monitor_service: str or
~azure.mgmt.alertsmanagement.models.MonitorService
:param monitor_condition: Filter by monitor condition which is the
state of the monitor(alertRule) at monitor service. Default value is
to select all. Possible values include: 'Fired', 'Resolved'
:param monitor_condition: Filter by monitor condition which is either
'Fired' or 'Resolved'. Default value is to select all. Possible values
include: 'Fired', 'Resolved'
:type monitor_condition: str or
~azure.mgmt.alertsmanagement.models.MonitorCondition
:param severity: Filter by severity. Defaut value is select all.
Expand All @@ -434,8 +437,8 @@ def get_summary(
'Acknowledged', 'Closed'
:type alert_state: str or
~azure.mgmt.alertsmanagement.models.AlertState
:param alert_rule: Filter by alert rule(monitor) which fired alert
instance. Default value is to select all.
:param alert_rule: Filter by specific alert rule. Default value is to
select all.
:type alert_rule: str
:param time_range: Filter by time range by below listed values.
Default value is 1 day. Possible values include: '1h', '1d', '7d',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def __init__(self, client, config, serializer, deserializer):

def get_all(
self, target_resource=None, target_resource_group=None, target_resource_type=None, monitor_service=None, monitor_condition=None, severity=None, smart_group_state=None, time_range=None, page_count=None, sort_by=None, sort_order=None, custom_headers=None, raw=False, **operation_config):
"""Get all smartGroups within the subscription.
"""Get all Smart Groups within a specified subscription.

List all the smartGroups within the specified subscription. .
List all the Smart Groups within a specified subscription. .

:param target_resource: Filter by target resource( which is full ARM
ID) Default value is select all.
Expand All @@ -51,18 +51,17 @@ def get_all(
:param target_resource_type: Filter by target resource type. Default
value is select all.
:type target_resource_type: str
:param monitor_service: Filter by monitor service which is the source
of the alert instance. Default value is select all. Possible values
include: 'Application Insights', 'ActivityLog Administrative',
'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog
Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios',
'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights',
'Zabbix'
:param monitor_service: Filter by monitor service which generates the
alert instance. Default value is select all. Possible values include:
'Application Insights', 'ActivityLog Administrative', 'ActivityLog
Security', 'ActivityLog Recommendation', 'ActivityLog Policy',
'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform',
'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix'
:type monitor_service: str or
~azure.mgmt.alertsmanagement.models.MonitorService
:param monitor_condition: Filter by monitor condition which is the
state of the monitor(alertRule) at monitor service. Default value is
to select all. Possible values include: 'Fired', 'Resolved'
:param monitor_condition: Filter by monitor condition which is either
'Fired' or 'Resolved'. Default value is to select all. Possible values
include: 'Fired', 'Resolved'
:type monitor_condition: str or
~azure.mgmt.alertsmanagement.models.MonitorCondition
:param severity: Filter by severity. Defaut value is select all.
Expand All @@ -82,7 +81,7 @@ def get_all(
"includeContent" filter is selected, maximum value allowed is 25.
Default value is 25.
:type page_count: int
:param sort_by: Sort the query results by input field Default value
:param sort_by: Sort the query results by input field. Default value
is sort by 'lastModifiedDateTime'. Possible values include:
'alertsCount', 'state', 'severity', 'startDateTime',
'lastModifiedDateTime'
Expand Down Expand Up @@ -167,9 +166,9 @@ def get_all(

def get_by_id(
self, smart_group_id, custom_headers=None, raw=False, **operation_config):
"""Get information of smart alerts group.
"""Get information related to a specific Smart Group.

Get details of smart group.
Get information related to a specific Smart Group.

:param smart_group_id: Smart group unique id.
:type smart_group_id: str
Expand Down Expand Up @@ -232,8 +231,7 @@ def get_by_id(

def change_state(
self, smart_group_id, new_state, custom_headers=None, raw=False, **operation_config):
"""Change the state from unresolved to resolved and all the alerts within
the smart group will also be resolved.
"""Change the state of a Smart Group.

:param smart_group_id: Smart group unique id.
:type smart_group_id: str
Expand Down Expand Up @@ -300,7 +298,8 @@ def change_state(

def get_history(
self, smart_group_id, custom_headers=None, raw=False, **operation_config):
"""Get the history of the changes of smart group.
"""Get the history a smart group, which captures any Smart Group state
changes (New/Acknowledged/Closed) .

:param smart_group_id: Smart group unique id.
:type smart_group_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.1.0"
VERSION = "2018-05-05"

9 changes: 9 additions & 0 deletions azure-mgmt-apimanagement/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
4 changes: 4 additions & 0 deletions azure-mgmt-apimanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

49 changes: 49 additions & 0 deletions azure-mgmt-apimanagement/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-apimanagement/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-apimanagement/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Loading