Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from .autoscale_setting_resource import AutoscaleSettingResource
from .autoscale_setting_resource_patch import AutoscaleSettingResourcePatch
from .error_response import ErrorResponse, ErrorResponseException
from .incident import Incident
from .rule_data_source import RuleDataSource
from .rule_condition import RuleCondition
from .rule_metric_data_source import RuleMetricDataSource
Expand All @@ -38,13 +39,6 @@
from .rule_webhook_action import RuleWebhookAction
from .alert_rule_resource import AlertRuleResource
from .alert_rule_resource_patch import AlertRuleResourcePatch
from .incident import Incident
from .activity_log_alert_leaf_condition import ActivityLogAlertLeafCondition
from .activity_log_alert_all_of_condition import ActivityLogAlertAllOfCondition
from .activity_log_alert_action_group import ActivityLogAlertActionGroup
from .activity_log_alert_action_list import ActivityLogAlertActionList
from .activity_log_alert_resource import ActivityLogAlertResource
from .activity_log_alert_patch_body import ActivityLogAlertPatchBody
from .retention_policy import RetentionPolicy
from .log_profile_resource import LogProfileResource
from .log_profile_resource_patch import LogProfileResourcePatch
Expand All @@ -57,12 +51,18 @@
from .webhook_receiver import WebhookReceiver
from .action_group_resource import ActionGroupResource
from .enable_request import EnableRequest
from .activity_log_alert_leaf_condition import ActivityLogAlertLeafCondition
from .activity_log_alert_all_of_condition import ActivityLogAlertAllOfCondition
from .activity_log_alert_action_group import ActivityLogAlertActionGroup
from .activity_log_alert_action_list import ActivityLogAlertActionList
from .activity_log_alert_resource import ActivityLogAlertResource
from .activity_log_alert_patch_body import ActivityLogAlertPatchBody
from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged
from .alert_rule_resource_paged import AlertRuleResourcePaged
from .incident_paged import IncidentPaged
from .activity_log_alert_resource_paged import ActivityLogAlertResourcePaged
from .alert_rule_resource_paged import AlertRuleResourcePaged
from .log_profile_resource_paged import LogProfileResourcePaged
from .action_group_resource_paged import ActionGroupResourcePaged
from .activity_log_alert_resource_paged import ActivityLogAlertResourcePaged
from .monitor_management_client_enums import (
MetricStatisticType,
TimeAggregationType,
Expand Down Expand Up @@ -91,6 +91,7 @@
'AutoscaleSettingResource',
'AutoscaleSettingResourcePatch',
'ErrorResponse', 'ErrorResponseException',
'Incident',
'RuleDataSource',
'RuleCondition',
'RuleMetricDataSource',
Expand All @@ -105,13 +106,6 @@
'RuleWebhookAction',
'AlertRuleResource',
'AlertRuleResourcePatch',
'Incident',
'ActivityLogAlertLeafCondition',
'ActivityLogAlertAllOfCondition',
'ActivityLogAlertActionGroup',
'ActivityLogAlertActionList',
'ActivityLogAlertResource',
'ActivityLogAlertPatchBody',
'RetentionPolicy',
'LogProfileResource',
'LogProfileResourcePatch',
Expand All @@ -124,12 +118,18 @@
'WebhookReceiver',
'ActionGroupResource',
'EnableRequest',
'ActivityLogAlertLeafCondition',
'ActivityLogAlertAllOfCondition',
'ActivityLogAlertActionGroup',
'ActivityLogAlertActionList',
'ActivityLogAlertResource',
'ActivityLogAlertPatchBody',
'AutoscaleSettingResourcePaged',
'AlertRuleResourcePaged',
'IncidentPaged',
'ActivityLogAlertResourcePaged',
'AlertRuleResourcePaged',
'LogProfileResourcePaged',
'ActionGroupResourcePaged',
'ActivityLogAlertResourcePaged',
'MetricStatisticType',
'TimeAggregationType',
'ComparisonOperationType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ActionGroupResourcePaged(Paged):
"""
A paging container for iterating over a list of ActionGroupResource object
A paging container for iterating over a list of :class:`ActionGroupResource <azure.mgmt.monitor.models.ActionGroupResource>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ActivityLogAlertResourcePaged(Paged):
"""
A paging container for iterating over a list of ActivityLogAlertResource object
A paging container for iterating over a list of :class:`ActivityLogAlertResource <azure.mgmt.monitor.models.ActivityLogAlertResource>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class AlertRuleResourcePaged(Paged):
"""
A paging container for iterating over a list of AlertRuleResource object
A paging container for iterating over a list of :class:`AlertRuleResource <azure.mgmt.monitor.models.AlertRuleResource>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class AutoscaleSettingResourcePaged(Paged):
"""
A paging container for iterating over a list of AutoscaleSettingResource object
A paging container for iterating over a list of :class:`AutoscaleSettingResource <azure.mgmt.monitor.models.AutoscaleSettingResource>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class EmailReceiver(Model):
:type name: str
:param email_address: The email address of this receiver.
:type email_address: str
:ivar status: Possible values include: 'NotSpecified', 'Enabled',
'Disabled'
:ivar status: The receiver status of the e-mail. Possible values include:
'NotSpecified', 'Enabled', 'Disabled'
:vartype status: str or :class:`ReceiverStatus
<azure.mgmt.monitor.models.ReceiverStatus>`
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class IncidentPaged(Paged):
"""
A paging container for iterating over a list of Incident object
A paging container for iterating over a list of :class:`Incident <azure.mgmt.monitor.models.Incident>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class LogProfileResourcePaged(Paged):
"""
A paging container for iterating over a list of LogProfileResource object
A paging container for iterating over a list of :class:`LogProfileResource <azure.mgmt.monitor.models.LogProfileResource>` object
"""

_attribute_map = {
Expand Down
4 changes: 2 additions & 2 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class SmsReceiver(Model):
:type country_code: str
:param phone_number: The phone number of the SMS receiver.
:type phone_number: str
:ivar status: Possible values include: 'NotSpecified', 'Enabled',
'Disabled'
:ivar status: The status of the receiver. Possible values include:
'NotSpecified', 'Enabled', 'Disabled'
:vartype status: str or :class:`ReceiverStatus
<azure.mgmt.monitor.models.ReceiverStatus>`
"""
Expand Down
20 changes: 10 additions & 10 deletions azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.autoscale_settings_operations import AutoscaleSettingsOperations
from .operations.alert_rules_operations import AlertRulesOperations
from .operations.alert_rule_incidents_operations import AlertRuleIncidentsOperations
from .operations.activity_log_alerts_operations import ActivityLogAlertsOperations
from .operations.alert_rules_operations import AlertRulesOperations
from .operations.log_profiles_operations import LogProfilesOperations
from .operations.service_diagnostic_settings_operations import ServiceDiagnosticSettingsOperations
from .operations.action_groups_operations import ActionGroupsOperations
from .operations.activity_log_alerts_operations import ActivityLogAlertsOperations
from . import models


Expand Down Expand Up @@ -58,25 +58,25 @@ def __init__(


class MonitorManagementClient(object):
"""Composite Swagger for Monitor Management Client
"""Monitor Management Client

:ivar config: Configuration for client.
:vartype config: MonitorManagementClientConfiguration

:ivar autoscale_settings: AutoscaleSettings operations
:vartype autoscale_settings: azure.mgmt.monitor.operations.AutoscaleSettingsOperations
:ivar alert_rules: AlertRules operations
:vartype alert_rules: azure.mgmt.monitor.operations.AlertRulesOperations
:ivar alert_rule_incidents: AlertRuleIncidents operations
:vartype alert_rule_incidents: azure.mgmt.monitor.operations.AlertRuleIncidentsOperations
:ivar activity_log_alerts: ActivityLogAlerts operations
:vartype activity_log_alerts: azure.mgmt.monitor.operations.ActivityLogAlertsOperations
:ivar alert_rules: AlertRules operations
:vartype alert_rules: azure.mgmt.monitor.operations.AlertRulesOperations
:ivar log_profiles: LogProfiles operations
:vartype log_profiles: azure.mgmt.monitor.operations.LogProfilesOperations
:ivar service_diagnostic_settings: ServiceDiagnosticSettings operations
:vartype service_diagnostic_settings: azure.mgmt.monitor.operations.ServiceDiagnosticSettingsOperations
:ivar action_groups: ActionGroups operations
:vartype action_groups: azure.mgmt.monitor.operations.ActionGroupsOperations
:ivar activity_log_alerts: ActivityLogAlerts operations
:vartype activity_log_alerts: azure.mgmt.monitor.operations.ActivityLogAlertsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -98,15 +98,15 @@ def __init__(

self.autoscale_settings = AutoscaleSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.alert_rules = AlertRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.alert_rule_incidents = AlertRuleIncidentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.activity_log_alerts = ActivityLogAlertsOperations(
self.alert_rules = AlertRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.log_profiles = LogProfilesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_diagnostic_settings = ServiceDiagnosticSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.action_groups = ActionGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.activity_log_alerts = ActivityLogAlertsOperations(
self._client, self.config, self._serialize, self._deserialize)
8 changes: 4 additions & 4 deletions azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
# --------------------------------------------------------------------------

from .autoscale_settings_operations import AutoscaleSettingsOperations
from .alert_rules_operations import AlertRulesOperations
from .alert_rule_incidents_operations import AlertRuleIncidentsOperations
from .activity_log_alerts_operations import ActivityLogAlertsOperations
from .alert_rules_operations import AlertRulesOperations
from .log_profiles_operations import LogProfilesOperations
from .service_diagnostic_settings_operations import ServiceDiagnosticSettingsOperations
from .action_groups_operations import ActionGroupsOperations
from .activity_log_alerts_operations import ActivityLogAlertsOperations

__all__ = [
'AutoscaleSettingsOperations',
'AlertRulesOperations',
'AlertRuleIncidentsOperations',
'ActivityLogAlertsOperations',
'AlertRulesOperations',
'LogProfilesOperations',
'ServiceDiagnosticSettingsOperations',
'ActionGroupsOperations',
'ActivityLogAlertsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# regenerated.
# --------------------------------------------------------------------------

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
import uuid

from .. import models

Expand Down Expand Up @@ -51,10 +51,13 @@ def create_or_update(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
<azure.mgmt.monitor.models.ActionGroupResource>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
Expand Down Expand Up @@ -119,10 +122,13 @@ def get(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
<azure.mgmt.monitor.models.ActionGroupResource>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
Expand Down Expand Up @@ -152,7 +158,7 @@ def get(
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, **operation_config)

if response.status_code not in [200, 404]:
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
Expand Down Expand Up @@ -181,9 +187,11 @@ def delete(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:rtype: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:return: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
Expand Down Expand Up @@ -231,6 +239,8 @@ def list_by_subscription_id(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>`
:rtype: :class:`ActionGroupResourcePaged
<azure.mgmt.monitor.models.ActionGroupResourcePaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
Expand Down Expand Up @@ -296,6 +306,8 @@ def list_by_resource_group(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of :class:`ActionGroupResource
<azure.mgmt.monitor.models.ActionGroupResource>`
:rtype: :class:`ActionGroupResourcePaged
<azure.mgmt.monitor.models.ActionGroupResourcePaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
Expand Down Expand Up @@ -367,9 +379,11 @@ def enable_receiver(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:rtype: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:return: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
enable_request = models.EnableRequest(receiver_name=receiver_name)
Expand Down Expand Up @@ -405,7 +419,7 @@ def enable_receiver(
response = self._client.send(
request, header_parameters, body_content, **operation_config)

if response.status_code not in [200, 409, 404]:
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
Expand Down
Loading