From 2fc289f2df67c2a3a98e3217c763e7c83747c6ea Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 7 Feb 2018 17:34:40 -0800 Subject: [PATCH 01/12] [Monitor] Add Public Preview APIs of Metric Baseline (#1710) * Generated from e6af07c788cf75386008cfbaf4c26f88663a591e * Update Monitor version --- .../azure/mgmt/monitor/models/__init__.py | 12 + .../models/activity_log_alert_action_group.py | 1 + .../models/activity_log_alert_action_list.py | 1 + .../activity_log_alert_all_of_condition.py | 1 + .../activity_log_alert_leaf_condition.py | 1 + .../models/activity_log_alert_patch_body.py | 1 + .../models/alert_rule_resource_patch.py | 1 + .../monitor/models/autoscale_notification.py | 1 + .../mgmt/monitor/models/autoscale_profile.py | 1 + .../autoscale_setting_resource_patch.py | 1 + .../azure/mgmt/monitor/models/baseline.py | 43 ++ .../monitor/models/baseline_metadata_value.py | 32 ++ .../mgmt/monitor/models/baseline_response.py | 76 +++ .../models/calculate_baseline_response.py | 41 ++ ...c_settings_category_resource_collection.py | 1 + ...diagnostic_settings_resource_collection.py | 1 + .../mgmt/monitor/models/email_notification.py | 1 + .../mgmt/monitor/models/email_receiver.py | 1 + .../mgmt/monitor/models/enable_request.py | 1 + .../mgmt/monitor/models/error_response.py | 1 + .../azure/mgmt/monitor/models/event_data.py | 1 + .../mgmt/monitor/models/http_request_info.py | 1 + .../azure/mgmt/monitor/models/incident.py | 1 + .../mgmt/monitor/models/localizable_string.py | 1 + .../models/log_profile_resource_patch.py | 1 + .../azure/mgmt/monitor/models/log_settings.py | 1 + .../management_event_aggregation_condition.py | 1 + .../mgmt/monitor/models/metadata_value.py | 1 + .../azure/mgmt/monitor/models/metric.py | 1 + .../monitor/models/metric_availability.py | 1 + .../mgmt/monitor/models/metric_definition.py | 1 + .../mgmt/monitor/models/metric_settings.py | 1 + .../mgmt/monitor/models/metric_trigger.py | 1 + .../azure/mgmt/monitor/models/metric_value.py | 1 + .../models/monitor_management_client_enums.py | 7 + .../azure/mgmt/monitor/models/operation.py | 1 + .../mgmt/monitor/models/operation_display.py | 1 + .../monitor/models/operation_list_result.py | 1 + .../monitor/models/proxy_only_resource.py | 1 + .../azure/mgmt/monitor/models/recurrence.py | 1 + .../mgmt/monitor/models/recurrent_schedule.py | 1 + .../azure/mgmt/monitor/models/resource.py | 1 + .../azure/mgmt/monitor/models/response.py | 1 + .../mgmt/monitor/models/retention_policy.py | 1 + .../azure/mgmt/monitor/models/rule_action.py | 1 + .../mgmt/monitor/models/rule_condition.py | 1 + .../mgmt/monitor/models/rule_data_source.py | 1 + ...ule_management_event_claims_data_source.py | 1 + .../azure/mgmt/monitor/models/scale_action.py | 1 + .../mgmt/monitor/models/scale_capacity.py | 1 + .../azure/mgmt/monitor/models/scale_rule.py | 1 + .../monitor/models/sender_authorization.py | 1 + .../azure/mgmt/monitor/models/sms_receiver.py | 1 + .../monitor/models/time_series_element.py | 1 + .../monitor/models/time_series_information.py | 42 ++ .../azure/mgmt/monitor/models/time_window.py | 1 + .../monitor/models/webhook_notification.py | 1 + .../mgmt/monitor/models/webhook_receiver.py | 1 + .../mgmt/monitor/monitor_management_client.py | 7 +- .../azure/mgmt/monitor/operations/__init__.py | 2 + .../operations/action_groups_operations.py | 2 + .../activity_log_alerts_operations.py | 2 + .../operations/activity_logs_operations.py | 2 + .../alert_rule_incidents_operations.py | 2 + .../operations/alert_rules_operations.py | 4 +- .../autoscale_settings_operations.py | 2 + ...diagnostic_settings_category_operations.py | 2 + .../diagnostic_settings_operations.py | 2 + .../operations/event_categories_operations.py | 2 + .../operations/log_profiles_operations.py | 2 + .../operations/metric_baseline_operations.py | 194 ++++++++ .../metric_definitions_operations.py | 2 + .../monitor/operations/metrics_operations.py | 2 + .../mgmt/monitor/operations/operations.py | 2 + .../tenant_activity_logs_operations.py | 2 + .../azure/mgmt/monitor/version.py | 2 +- azure-mgmt-monitor/build.json | 451 +++++++++++------- 77 files changed, 804 insertions(+), 186 deletions(-) create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index b4da43b8c4ce..981b5dbde5bc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -74,6 +74,11 @@ from .time_series_element import TimeSeriesElement from .metric import Metric from .response import Response +from .baseline_metadata_value import BaselineMetadataValue +from .baseline import Baseline +from .baseline_response import BaselineResponse +from .time_series_information import TimeSeriesInformation +from .calculate_baseline_response import CalculateBaselineResponse from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged from .incident_paged import IncidentPaged from .alert_rule_resource_paged import AlertRuleResourcePaged @@ -97,6 +102,7 @@ EventLevel, Unit, AggregationType, + Sensitivity, ResultType, ) @@ -166,6 +172,11 @@ 'TimeSeriesElement', 'Metric', 'Response', + 'BaselineMetadataValue', + 'Baseline', + 'BaselineResponse', + 'TimeSeriesInformation', + 'CalculateBaselineResponse', 'AutoscaleSettingResourcePaged', 'IncidentPaged', 'AlertRuleResourcePaged', @@ -188,5 +199,6 @@ 'EventLevel', 'Unit', 'AggregationType', + 'Sensitivity', 'ResultType', ] diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py index 2e9cc3ebbf60..fbd7cad9b61a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py @@ -33,5 +33,6 @@ class ActivityLogAlertActionGroup(Model): } def __init__(self, action_group_id, webhook_properties=None): + super(ActivityLogAlertActionGroup, self).__init__() self.action_group_id = action_group_id self.webhook_properties = webhook_properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py index b14666a31e69..93e89bf58cff 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py @@ -25,4 +25,5 @@ class ActivityLogAlertActionList(Model): } def __init__(self, action_groups=None): + super(ActivityLogAlertActionList, self).__init__() self.action_groups = action_groups diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py index c994227b87ed..bdcd86017bfb 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py @@ -30,4 +30,5 @@ class ActivityLogAlertAllOfCondition(Model): } def __init__(self, all_of): + super(ActivityLogAlertAllOfCondition, self).__init__() self.all_of = all_of diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py index 44f5526aed1b..d31f514e88b7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py @@ -38,5 +38,6 @@ class ActivityLogAlertLeafCondition(Model): } def __init__(self, field, equals): + super(ActivityLogAlertLeafCondition, self).__init__() self.field = field self.equals = equals diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py index ef6f13e2558a..37cb2aef8ac8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py @@ -29,5 +29,6 @@ class ActivityLogAlertPatchBody(Model): } def __init__(self, tags=None, enabled=True): + super(ActivityLogAlertPatchBody, self).__init__() self.tags = tags self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py index 8877ac7d2830..75d06c07d0c9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py @@ -56,6 +56,7 @@ class AlertRuleResourcePatch(Model): } def __init__(self, name, is_enabled, condition, tags=None, description=None, actions=None): + super(AlertRuleResourcePatch, self).__init__() self.tags = tags self.name = name self.description = description diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py index fbb63c0ceb3e..1e294501f4a5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py @@ -40,5 +40,6 @@ class AutoscaleNotification(Model): operation = "Scale" def __init__(self, email=None, webhooks=None): + super(AutoscaleNotification, self).__init__() self.email = email self.webhooks = webhooks diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py index 912b2a2c6dd5..c36998aa1b21 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py @@ -46,6 +46,7 @@ class AutoscaleProfile(Model): } def __init__(self, name, capacity, rules, fixed_date=None, recurrence=None): + super(AutoscaleProfile, self).__init__() self.name = name self.capacity = capacity self.rules = rules diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py index e8e45c5b66d6..d2cad20ddd15 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py @@ -49,6 +49,7 @@ class AutoscaleSettingResourcePatch(Model): } def __init__(self, profiles, tags=None, notifications=None, enabled=True, name=None, target_resource_uri=None): + super(AutoscaleSettingResourcePatch, self).__init__() self.tags = tags self.profiles = profiles self.notifications = notifications diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py new file mode 100644 index 000000000000..c4c788fedcad --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Baseline(Model): + """The baseline values for a single sensitivity value. + + :param sensitivity: the sensitivity of the baseline. Possible values + include: 'Low', 'Medium', 'High' + :type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity + :param low_thresholds: The low thresholds of the baseline. + :type low_thresholds: list[float] + :param high_thresholds: The high thresholds of the baseline. + :type high_thresholds: list[float] + """ + + _validation = { + 'sensitivity': {'required': True}, + 'low_thresholds': {'required': True}, + 'high_thresholds': {'required': True}, + } + + _attribute_map = { + 'sensitivity': {'key': 'sensitivity', 'type': 'Sensitivity'}, + 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, + 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + } + + def __init__(self, sensitivity, low_thresholds, high_thresholds): + super(Baseline, self).__init__() + self.sensitivity = sensitivity + self.low_thresholds = low_thresholds + self.high_thresholds = high_thresholds diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py new file mode 100644 index 000000000000..d1e576f99407 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineMetadataValue(Model): + """Represents a baseline metadata value. + + :param name: the name of the metadata. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param value: the value of the metadata. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, name=None, value=None): + super(BaselineMetadataValue, self).__init__() + self.name = name + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py new file mode 100644 index 000000000000..2eb7f3d7e1ba --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineResponse(Model): + """The response to a baseline query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: the metric baseline Id. + :vartype id: str + :ivar type: the resource type of the baseline resource. + :vartype type: str + :ivar name: the name and the display name of the metric, i.e. it is + localizable string. + :vartype name: ~azure.mgmt.monitor.models.LocalizableString + :param timespan: The timespan for which the data was retrieved. Its value + consists of two datatimes concatenated, separated by '/'. This may be + adjusted in the future and returned back from what was originally + requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was + returned in. This may be adjusted in the future and returned back from + what was originally requested. This is not present if a metadata request + was made. + :type interval: timedelta + :param aggregation: The aggregation type of the metric. + :type aggregation: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + :param metadata: the baseline metadata values. + :type metadata: list[~azure.mgmt.monitor.models.BaselineMetadataValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'timespan': {'key': 'properties.timespan', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'duration'}, + 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, + 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, + } + + def __init__(self, timespan=None, interval=None, aggregation=None, timestamps=None, baseline=None, metadata=None): + super(BaselineResponse, self).__init__() + self.id = None + self.type = None + self.name = None + self.timespan = timespan + self.interval = interval + self.aggregation = aggregation + self.timestamps = timestamps + self.baseline = baseline + self.metadata = metadata diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py new file mode 100644 index 000000000000..f5faef335596 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CalculateBaselineResponse(Model): + """The response to a calcualte baseline call. + + :param type: the resource type of the baseline resource. + :type type: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + """ + + _validation = { + 'type': {'required': True}, + 'baseline': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + } + + def __init__(self, type, baseline, timestamps=None): + super(CalculateBaselineResponse, self).__init__() + self.type = type + self.timestamps = timestamps + self.baseline = baseline diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py index 2a375065985b..a3a42e0f1085 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py @@ -25,4 +25,5 @@ class DiagnosticSettingsCategoryResourceCollection(Model): } def __init__(self, value=None): + super(DiagnosticSettingsCategoryResourceCollection, self).__init__() self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py index 7f9fcf968deb..3aee18a1edf6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py @@ -24,4 +24,5 @@ class DiagnosticSettingsResourceCollection(Model): } def __init__(self, value=None): + super(DiagnosticSettingsResourceCollection, self).__init__() self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py index 5195a5f2e045..ef6f1c0b0656 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py @@ -33,6 +33,7 @@ class EmailNotification(Model): } def __init__(self, send_to_subscription_administrator=None, send_to_subscription_co_administrators=None, custom_emails=None): + super(EmailNotification, self).__init__() self.send_to_subscription_administrator = send_to_subscription_administrator self.send_to_subscription_co_administrators = send_to_subscription_co_administrators self.custom_emails = custom_emails diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py index 736c7e527e05..1b1b11c78495 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py @@ -41,6 +41,7 @@ class EmailReceiver(Model): } def __init__(self, name, email_address): + super(EmailReceiver, self).__init__() self.name = name self.email_address = email_address self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py index 177668388d2e..5f481ee3f3d4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py @@ -28,4 +28,5 @@ class EnableRequest(Model): } def __init__(self, receiver_name): + super(EnableRequest, self).__init__() self.receiver_name = receiver_name diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py index 2cc2d8d68514..1a399569811b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py @@ -28,6 +28,7 @@ class ErrorResponse(Model): } def __init__(self, code=None, message=None): + super(ErrorResponse, self).__init__() self.code = code self.message = message diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index c4ea4df1b37e..e0b9021b3d3e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -129,6 +129,7 @@ class EventData(Model): } def __init__(self, level, event_timestamp, submission_timestamp, authorization=None, claims=None, caller=None, description=None, id=None, event_data_id=None, correlation_id=None, event_name=None, category=None, http_request=None, resource_group_name=None, resource_provider_name=None, resource_id=None, resource_type=None, operation_id=None, operation_name=None, properties=None, status=None, sub_status=None, subscription_id=None, tenant_id=None): + super(EventData, self).__init__() self.authorization = authorization self.claims = claims self.caller = caller diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py index 9ba218c62c28..d25e92a5190f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py @@ -33,6 +33,7 @@ class HttpRequestInfo(Model): } def __init__(self, client_request_id=None, client_ip_address=None, method=None, uri=None): + super(HttpRequestInfo, self).__init__() self.client_request_id = client_request_id self.client_ip_address = client_ip_address self.method = method diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py index 42315adda3f5..be7eb38e45f0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py @@ -50,6 +50,7 @@ class Incident(Model): } def __init__(self): + super(Incident, self).__init__() self.name = None self.rule_name = None self.is_active = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py index 5de6dea750c0..3e058e870290 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py @@ -31,5 +31,6 @@ class LocalizableString(Model): } def __init__(self, value, localized_value=None): + super(LocalizableString, self).__init__() self.value = value self.localized_value = localized_value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py index ec9ff28c65ad..d5a5316148d6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py @@ -53,6 +53,7 @@ class LogProfileResourcePatch(Model): } def __init__(self, locations, categories, retention_policy, tags=None, storage_account_id=None, service_bus_rule_id=None): + super(LogProfileResourcePatch, self).__init__() self.tags = tags self.storage_account_id = storage_account_id self.service_bus_rule_id = service_bus_rule_id diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py index 976c85def351..6e5b89a68254 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py @@ -38,6 +38,7 @@ class LogSettings(Model): } def __init__(self, enabled, category=None, retention_policy=None): + super(LogSettings, self).__init__() self.category = category self.enabled = enabled self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py index ce3e48f92002..5e0e19292cac 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py @@ -33,6 +33,7 @@ class ManagementEventAggregationCondition(Model): } def __init__(self, operator=None, threshold=None, window_size=None): + super(ManagementEventAggregationCondition, self).__init__() self.operator = operator self.threshold = threshold self.window_size = window_size diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py index d8f5c8a849f3..21d0ba797749 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py @@ -27,5 +27,6 @@ class MetadataValue(Model): } def __init__(self, name=None, value=None): + super(MetadataValue, self).__init__() self.name = name self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py index da3a2e224975..4ae5e08847bc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py @@ -48,6 +48,7 @@ class Metric(Model): } def __init__(self, id, type, name, unit, timeseries): + super(Metric, self).__init__() self.id = id self.type = type self.name = name diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py index cf9b4bf2ef16..d46322343000 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py @@ -30,5 +30,6 @@ class MetricAvailability(Model): } def __init__(self, time_grain=None, retention=None): + super(MetricAvailability, self).__init__() self.time_grain = time_grain self.retention = retention diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py index d2d9adf8a399..95c436ba5818 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py @@ -56,6 +56,7 @@ class MetricDefinition(Model): } def __init__(self, is_dimension_required=None, resource_id=None, name=None, unit=None, primary_aggregation_type=None, metric_availabilities=None, id=None, dimensions=None): + super(MetricDefinition, self).__init__() self.is_dimension_required = is_dimension_required self.resource_id = resource_id self.name = name diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py index e605018df4b2..11de4a95fb41 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py @@ -41,6 +41,7 @@ class MetricSettings(Model): } def __init__(self, enabled, time_grain=None, category=None, retention_policy=None): + super(MetricSettings, self).__init__() self.time_grain = time_grain self.category = category self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py index 7fd84ff68965..b374fb2a039a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py @@ -70,6 +70,7 @@ class MetricTrigger(Model): } def __init__(self, metric_name, metric_resource_uri, time_grain, statistic, time_window, time_aggregation, operator, threshold): + super(MetricTrigger, self).__init__() self.metric_name = metric_name self.metric_resource_uri = metric_resource_uri self.time_grain = time_grain diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py index cb0886b50c40..5b5a550057ba 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py @@ -44,6 +44,7 @@ class MetricValue(Model): } def __init__(self, time_stamp, average=None, minimum=None, maximum=None, total=None, count=None): + super(MetricValue, self).__init__() self.time_stamp = time_stamp self.average = average self.minimum = minimum diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py index bc378461b4ec..9475e9ad4e05 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py @@ -127,6 +127,13 @@ class AggregationType(Enum): total = "Total" +class Sensitivity(Enum): + + low = "Low" + medium = "Medium" + high = "High" + + class ResultType(Enum): data = "Data" diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py index 5d885493c824..dc5a77d93a18 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py @@ -27,5 +27,6 @@ class Operation(Model): } def __init__(self, name=None, display=None): + super(Operation, self).__init__() self.name = name self.display = display diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py index 561416693232..82830778f953 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py @@ -31,6 +31,7 @@ class OperationDisplay(Model): } def __init__(self, provider=None, resource=None, operation=None): + super(OperationDisplay, self).__init__() self.provider = provider self.resource = resource self.operation = operation diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py index 5bdb9217d290..28f86e07b03a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py @@ -30,5 +30,6 @@ class OperationListResult(Model): } def __init__(self, value=None, next_link=None): + super(OperationListResult, self).__init__() self.value = value self.next_link = next_link diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py index 7926895e429e..3a9545a03ffe 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py @@ -39,6 +39,7 @@ class ProxyOnlyResource(Model): } def __init__(self): + super(ProxyOnlyResource, self).__init__() self.id = None self.name = None self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py index 1eb1267a7627..5f918315655d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py @@ -36,5 +36,6 @@ class Recurrence(Model): } def __init__(self, frequency, schedule): + super(Recurrence, self).__init__() self.frequency = frequency self.schedule = schedule diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py index 36e510cf47c3..c862eb520257 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py @@ -81,6 +81,7 @@ class RecurrentSchedule(Model): } def __init__(self, time_zone, days, hours, minutes): + super(RecurrentSchedule, self).__init__() self.time_zone = time_zone self.days = days self.hours = hours diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py index 434476a1d049..1552cf70c86d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py @@ -46,6 +46,7 @@ class Resource(Model): } def __init__(self, location, tags=None): + super(Resource, self).__init__() self.id = None self.name = None self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py index fad15051713b..36b9b4dfe381 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py @@ -46,6 +46,7 @@ class Response(Model): } def __init__(self, timespan, value, cost=None, interval=None): + super(Response, self).__init__() self.cost = cost self.timespan = timespan self.interval = interval diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py index 991af3078179..883bbd32f622 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py @@ -34,5 +34,6 @@ class RetentionPolicy(Model): } def __init__(self, enabled, days): + super(RetentionPolicy, self).__init__() self.enabled = enabled self.days = days diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py index 0362c2ea93cd..3eb36c4a18c6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py @@ -36,4 +36,5 @@ class RuleAction(Model): } def __init__(self): + super(RuleAction, self).__init__() self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py index f1f58c723de3..ec5456c825d5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py @@ -40,5 +40,6 @@ class RuleCondition(Model): } def __init__(self, data_source=None): + super(RuleCondition, self).__init__() self.data_source = data_source self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py index 9dbcb1e1a5b7..49352fbec023 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py @@ -39,5 +39,6 @@ class RuleDataSource(Model): } def __init__(self, resource_uri=None): + super(RuleDataSource, self).__init__() self.resource_uri = resource_uri self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py index c6912a191cbd..ebb474e18727 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py @@ -24,4 +24,5 @@ class RuleManagementEventClaimsDataSource(Model): } def __init__(self, email_address=None): + super(RuleManagementEventClaimsDataSource, self).__init__() self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py index f3ff55ac2d0d..4e4ed1ffb2ec 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py @@ -47,6 +47,7 @@ class ScaleAction(Model): } def __init__(self, direction, type, cooldown, value="1"): + super(ScaleAction, self).__init__() self.direction = direction self.type = type self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py index 035076efbba1..98db9fb3279f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py @@ -40,6 +40,7 @@ class ScaleCapacity(Model): } def __init__(self, minimum, maximum, default): + super(ScaleCapacity, self).__init__() self.minimum = minimum self.maximum = maximum self.default = default diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py index c509b5b612d2..f210b77581ee 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py @@ -32,5 +32,6 @@ class ScaleRule(Model): } def __init__(self, metric_trigger, scale_action): + super(ScaleRule, self).__init__() self.metric_trigger = metric_trigger self.scale_action = scale_action diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py index c5f0319ba5eb..3a0c733e8ef7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py @@ -33,6 +33,7 @@ class SenderAuthorization(Model): } def __init__(self, action=None, role=None, scope=None): + super(SenderAuthorization, self).__init__() self.action = action self.role = role self.scope = scope diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py index 089dc7824c43..3aef994a3e0b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py @@ -45,6 +45,7 @@ class SmsReceiver(Model): } def __init__(self, name, country_code, phone_number): + super(SmsReceiver, self).__init__() self.name = name self.country_code = country_code self.phone_number = phone_number diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py index 0abbfab18a71..db441d8e5f54 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py @@ -30,5 +30,6 @@ class TimeSeriesElement(Model): } def __init__(self, metadatavalues=None, data=None): + super(TimeSeriesElement, self).__init__() self.metadatavalues = metadatavalues self.data = data diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py new file mode 100644 index 000000000000..3ccae5cc9aee --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeSeriesInformation(Model): + """The time series info needed for calculating the baseline. + + :param sensitivities: the list of sensitivities for calculating the + baseline. + :type sensitivities: list[str] + :param values: The metric values to calculate the baseline. + :type values: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + """ + + _validation = { + 'sensitivities': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'sensitivities': {'key': 'sensitivities', 'type': '[str]'}, + 'values': {'key': 'values', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + } + + def __init__(self, sensitivities, values, timestamps=None): + super(TimeSeriesInformation, self).__init__() + self.sensitivities = sensitivities + self.values = values + self.timestamps = timestamps diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py index 77300df3ff84..b0bf8c35377c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py @@ -72,6 +72,7 @@ class TimeWindow(Model): } def __init__(self, start, end, time_zone=None): + super(TimeWindow, self).__init__() self.time_zone = time_zone self.start = start self.end = end diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py index 3e1689a78e34..5c2a1bbadffa 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py @@ -27,5 +27,6 @@ class WebhookNotification(Model): } def __init__(self, service_uri=None, properties=None): + super(WebhookNotification, self).__init__() self.service_uri = service_uri self.properties = properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py index af70696077b1..1febd8617e14 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py @@ -33,5 +33,6 @@ class WebhookReceiver(Model): } def __init__(self, name, service_uri): + super(WebhookReceiver, self).__init__() self.name = name self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py index 3811b14bb162..8ba664998175 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py @@ -27,6 +27,7 @@ from .operations.tenant_activity_logs_operations import TenantActivityLogsOperations from .operations.metric_definitions_operations import MetricDefinitionsOperations from .operations.metrics_operations import MetricsOperations +from .operations.metric_baseline_operations import MetricBaselineOperations from . import models @@ -55,7 +56,7 @@ def __init__( super(MonitorManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('monitormanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-monitor/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -96,6 +97,8 @@ class MonitorManagementClient(object): :vartype metric_definitions: azure.mgmt.monitor.operations.MetricDefinitionsOperations :ivar metrics: Metrics operations :vartype metrics: azure.mgmt.monitor.operations.MetricsOperations + :ivar metric_baseline: MetricBaseline operations + :vartype metric_baseline: azure.mgmt.monitor.operations.MetricBaselineOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -143,3 +146,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.metrics = MetricsOperations( self._client, self.config, self._serialize, self._deserialize) + self.metric_baseline = MetricBaselineOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py index 811736d2b984..071c73c9668e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/__init__.py @@ -23,6 +23,7 @@ from .tenant_activity_logs_operations import TenantActivityLogsOperations from .metric_definitions_operations import MetricDefinitionsOperations from .metrics_operations import MetricsOperations +from .metric_baseline_operations import MetricBaselineOperations __all__ = [ 'AutoscaleSettingsOperations', @@ -39,4 +40,5 @@ 'TenantActivityLogsOperations', 'MetricDefinitionsOperations', 'MetricsOperations', + 'MetricBaselineOperations', ] diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py index 1fe6edf35bff..c5f36cef8ec2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py @@ -25,6 +25,8 @@ class ActionGroupsOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py index f6bbfa262ea7..6470aa6a6616 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py @@ -25,6 +25,8 @@ class ActivityLogAlertsOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py index c0c19381ea0a..e72b21ee4edf 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py @@ -25,6 +25,8 @@ class ActivityLogsOperations(object): :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py index 9ac7bfccbc35..dddff0fda043 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py @@ -26,6 +26,8 @@ class AlertRuleIncidentsOperations(object): :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py index 62d1cff27fb9..6c21e374887c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py @@ -26,6 +26,8 @@ class AlertRulesOperations(object): :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -147,7 +149,7 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py index d83bb10360e9..9dbc394c87f5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py @@ -25,6 +25,8 @@ class AutoscaleSettingsOperations(object): :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py index 11411772740d..67c681747766 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py @@ -25,6 +25,8 @@ class DiagnosticSettingsCategoryOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py index 7711f5c37319..ff7225ba84a3 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py @@ -25,6 +25,8 @@ class DiagnosticSettingsOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py index 639171fe93c9..60dbff86df32 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py @@ -25,6 +25,8 @@ class EventCategoriesOperations(object): :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py index 4165c1c31298..d27263edf3d4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py @@ -26,6 +26,8 @@ class LogProfilesOperations(object): :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py new file mode 100644 index 000000000000..5ca7fa797486 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py @@ -0,0 +1,194 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MetricBaselineOperations(object): + """MetricBaselineOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-01-preview" + + self.config = config + + def get( + self, resource_uri, metric_name, timespan=None, interval=None, aggregation=None, sensitivities=None, result_type=None, custom_headers=None, raw=False, **operation_config): + """**Gets the baseline values for a specific metric**. + + :param resource_uri: The identifier of the resource. It has the + following structure: + subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. + For example: + subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 + :type resource_uri: str + :param metric_name: The name of the metric to retrieve the baseline + for. + :type metric_name: str + :param timespan: The timespan of the query. It is a string with the + following format 'startDateTime_ISO/endDateTime_ISO'. + :type timespan: str + :param interval: The interval (i.e. timegrain) of the query. + :type interval: timedelta + :param aggregation: The aggregation type of the metric to retrieve the + baseline for. + :type aggregation: str + :param sensitivities: The list of sensitivities (comma separated) to + retrieve. + :type sensitivities: str + :param result_type: Allows retrieving only metadata of the baseline. + On data request all information is retrieved. Possible values include: + 'Data', 'Metadata' + :type result_type: str or ~azure.mgmt.monitor.models.ResultType + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BaselineResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.BaselineResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}' + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'metricName': self._serialize.url("metric_name", metric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if timespan is not None: + query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') + if interval is not None: + query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') + if aggregation is not None: + query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') + if sensitivities is not None: + query_parameters['sensitivities'] = self._serialize.query("sensitivities", sensitivities, 'str') + if result_type is not None: + query_parameters['resultType'] = self._serialize.query("result_type", result_type, 'ResultType') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BaselineResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def calculate_baseline( + self, resource_uri, time_series_information, custom_headers=None, raw=False, **operation_config): + """**Lists the baseline values for a resource**. + + :param resource_uri: The identifier of the resource. It has the + following structure: + subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. + For example: + subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 + :type resource_uri: str + :param time_series_information: Information that need to be specified + to calculate a baseline on a time series. + :type time_series_information: + ~azure.mgmt.monitor.models.TimeSeriesInformation + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CalculateBaselineResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.CalculateBaselineResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = '/{resourceUri}/providers/microsoft.insights/calculatebaseline' + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(time_series_information, 'TimeSeriesInformation') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CalculateBaselineResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py index 5134f74a80b0..1cc457f441ec 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py @@ -25,6 +25,8 @@ class MetricDefinitionsOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index aca37e3d6153..c99d28565e9e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -25,6 +25,8 @@ class MetricsOperations(object): :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py index 815fa409cb7e..a3e92fe2aa5c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py @@ -26,6 +26,8 @@ class Operations(object): :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py index 3c46f893356a..877255f95c36 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py @@ -25,6 +25,8 @@ class TenantActivityLogsOperations(object): :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/version.py b/azure-mgmt-monitor/azure/mgmt/monitor/version.py index 85da2c00c1a6..266f5a486d79 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/version.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.0" +VERSION = "0.5.0" diff --git a/azure-mgmt-monitor/build.json b/azure-mgmt-monitor/build.json index c63116cab7c0..a395cf5b01a2 100644 --- a/azure-mgmt-monitor/build.json +++ b/azure-mgmt-monitor/build.json @@ -4,127 +4,178 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", + "version": "2.0.4216", "engines": { "node": ">=7.10.0" }, "dependencies": {}, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", + "@types/node": "^8.0.53", "@types/source-map": "^0.5.0", "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" }, "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4216", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", "_requested": { "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest-core@2.0.4168\\node_modules\\@microsoft.azure\\autorest-core" + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" }, "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.916.8341005578395.personal-lock", + "options": { + "port": 29152, + "host": "2130735291", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.916.8341005578395.personal-lock:29152" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" + "installationPath": "/root/.autorest" }, { "resolvedInfo": null, "packageMetadata": { - "name": "@microsoft.azure/autorest.go", - "version": "2.0.24", - "dependencies": { - "dotnet-2.0.0": "^1.1.0" + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4227", + "engines": { + "node": ">=7.10.0" }, + "dependencies": {}, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" }, "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", - "_shasum": "409a4a9a21708a7aea58fadb0b064ea487a90fea", + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.go@2.0.24", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4227", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", "_requested": { "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.go@2.0.24/node_modules/@microsoft.azure/autorest.go" + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.go@2.0.24\\node_modules\\@microsoft.azure\\autorest.go" + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" }, "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.916.8341005578395.personal-lock", + "options": { + "port": 29152, + "host": "2130735291", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.916.8341005578395.personal-lock:29152" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" + "installationPath": "/root/.autorest" }, { "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.18", + "version": "2.0.21", "dependencies": { - "dotnet-2.0.0": "^1.1.0" + "dotnet-2.0.0": "^1.3.2" }, "optionalDependencies": {}, "devDependencies": { @@ -146,39 +197,72 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "b8e853f83b99b2a37ad534cb8463da5de4b11418", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.18", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", "_requested": { "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.0.18/node_modules/@microsoft.azure/autorest.modeler" + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.0.18\\node_modules\\@microsoft.azure\\autorest.modeler" + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" }, "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.916.8341005578395.personal-lock", + "options": { + "port": 29152, + "host": "2130735291", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.916.8341005578395.personal-lock:29152" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" + "installationPath": "/root/.autorest" }, { "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", + "version": "2.3.38", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", "coffee-script": "^1.11.1", "dotnet-sdk-2.0.0": "^1.4.4", "gulp": "^3.9.1", @@ -197,94 +281,72 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", "_requested": { "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.1.22\\node_modules\\@microsoft.azure\\autorest.modeler", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.1.22\\node_modules\\@microsoft.azure\\autorest.modeler", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.1.22\\node_modules\\@microsoft.azure\\autorest.modeler", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.modeler@2.1.22\\node_modules\\@microsoft.azure\\autorest.modeler" + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" }, "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.13", - "dependencies": { - "dotnet-2.0.0": "^1.1.0" + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.916.8341005578395.personal-lock", + "options": { + "port": 29152, + "host": "2130735291", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.916.8341005578395.personal-lock:29152" + }, + "file": "/tmp/_root_.autorest.lock" }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "_shasum": "ddbbf3e3f1f90ae4132b687cfa8450425ab4ffcd", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.13", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.13/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.13\\node_modules\\@microsoft.azure\\autorest.python" + "dotnetPath": "/root/.dotnet" }, - "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" - }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" + "installationPath": "/root/.autorest" }, { "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", + "version": "2.1.28", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", "coffee-script": "^1.11.1", "dotnet-sdk-2.0.0": "^1.4.4", "gulp": "^3.9.1", @@ -303,37 +365,60 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_id": "@microsoft.azure/autorest.python@2.1.28", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", "_requested": { "type": "directory", - "where": "D:\\VSProjects\\swagger-to-sdk", - "raw": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.19\\node_modules\\@microsoft.azure\\autorest.python", - "rawSpec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.19\\node_modules\\@microsoft.azure\\autorest.python", - "saveSpec": "file:C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "C:/Users/lmazuel/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" }, - "_spec": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.19\\node_modules\\@microsoft.azure\\autorest.python", - "_where": "C:\\Users\\lmazuel\\.autorest\\@microsoft.azure_autorest.python@2.0.19\\node_modules\\@microsoft.azure\\autorest.python" + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" }, "extensionManager": { - "installationPath": "C:\\Users\\lmazuel\\.autorest", - "dotnetPath": "C:\\Users\\lmazuel\\.dotnet" + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.916.8341005578395.personal-lock", + "options": { + "port": 29152, + "host": "2130735291", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.916.8341005578395.personal-lock:29152" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" }, - "installationPath": "C:\\Users\\lmazuel\\.autorest" + "installationPath": "/root/.autorest" } ], - "autorest_bootstrap": { - "dependencies": { - "autorest": { - "version": "2.0.4166", - "from": "autorest@latest", - "resolved": "https://registry.npmjs.org/autorest/-/autorest-2.0.4166.tgz" - } - } - } + "autorest_bootstrap": {} } \ No newline at end of file From a36f114092bfac8e32ac3a6d2f2e7a994515a1ee Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Mon, 12 Feb 2018 12:50:43 -0800 Subject: [PATCH 02/12] Generated from df75ee5f47b030dfa0d66e0cac2cf68fcc29b071 (#1891) fix python sdk failure --- .../azure/mgmt/monitor/models/__init__.py | 10 +++ .../monitor/models/action_group_patch_body.py | 34 +++++++ .../monitor/models/action_group_resource.py | 24 ++++- .../models/automation_runbook_receiver.py | 58 ++++++++++++ .../monitor/models/azure_app_push_receiver.py | 39 ++++++++ .../mgmt/monitor/models/itsm_receiver.py | 56 ++++++++++++ .../mgmt/monitor/models/voice_receiver.py | 43 +++++++++ .../operations/action_groups_operations.py | 89 +++++++++++++++++-- .../activity_log_alerts_operations.py | 12 +-- .../operations/activity_logs_operations.py | 2 +- .../alert_rule_incidents_operations.py | 4 +- .../operations/alert_rules_operations.py | 10 +-- .../autoscale_settings_operations.py | 10 +-- ...diagnostic_settings_category_operations.py | 4 +- .../diagnostic_settings_operations.py | 8 +- .../operations/event_categories_operations.py | 2 +- .../operations/log_profiles_operations.py | 10 +-- .../operations/metric_baseline_operations.py | 4 +- .../metric_definitions_operations.py | 2 +- .../monitor/operations/metrics_operations.py | 2 +- .../mgmt/monitor/operations/operations.py | 2 +- .../tenant_activity_logs_operations.py | 2 +- 22 files changed, 381 insertions(+), 46 deletions(-) create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index 981b5dbde5bc..2222f1bc6a4b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -55,8 +55,13 @@ from .email_receiver import EmailReceiver from .sms_receiver import SmsReceiver from .webhook_receiver import WebhookReceiver +from .itsm_receiver import ItsmReceiver +from .azure_app_push_receiver import AzureAppPushReceiver +from .automation_runbook_receiver import AutomationRunbookReceiver +from .voice_receiver import VoiceReceiver from .action_group_resource import ActionGroupResource from .enable_request import EnableRequest +from .action_group_patch_body import ActionGroupPatchBody 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 @@ -153,8 +158,13 @@ 'EmailReceiver', 'SmsReceiver', 'WebhookReceiver', + 'ItsmReceiver', + 'AzureAppPushReceiver', + 'AutomationRunbookReceiver', + 'VoiceReceiver', 'ActionGroupResource', 'EnableRequest', + 'ActionGroupPatchBody', 'ActivityLogAlertLeafCondition', 'ActivityLogAlertAllOfCondition', 'ActivityLogAlertActionGroup', diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py new file mode 100644 index 000000000000..a17c4984ec0c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActionGroupPatchBody(Model): + """An action group object for the body of patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an + action group is not enabled, then none of its actions will be activated. + Default value: True . + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, tags=None, enabled=True): + super(ActionGroupPatchBody, self).__init__() + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py index cdec9c1ab992..4a57003b0446 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py @@ -44,6 +44,20 @@ class ActionGroupResource(Resource): :param webhook_receivers: The list of webhook receivers that are part of this action group. :type webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this + action group. + :type itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that + are part of this action group. + :type azure_app_push_receivers: + list[~azure.mgmt.monitor.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook + receivers that are part of this action group. + :type automation_runbook_receivers: + list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this + action group. + :type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver] """ _validation = { @@ -66,12 +80,20 @@ class ActionGroupResource(Resource): 'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'}, 'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'}, 'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, } - def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None): + def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, voice_receivers=None): super(ActionGroupResource, self).__init__(location=location, tags=tags) self.group_short_name = group_short_name self.enabled = enabled self.email_receivers = email_receivers self.sms_receivers = sms_receivers self.webhook_receivers = webhook_receivers + self.itsm_receivers = itsm_receivers + self.azure_app_push_receivers = azure_app_push_receivers + self.automation_runbook_receivers = automation_runbook_receivers + self.voice_receivers = voice_receivers diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py new file mode 100644 index 000000000000..f9061c65f2d8 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomationRunbookReceiver(Model): + """The Azure Automation Runbook notification receiver. + + :param automation_account_id: The Azure automation account Id which holds + this runbook and authenticate to Azure resource. + :type automation_account_id: str + :param runbook_name: The name for this runbook. + :type runbook_name: str + :param webhook_resource_id: The resource id for webhook linked to this + runbook. + :type webhook_resource_id: str + :param is_global_runbook: Indicates whether this instance is global + runbook. + :type is_global_runbook: bool + :param name: Indicates name of the webhook. + :type name: str + :param service_uri: The URI where webhooks should be sent. + :type service_uri: str + """ + + _validation = { + 'automation_account_id': {'required': True}, + 'runbook_name': {'required': True}, + 'webhook_resource_id': {'required': True}, + 'is_global_runbook': {'required': True}, + } + + _attribute_map = { + 'automation_account_id': {'key': 'automationAccountId', 'type': 'str'}, + 'runbook_name': {'key': 'runbookName', 'type': 'str'}, + 'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'}, + 'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + } + + def __init__(self, automation_account_id, runbook_name, webhook_resource_id, is_global_runbook, name=None, service_uri=None): + super(AutomationRunbookReceiver, self).__init__() + self.automation_account_id = automation_account_id + self.runbook_name = runbook_name + self.webhook_resource_id = webhook_resource_id + self.is_global_runbook = is_global_runbook + self.name = name + self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py new file mode 100644 index 000000000000..6aa6de323552 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureAppPushReceiver(Model): + """The Azure mobile App push notification receiver. + + :param name: The name of the Azure mobile app push receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param email_address: The email address registered for the Azure mobile + app. + :type email_address: str + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__(self, name, email_address): + super(AzureAppPushReceiver, self).__init__() + self.name = name + self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py new file mode 100644 index 000000000000..3d58ce856e98 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ItsmReceiver(Model): + """An Itsm receiver. + + :param name: The name of the Itsm receiver. Names must be unique across + all receivers within an action group. + :type name: str + :param workspace_id: OMS LA instance identifier. + :type workspace_id: str + :param connection_id: Unique identification of ITSM connection among + multiple defined in above workspace. + :type connection_id: str + :param ticket_configuration: JSON blob for the configurations of the ITSM + action. CreateMultipleWorkItems option will be part of this blob as well. + :type ticket_configuration: str + :param region: Region in which workspace resides. Supported + values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' + :type region: str + """ + + _validation = { + 'name': {'required': True}, + 'workspace_id': {'required': True}, + 'connection_id': {'required': True}, + 'ticket_configuration': {'required': True}, + 'region': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, name, workspace_id, connection_id, ticket_configuration, region): + super(ItsmReceiver, self).__init__() + self.name = name + self.workspace_id = workspace_id + self.connection_id = connection_id + self.ticket_configuration = ticket_configuration + self.region = region diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py new file mode 100644 index 000000000000..9cf626334e5f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VoiceReceiver(Model): + """An voice receiver. + + :param name: The name of the voice receiver. Names must be unique across + all receivers within an action group. + :type name: str + :param country_code: The country code of the voice receiver. + :type country_code: str + :param phone_number: The phone number of the voice receiver. + :type phone_number: str + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__(self, name, country_code, phone_number): + super(VoiceReceiver, self).__init__() + self.name = name + self.country_code = country_code + self.phone_number = phone_number diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py index c5f36cef8ec2..8a28773475c3 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py @@ -22,7 +22,7 @@ class ActionGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2018-03-01" self.config = config @@ -86,7 +86,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -148,7 +148,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -207,7 +207,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -216,6 +216,79 @@ def delete( client_raw_response = ClientRawResponse(None, response) return client_raw_response + def update( + self, resource_group_name, action_group_name, tags=None, enabled=True, custom_headers=None, raw=False, **operation_config): + """Updates an existing action group's tags. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an + action group is not enabled, then none of its actions will be + activated. + :type enabled: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ActionGroupResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.monitor.models.ActionGroupResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + action_group_patch = models.ActionGroupPatchBody(tags=tags, enabled=enabled) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(action_group_patch, 'ActionGroupPatchBody') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ActionGroupResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def list_by_subscription_id( self, custom_headers=None, raw=False, **operation_config): """Get a list of all action groups in a subscription. @@ -262,7 +335,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -328,7 +401,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -397,7 +470,7 @@ def enable_receiver( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 409]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py index 6470aa6a6616..fce8f7bf7930 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py @@ -88,7 +88,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -150,7 +150,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -209,7 +209,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -275,7 +275,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -337,7 +337,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -403,7 +403,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py index e72b21ee4edf..b2b1de713994 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py @@ -114,7 +114,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py index dddff0fda043..798ae18eef90 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py @@ -84,7 +84,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -151,7 +151,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py index 6c21e374887c..ba18f034e7f7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py @@ -87,7 +87,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -147,7 +147,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -201,7 +201,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -271,7 +271,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -337,7 +337,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py index 9dbc394c87f5..4eff59b6fde0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py @@ -85,7 +85,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -152,7 +152,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -213,7 +213,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -266,7 +266,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -335,7 +335,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py index 67c681747766..beca15b2ba0c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py @@ -80,7 +80,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -138,7 +138,7 @@ def list( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py index ff7225ba84a3..c21275d54034 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py @@ -79,7 +79,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -145,7 +145,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -203,7 +203,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -254,7 +254,7 @@ def list( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py index 60dbff86df32..705e54c249fe 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py @@ -80,7 +80,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py index d27263edf3d4..cf1a07b5b4da 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py @@ -76,7 +76,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -128,7 +128,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -190,7 +190,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -257,7 +257,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -318,7 +318,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py index 5ca7fa797486..27713fd02100 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py @@ -109,7 +109,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -177,7 +177,7 @@ def calculate_baseline( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py index 1cc457f441ec..d47e351f132b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py @@ -84,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index c99d28565e9e..472c7446cf14 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -126,7 +126,7 @@ def list( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py index a3e92fe2aa5c..134fc2447855 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py @@ -70,7 +70,7 @@ def list( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py index 877255f95c36..f597a94876ce 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py @@ -116,7 +116,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) From 98c65ea05ce87aac839983a56b6adc7342cd56cd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 12 Feb 2018 12:55:08 -0800 Subject: [PATCH 03/12] Generated from 00a5689e14e49f0c822c7e5a9807982ec2ecda45 (#1927) [Monitor] Make all attributes of EventData class readonly (#2254) --- .../azure/mgmt/monitor/models/event_data.py | 179 ++++++++++-------- 1 file changed, 102 insertions(+), 77 deletions(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index e0b9021b3d3e..990e7e16a3d8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -15,62 +15,66 @@ class EventData(Model): """The Azure event log entries are of type EventData. - :param authorization: - :type authorization: ~azure.mgmt.monitor.models.SenderAuthorization - :param claims: key value pairs to identify ARM permissions. - :type claims: dict[str, str] - :param caller: the email address of the user who has performed the + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar authorization: + :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization + :ivar claims: key value pairs to identify ARM permissions. + :vartype claims: dict[str, str] + :ivar caller: the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. - :type caller: str - :param description: the description of the event. - :type description: str - :param id: the Id of this event as required by ARM for RBAC. It contains + :vartype caller: str + :ivar description: the description of the event. + :vartype description: str + :ivar id: the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. - :type id: str - :param event_data_id: the event data Id. This is a unique identifier for - an event. - :type event_data_id: str - :param correlation_id: the correlation Id, usually a GUID in the string + :vartype id: str + :ivar event_data_id: the event data Id. This is a unique identifier for an + event. + :vartype event_data_id: str + :ivar correlation_id: the correlation Id, usually a GUID in the string format. The correlation Id is shared among the events that belong to the same uber operation. - :type correlation_id: str - :param event_name: the event name. This value should not be confused with + :vartype correlation_id: str + :ivar event_name: the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. - :type event_name: ~azure.mgmt.monitor.models.LocalizableString - :param category: the event category. - :type category: ~azure.mgmt.monitor.models.LocalizableString - :param http_request: the HTTP request info. Usually includes the + :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar category: the event category. + :vartype category: ~azure.mgmt.monitor.models.LocalizableString + :ivar http_request: the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - :type http_request: ~azure.mgmt.monitor.models.HttpRequestInfo - :param level: the event level. Possible values include: 'Critical', + :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo + :ivar level: the event level. Possible values include: 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - :type level: str or ~azure.mgmt.monitor.models.EventLevel - :param resource_group_name: the resource group name of the impacted + :vartype level: str or ~azure.mgmt.monitor.models.EventLevel + :ivar resource_group_name: the resource group name of the impacted resource. - :type resource_group_name: str - :param resource_provider_name: the resource provider name of the impacted + :vartype resource_group_name: str + :ivar resource_provider_name: the resource provider name of the impacted resource. - :type resource_provider_name: ~azure.mgmt.monitor.models.LocalizableString - :param resource_id: the resource uri that uniquely identifies the resource + :vartype resource_provider_name: + ~azure.mgmt.monitor.models.LocalizableString + :ivar resource_id: the resource uri that uniquely identifies the resource that caused this event. - :type resource_id: str - :param resource_type: the resource type - :type resource_type: ~azure.mgmt.monitor.models.LocalizableString - :param operation_id: It is usually a GUID shared among the events + :vartype resource_id: str + :ivar resource_type: the resource type + :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString + :ivar operation_id: It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. - :type operation_id: str - :param operation_name: the operation name. - :type operation_name: ~azure.mgmt.monitor.models.LocalizableString - :param properties: the set of pairs (usually a + :vartype operation_id: str + :ivar operation_name: the operation name. + :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar properties: the set of pairs (usually a Dictionary) that includes details about the event. - :type properties: dict[str, str] - :param status: a string describing the status of the operation. Some + :vartype properties: dict[str, str] + :ivar status: a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. - :type status: ~azure.mgmt.monitor.models.LocalizableString - :param sub_status: the event sub status. Most of the time, when included, + :vartype status: ~azure.mgmt.monitor.models.LocalizableString + :ivar sub_status: the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP @@ -78,27 +82,48 @@ class EventData(Model): Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504) - :type sub_status: ~azure.mgmt.monitor.models.LocalizableString - :param event_timestamp: the timestamp of when the event was generated by + :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString + :ivar event_timestamp: the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. - :type event_timestamp: datetime - :param submission_timestamp: the timestamp of when the event became + :vartype event_timestamp: datetime + :ivar submission_timestamp: the timestamp of when the event became available for querying via this API. It is in ISO 8601 format. This value should not be confused eventTimestamp. As there might be a delay between the occurrence time of the event, and the time that the event is submitted to the Azure logging infrastructure. - :type submission_timestamp: datetime - :param subscription_id: the Azure subscription Id usually a GUID. - :type subscription_id: str - :param tenant_id: the Azure tenant Id - :type tenant_id: str + :vartype submission_timestamp: datetime + :ivar subscription_id: the Azure subscription Id usually a GUID. + :vartype subscription_id: str + :ivar tenant_id: the Azure tenant Id + :vartype tenant_id: str """ _validation = { - 'level': {'required': True}, - 'event_timestamp': {'required': True}, - 'submission_timestamp': {'required': True}, + 'authorization': {'readonly': True}, + 'claims': {'readonly': True}, + 'caller': {'readonly': True}, + 'description': {'readonly': True}, + 'id': {'readonly': True}, + 'event_data_id': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'event_name': {'readonly': True}, + 'category': {'readonly': True}, + 'http_request': {'readonly': True}, + 'level': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_provider_name': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'operation_name': {'readonly': True}, + 'properties': {'readonly': True}, + 'status': {'readonly': True}, + 'sub_status': {'readonly': True}, + 'event_timestamp': {'readonly': True}, + 'submission_timestamp': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, } _attribute_map = { @@ -128,29 +153,29 @@ class EventData(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, level, event_timestamp, submission_timestamp, authorization=None, claims=None, caller=None, description=None, id=None, event_data_id=None, correlation_id=None, event_name=None, category=None, http_request=None, resource_group_name=None, resource_provider_name=None, resource_id=None, resource_type=None, operation_id=None, operation_name=None, properties=None, status=None, sub_status=None, subscription_id=None, tenant_id=None): + def __init__(self): super(EventData, self).__init__() - self.authorization = authorization - self.claims = claims - self.caller = caller - self.description = description - self.id = id - self.event_data_id = event_data_id - self.correlation_id = correlation_id - self.event_name = event_name - self.category = category - self.http_request = http_request - self.level = level - self.resource_group_name = resource_group_name - self.resource_provider_name = resource_provider_name - self.resource_id = resource_id - self.resource_type = resource_type - self.operation_id = operation_id - self.operation_name = operation_name - self.properties = properties - self.status = status - self.sub_status = sub_status - self.event_timestamp = event_timestamp - self.submission_timestamp = submission_timestamp - self.subscription_id = subscription_id - self.tenant_id = tenant_id + self.authorization = None + self.claims = None + self.caller = None + self.description = None + self.id = None + self.event_data_id = None + self.correlation_id = None + self.event_name = None + self.category = None + self.http_request = None + self.level = None + self.resource_group_name = None + self.resource_provider_name = None + self.resource_id = None + self.resource_type = None + self.operation_id = None + self.operation_name = None + self.properties = None + self.status = None + self.sub_status = None + self.event_timestamp = None + self.submission_timestamp = None + self.subscription_id = None + self.tenant_id = None From d017994a0a0c46dc8e05d96e660adb5262637164 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Feb 2018 21:33:11 +0000 Subject: [PATCH 04/12] Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/1931 --- .../operations/action_groups_operations.py | 23 ++++++++++++------- .../activity_log_alerts_operations.py | 20 ++++++++++------ .../operations/activity_logs_operations.py | 5 ++-- .../alert_rule_incidents_operations.py | 8 ++++--- .../operations/alert_rules_operations.py | 17 +++++++++----- .../autoscale_settings_operations.py | 17 +++++++++----- ...diagnostic_settings_category_operations.py | 8 ++++--- .../diagnostic_settings_operations.py | 14 +++++++---- .../operations/event_categories_operations.py | 5 ++-- .../operations/log_profiles_operations.py | 17 +++++++++----- .../operations/metric_baseline_operations.py | 8 ++++--- .../metric_definitions_operations.py | 5 ++-- .../monitor/operations/metrics_operations.py | 5 ++-- .../mgmt/monitor/operations/operations.py | 5 ++-- .../tenant_activity_logs_operations.py | 5 ++-- .../azure/mgmt/monitor/version.py | 2 +- 16 files changed, 104 insertions(+), 60 deletions(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py index 8a28773475c3..01d36f0735cf 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py @@ -21,7 +21,7 @@ class ActionGroupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ @@ -58,7 +58,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), @@ -103,6 +103,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'} def get( self, resource_group_name, action_group_name, custom_headers=None, raw=False, **operation_config): @@ -124,7 +125,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), @@ -163,6 +164,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'} def delete( self, resource_group_name, action_group_name, custom_headers=None, raw=False, **operation_config): @@ -183,7 +185,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), @@ -215,6 +217,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'} def update( self, resource_group_name, action_group_name, tags=None, enabled=True, custom_headers=None, raw=False, **operation_config): @@ -245,7 +248,7 @@ def update( action_group_patch = models.ActionGroupPatchBody(tags=tags, enabled=enabled) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -288,6 +291,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'} def list_by_subscription_id( self, custom_headers=None, raw=False, **operation_config): @@ -308,7 +312,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups' + url = self.list_by_subscription_id.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -351,6 +355,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -373,7 +378,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -417,6 +422,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups'} def enable_receiver( self, resource_group_name, action_group_name, receiver_name, custom_headers=None, raw=False, **operation_config): @@ -442,7 +448,7 @@ def enable_receiver( enable_request = models.EnableRequest(receiver_name=receiver_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe' + url = self.enable_receiver.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), @@ -478,3 +484,4 @@ def enable_receiver( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable_receiver.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py index fce8f7bf7930..0aaf7dd13957 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_log_alerts_operations.py @@ -21,7 +21,7 @@ class ActivityLogAlertsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ @@ -60,7 +60,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -105,6 +105,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'} def get( self, resource_group_name, activity_log_alert_name, custom_headers=None, raw=False, **operation_config): @@ -126,7 +127,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -165,6 +166,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'} def delete( self, resource_group_name, activity_log_alert_name, custom_headers=None, raw=False, **operation_config): @@ -185,7 +187,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -217,6 +219,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'} def update( self, resource_group_name, activity_log_alert_name, tags=None, enabled=True, custom_headers=None, raw=False, **operation_config): @@ -247,7 +250,7 @@ def update( activity_log_alert_patch = models.ActivityLogAlertPatchBody(tags=tags, enabled=enabled) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -290,6 +293,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}'} def list_by_subscription_id( self, custom_headers=None, raw=False, **operation_config): @@ -310,7 +314,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts' + url = self.list_by_subscription_id.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -353,6 +357,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -375,7 +380,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -419,3 +424,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py index b2b1de713994..80be5ac874ae 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/activity_logs_operations.py @@ -21,7 +21,7 @@ class ActivityLogsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ @@ -83,7 +83,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -130,3 +130,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py index 798ae18eef90..7c2795a91d2c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py @@ -22,7 +22,7 @@ class AlertRuleIncidentsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ @@ -59,7 +59,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), @@ -99,6 +99,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}'} def list_by_alert_rule( self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): @@ -122,7 +123,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents' + url = self.list_by_alert_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), @@ -169,3 +170,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_alert_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py index ba18f034e7f7..593948b4b5d8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/alert_rules_operations.py @@ -22,7 +22,7 @@ class AlertRulesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ @@ -59,7 +59,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), @@ -104,6 +104,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} def delete( self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): @@ -123,7 +124,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), @@ -157,6 +158,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} def get( self, resource_group_name, rule_name, custom_headers=None, raw=False, **operation_config): @@ -177,7 +179,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), @@ -218,6 +220,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} def update( self, resource_group_name, rule_name, alert_rules_resource, custom_headers=None, raw=False, **operation_config): @@ -243,7 +246,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -288,6 +291,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -309,7 +313,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -355,3 +359,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py index 4eff59b6fde0..2d4163d0a8c0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/autoscale_settings_operations.py @@ -21,7 +21,7 @@ class AutoscaleSettingsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ @@ -57,7 +57,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -101,6 +101,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings'} def create_or_update( self, resource_group_name, autoscale_setting_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -124,7 +125,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), @@ -169,6 +170,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} def delete( self, resource_group_name, autoscale_setting_name, custom_headers=None, raw=False, **operation_config): @@ -189,7 +191,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), @@ -221,6 +223,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} def get( self, resource_group_name, autoscale_setting_name, custom_headers=None, raw=False, **operation_config): @@ -242,7 +245,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), @@ -281,6 +284,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} def update( self, resource_group_name, autoscale_setting_name, autoscale_setting_resource, custom_headers=None, raw=False, **operation_config): @@ -307,7 +311,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -350,3 +354,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py index beca15b2ba0c..513c8b42319b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_category_operations.py @@ -21,7 +21,7 @@ class DiagnosticSettingsCategoryOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ @@ -57,7 +57,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str') @@ -95,6 +95,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}'} def list( self, resource_uri, custom_headers=None, raw=False, **operation_config): @@ -116,7 +117,7 @@ def list( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories' + url = self.list.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) } @@ -153,3 +154,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py index c21275d54034..3b4877132de5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/diagnostic_settings_operations.py @@ -21,7 +21,7 @@ class DiagnosticSettingsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ @@ -56,7 +56,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str') @@ -94,6 +94,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} def create_or_update( self, resource_uri, parameters, name, custom_headers=None, raw=False, **operation_config): @@ -118,7 +119,7 @@ def create_or_update( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str') @@ -160,6 +161,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} def delete( self, resource_uri, name, custom_headers=None, raw=False, **operation_config): @@ -180,7 +182,7 @@ def delete( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), 'name': self._serialize.url("name", name, 'str') @@ -211,6 +213,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} def list( self, resource_uri, custom_headers=None, raw=False, **operation_config): @@ -232,7 +235,7 @@ def list( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/diagnosticSettings' + url = self.list.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) } @@ -269,3 +272,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py index 705e54c249fe..27decf32205f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/event_categories_operations.py @@ -21,7 +21,7 @@ class EventCategoriesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ @@ -57,7 +57,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/microsoft.insights/eventcategories' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/microsoft.insights/eventcategories'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py index cf1a07b5b4da..7f63519373ad 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/log_profiles_operations.py @@ -22,7 +22,7 @@ class LogProfilesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-03-01". """ @@ -53,7 +53,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}' + url = self.delete.metadata['url'] path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -86,6 +86,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} def get( self, log_profile_name, custom_headers=None, raw=False, **operation_config): @@ -105,7 +106,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}' + url = self.get.metadata['url'] path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -143,6 +144,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} def create_or_update( self, log_profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -163,7 +165,7 @@ def create_or_update( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -207,6 +209,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} def update( self, log_profile_name, log_profiles_resource, custom_headers=None, raw=False, **operation_config): @@ -230,7 +233,7 @@ def update( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str') @@ -272,6 +275,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -291,7 +295,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -336,3 +340,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py index 27713fd02100..e324b95d16e7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_baseline_operations.py @@ -21,7 +21,7 @@ class MetricBaselineOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-11-01-preview". """ @@ -76,7 +76,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), 'metricName': self._serialize.url("metric_name", metric_name, 'str') @@ -124,6 +124,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}'} def calculate_baseline( self, resource_uri, time_series_information, custom_headers=None, raw=False, **operation_config): @@ -151,7 +152,7 @@ def calculate_baseline( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/calculatebaseline' + url = self.calculate_baseline.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) } @@ -192,3 +193,4 @@ def calculate_baseline( return client_raw_response return deserialized + calculate_baseline.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/calculatebaseline'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py index d47e351f132b..a2f5e5694fe2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py @@ -21,7 +21,7 @@ class MetricDefinitionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ @@ -57,7 +57,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/metricDefinitions' + url = self.list.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) } @@ -100,3 +100,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metricDefinitions'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index 472c7446cf14..e7779d026c28 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -21,7 +21,7 @@ class MetricsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". """ @@ -88,7 +88,7 @@ def list( :class:`ErrorResponseException` """ # Construct URL - url = '/{resourceUri}/providers/microsoft.insights/metrics' + url = self.list.metadata['url'] path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True) } @@ -141,3 +141,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metrics'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py index 134fc2447855..db6ee418bb9b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ @@ -52,7 +52,7 @@ def list( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/microsoft.insights/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -87,3 +87,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/providers/microsoft.insights/operations'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py index f597a94876ce..ead85d629064 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/tenant_activity_logs_operations.py @@ -21,7 +21,7 @@ class TenantActivityLogsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-04-01". """ @@ -89,7 +89,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/microsoft.insights/eventtypes/management/values' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -132,3 +132,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/microsoft.insights/eventtypes/management/values'} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/version.py b/azure-mgmt-monitor/azure/mgmt/monitor/version.py index 266f5a486d79..53a203f32aaf 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/version.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.0" +VERSION = "" From deb50ba260c910168cf214b9ea92bb5c5212d667 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 16 Feb 2018 14:52:28 -0800 Subject: [PATCH 05/12] Generated from eabf2683eee832655c5e028aa1f3501a6113780b (#2009) Update monitor Py conf --- azure-mgmt-monitor/azure/mgmt/monitor/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/version.py b/azure-mgmt-monitor/azure/mgmt/monitor/version.py index 53a203f32aaf..266f5a486d79 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/version.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "" +VERSION = "0.5.0" From d27e72fdd0524c2d2a07e710d16512f54f998cac Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Feb 2018 10:07:52 -0800 Subject: [PATCH 06/12] [AutoPR monitor/resource-manager] [DO NOT MERGE, until feb 20] Adding 2018-01-01 version for metrics API (#2007) * Generated from 25392731dd0415e1e5700412428dd5a96a2d7813 Fix PR comments 1 * Generated from f6739fd0e07e3d040fc0b1f47f3297a7a4a69cba Fixing top/orderby names, Please be reminded, there is no code change, it's just a typo of the names. * Generated from 8ddf699be2bc7bd7a429b97db29d4abb3f238cad Fix meta data sample as well. --- .../azure/mgmt/monitor/models/__init__.py | 2 - .../monitor/models/action_group_resource.py | 7 +- .../azure/mgmt/monitor/models/event_data.py | 179 ++++++++---------- .../mgmt/monitor/models/metric_definition.py | 12 +- .../azure/mgmt/monitor/models/response.py | 11 +- .../mgmt/monitor/models/voice_receiver.py | 43 ----- .../mgmt/monitor/monitor_management_client.py | 11 +- .../operations/action_groups_operations.py | 4 +- .../metric_definitions_operations.py | 6 +- .../monitor/operations/metrics_operations.py | 10 +- 10 files changed, 119 insertions(+), 166 deletions(-) delete mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index 2222f1bc6a4b..8f9add947966 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -58,7 +58,6 @@ from .itsm_receiver import ItsmReceiver from .azure_app_push_receiver import AzureAppPushReceiver from .automation_runbook_receiver import AutomationRunbookReceiver -from .voice_receiver import VoiceReceiver from .action_group_resource import ActionGroupResource from .enable_request import EnableRequest from .action_group_patch_body import ActionGroupPatchBody @@ -161,7 +160,6 @@ 'ItsmReceiver', 'AzureAppPushReceiver', 'AutomationRunbookReceiver', - 'VoiceReceiver', 'ActionGroupResource', 'EnableRequest', 'ActionGroupPatchBody', diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py index 4a57003b0446..9d4b8d20865e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py @@ -55,9 +55,6 @@ class ActionGroupResource(Resource): receivers that are part of this action group. :type automation_runbook_receivers: list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] - :param voice_receivers: The list of voice receivers that are part of this - action group. - :type voice_receivers: list[~azure.mgmt.monitor.models.VoiceReceiver] """ _validation = { @@ -83,10 +80,9 @@ class ActionGroupResource(Resource): 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, - 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, } - def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, voice_receivers=None): + def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None): super(ActionGroupResource, self).__init__(location=location, tags=tags) self.group_short_name = group_short_name self.enabled = enabled @@ -96,4 +92,3 @@ def __init__(self, location, group_short_name, tags=None, enabled=True, email_re self.itsm_receivers = itsm_receivers self.azure_app_push_receivers = azure_app_push_receivers self.automation_runbook_receivers = automation_runbook_receivers - self.voice_receivers = voice_receivers diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index 990e7e16a3d8..e0b9021b3d3e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -15,66 +15,62 @@ class EventData(Model): """The Azure event log entries are of type EventData. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar authorization: - :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization - :ivar claims: key value pairs to identify ARM permissions. - :vartype claims: dict[str, str] - :ivar caller: the email address of the user who has performed the + :param authorization: + :type authorization: ~azure.mgmt.monitor.models.SenderAuthorization + :param claims: key value pairs to identify ARM permissions. + :type claims: dict[str, str] + :param caller: the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. - :vartype caller: str - :ivar description: the description of the event. - :vartype description: str - :ivar id: the Id of this event as required by ARM for RBAC. It contains + :type caller: str + :param description: the description of the event. + :type description: str + :param id: the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. - :vartype id: str - :ivar event_data_id: the event data Id. This is a unique identifier for an - event. - :vartype event_data_id: str - :ivar correlation_id: the correlation Id, usually a GUID in the string + :type id: str + :param event_data_id: the event data Id. This is a unique identifier for + an event. + :type event_data_id: str + :param correlation_id: the correlation Id, usually a GUID in the string format. The correlation Id is shared among the events that belong to the same uber operation. - :vartype correlation_id: str - :ivar event_name: the event name. This value should not be confused with + :type correlation_id: str + :param event_name: the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. - :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString - :ivar category: the event category. - :vartype category: ~azure.mgmt.monitor.models.LocalizableString - :ivar http_request: the HTTP request info. Usually includes the + :type event_name: ~azure.mgmt.monitor.models.LocalizableString + :param category: the event category. + :type category: ~azure.mgmt.monitor.models.LocalizableString + :param http_request: the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo - :ivar level: the event level. Possible values include: 'Critical', + :type http_request: ~azure.mgmt.monitor.models.HttpRequestInfo + :param level: the event level. Possible values include: 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - :vartype level: str or ~azure.mgmt.monitor.models.EventLevel - :ivar resource_group_name: the resource group name of the impacted + :type level: str or ~azure.mgmt.monitor.models.EventLevel + :param resource_group_name: the resource group name of the impacted resource. - :vartype resource_group_name: str - :ivar resource_provider_name: the resource provider name of the impacted + :type resource_group_name: str + :param resource_provider_name: the resource provider name of the impacted resource. - :vartype resource_provider_name: - ~azure.mgmt.monitor.models.LocalizableString - :ivar resource_id: the resource uri that uniquely identifies the resource + :type resource_provider_name: ~azure.mgmt.monitor.models.LocalizableString + :param resource_id: the resource uri that uniquely identifies the resource that caused this event. - :vartype resource_id: str - :ivar resource_type: the resource type - :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString - :ivar operation_id: It is usually a GUID shared among the events + :type resource_id: str + :param resource_type: the resource type + :type resource_type: ~azure.mgmt.monitor.models.LocalizableString + :param operation_id: It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. - :vartype operation_id: str - :ivar operation_name: the operation name. - :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString - :ivar properties: the set of pairs (usually a + :type operation_id: str + :param operation_name: the operation name. + :type operation_name: ~azure.mgmt.monitor.models.LocalizableString + :param properties: the set of pairs (usually a Dictionary) that includes details about the event. - :vartype properties: dict[str, str] - :ivar status: a string describing the status of the operation. Some + :type properties: dict[str, str] + :param status: a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. - :vartype status: ~azure.mgmt.monitor.models.LocalizableString - :ivar sub_status: the event sub status. Most of the time, when included, + :type status: ~azure.mgmt.monitor.models.LocalizableString + :param sub_status: the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP @@ -82,48 +78,27 @@ class EventData(Model): Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504) - :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString - :ivar event_timestamp: the timestamp of when the event was generated by + :type sub_status: ~azure.mgmt.monitor.models.LocalizableString + :param event_timestamp: the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. - :vartype event_timestamp: datetime - :ivar submission_timestamp: the timestamp of when the event became + :type event_timestamp: datetime + :param submission_timestamp: the timestamp of when the event became available for querying via this API. It is in ISO 8601 format. This value should not be confused eventTimestamp. As there might be a delay between the occurrence time of the event, and the time that the event is submitted to the Azure logging infrastructure. - :vartype submission_timestamp: datetime - :ivar subscription_id: the Azure subscription Id usually a GUID. - :vartype subscription_id: str - :ivar tenant_id: the Azure tenant Id - :vartype tenant_id: str + :type submission_timestamp: datetime + :param subscription_id: the Azure subscription Id usually a GUID. + :type subscription_id: str + :param tenant_id: the Azure tenant Id + :type tenant_id: str """ _validation = { - 'authorization': {'readonly': True}, - 'claims': {'readonly': True}, - 'caller': {'readonly': True}, - 'description': {'readonly': True}, - 'id': {'readonly': True}, - 'event_data_id': {'readonly': True}, - 'correlation_id': {'readonly': True}, - 'event_name': {'readonly': True}, - 'category': {'readonly': True}, - 'http_request': {'readonly': True}, - 'level': {'readonly': True}, - 'resource_group_name': {'readonly': True}, - 'resource_provider_name': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'resource_type': {'readonly': True}, - 'operation_id': {'readonly': True}, - 'operation_name': {'readonly': True}, - 'properties': {'readonly': True}, - 'status': {'readonly': True}, - 'sub_status': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'submission_timestamp': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + 'level': {'required': True}, + 'event_timestamp': {'required': True}, + 'submission_timestamp': {'required': True}, } _attribute_map = { @@ -153,29 +128,29 @@ class EventData(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self): + def __init__(self, level, event_timestamp, submission_timestamp, authorization=None, claims=None, caller=None, description=None, id=None, event_data_id=None, correlation_id=None, event_name=None, category=None, http_request=None, resource_group_name=None, resource_provider_name=None, resource_id=None, resource_type=None, operation_id=None, operation_name=None, properties=None, status=None, sub_status=None, subscription_id=None, tenant_id=None): super(EventData, self).__init__() - self.authorization = None - self.claims = None - self.caller = None - self.description = None - self.id = None - self.event_data_id = None - self.correlation_id = None - self.event_name = None - self.category = None - self.http_request = None - self.level = None - self.resource_group_name = None - self.resource_provider_name = None - self.resource_id = None - self.resource_type = None - self.operation_id = None - self.operation_name = None - self.properties = None - self.status = None - self.sub_status = None - self.event_timestamp = None - self.submission_timestamp = None - self.subscription_id = None - self.tenant_id = None + self.authorization = authorization + self.claims = claims + self.caller = caller + self.description = description + self.id = id + self.event_data_id = event_data_id + self.correlation_id = correlation_id + self.event_name = event_name + self.category = category + self.http_request = http_request + self.level = level + self.resource_group_name = resource_group_name + self.resource_provider_name = resource_provider_name + self.resource_id = resource_id + self.resource_type = resource_type + self.operation_id = operation_id + self.operation_name = operation_name + self.properties = properties + self.status = status + self.sub_status = sub_status + self.event_timestamp = event_timestamp + self.submission_timestamp = submission_timestamp + self.subscription_id = subscription_id + self.tenant_id = tenant_id diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py index 95c436ba5818..321a5a0781f2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py @@ -21,6 +21,8 @@ class MetricDefinition(Model): :param resource_id: the resource identifier of the resource that emitted the metric. :type resource_id: str + :param namespace: the namespace the metric blongs to. + :type namespace: str :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~azure.mgmt.monitor.models.LocalizableString @@ -33,6 +35,10 @@ class MetricDefinition(Model): 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' :type primary_aggregation_type: str or ~azure.mgmt.monitor.models.AggregationType + :param supported_aggregation_types: the collection of what aggregation + types are supported. + :type supported_aggregation_types: list[str or + ~azure.mgmt.monitor.models.AggregationType] :param metric_availabilities: the collection of what aggregation intervals are available to be queried. :type metric_availabilities: @@ -47,21 +53,25 @@ class MetricDefinition(Model): _attribute_map = { 'is_dimension_required': {'key': 'isDimensionRequired', 'type': 'bool'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, 'unit': {'key': 'unit', 'type': 'Unit'}, 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'AggregationType'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[AggregationType]'}, 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, 'id': {'key': 'id', 'type': 'str'}, 'dimensions': {'key': 'dimensions', 'type': '[LocalizableString]'}, } - def __init__(self, is_dimension_required=None, resource_id=None, name=None, unit=None, primary_aggregation_type=None, metric_availabilities=None, id=None, dimensions=None): + def __init__(self, is_dimension_required=None, resource_id=None, namespace=None, name=None, unit=None, primary_aggregation_type=None, supported_aggregation_types=None, metric_availabilities=None, id=None, dimensions=None): super(MetricDefinition, self).__init__() self.is_dimension_required = is_dimension_required self.resource_id = resource_id + self.namespace = namespace self.name = name self.unit = unit self.primary_aggregation_type = primary_aggregation_type + self.supported_aggregation_types = supported_aggregation_types self.metric_availabilities = metric_availabilities self.id = id self.dimensions = dimensions diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py index 36b9b4dfe381..3f62025c3d5a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py @@ -28,6 +28,11 @@ class Response(Model): what was originally requested. This is not present if a metadata request was made. :type interval: timedelta + :param namespace: The namespace of the metrics been queried + :type namespace: str + :param resourceregion: The region of the resource been queried for + metrics. + :type resourceregion: str :param value: the value of the collection. :type value: list[~azure.mgmt.monitor.models.Metric] """ @@ -42,12 +47,16 @@ class Response(Model): 'cost': {'key': 'cost', 'type': 'float'}, 'timespan': {'key': 'timespan', 'type': 'str'}, 'interval': {'key': 'interval', 'type': 'duration'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'resourceregion': {'key': 'resourceregion', 'type': 'str'}, 'value': {'key': 'value', 'type': '[Metric]'}, } - def __init__(self, timespan, value, cost=None, interval=None): + def __init__(self, timespan, value, cost=None, interval=None, namespace=None, resourceregion=None): super(Response, self).__init__() self.cost = cost self.timespan = timespan self.interval = interval + self.namespace = namespace + self.resourceregion = resourceregion self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py deleted file mode 100644 index 9cf626334e5f..000000000000 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/voice_receiver.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VoiceReceiver(Model): - """An voice receiver. - - :param name: The name of the voice receiver. Names must be unique across - all receivers within an action group. - :type name: str - :param country_code: The country code of the voice receiver. - :type country_code: str - :param phone_number: The phone number of the voice receiver. - :type phone_number: str - """ - - _validation = { - 'name': {'required': True}, - 'country_code': {'required': True}, - 'phone_number': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'country_code': {'key': 'countryCode', 'type': 'str'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - } - - def __init__(self, name, country_code, phone_number): - super(VoiceReceiver, self).__init__() - self.name = name - self.country_code = country_code - self.phone_number = phone_number diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py index 8ba664998175..518a1bccefdf 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py @@ -41,11 +41,13 @@ class MonitorManagementClientConfiguration(AzureConfiguration): object` :param subscription_id: The Azure subscription Id. :type subscription_id: str + :param metricnamespace: Metric namespace to query metric definitions for. + :type metricnamespace: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, metricnamespace=None, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") @@ -61,6 +63,7 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.metricnamespace = metricnamespace class MonitorManagementClient(object): @@ -105,13 +108,15 @@ class MonitorManagementClient(object): object` :param subscription_id: The Azure subscription Id. :type subscription_id: str + :param metricnamespace: Metric namespace to query metric definitions for. + :type metricnamespace: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, metricnamespace=None, base_url=None): - self.config = MonitorManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = MonitorManagementClientConfiguration(credentials, subscription_id, metricnamespace, base_url) self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py index 01d36f0735cf..88fd6c92ff0f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/action_groups_operations.py @@ -22,7 +22,7 @@ class ActionGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2017-04-01" self.config = config diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py index a2f5e5694fe2..19b4ba3c84d4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py @@ -22,7 +22,7 @@ class MetricDefinitionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2018-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01-preview" + self.api_version = "2018-01-01" self.config = config @@ -66,6 +66,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if self.config.metricnamespace is not None: + query_parameters['metricnamespace'] = self._serialize.query("self.config.metricnamespace", self.config.metricnamespace, 'str') else: url = next_link diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index e7779d026c28..2ad03c03eaa1 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -22,7 +22,7 @@ class MetricsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01-preview". + :ivar api_version: Client Api Version. Constant value: "2018-01-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01-preview" + self.api_version = "2018-01-01" self.config = config @@ -105,14 +105,16 @@ def list( if aggregation is not None: query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'float') + query_parameters['top'] = self._serialize.query("top", top, 'float') if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') if filter is not None: query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if result_type is not None: query_parameters['resultType'] = self._serialize.query("result_type", result_type, 'ResultType') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if self.config.metricnamespace is not None: + query_parameters['metricnamespace'] = self._serialize.query("self.config.metricnamespace", self.config.metricnamespace, 'str') # Construct headers header_parameters = {} From 6de632206753e28864ba7d59905015e84510dc2f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 1 Mar 2018 07:59:24 -0800 Subject: [PATCH 07/12] Generated from 067e5a9fee3acee4afed33296cadde18b73a3f1c (#2080) [Monitor] Fixing issue with metricnamespace specification as client level argument #2565 --- .../azure/mgmt/monitor/models/event_data.py | 179 ++++++++++-------- .../mgmt/monitor/monitor_management_client.py | 11 +- .../metric_definitions_operations.py | 9 +- .../monitor/operations/metrics_operations.py | 9 +- 4 files changed, 117 insertions(+), 91 deletions(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index e0b9021b3d3e..990e7e16a3d8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -15,62 +15,66 @@ class EventData(Model): """The Azure event log entries are of type EventData. - :param authorization: - :type authorization: ~azure.mgmt.monitor.models.SenderAuthorization - :param claims: key value pairs to identify ARM permissions. - :type claims: dict[str, str] - :param caller: the email address of the user who has performed the + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar authorization: + :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization + :ivar claims: key value pairs to identify ARM permissions. + :vartype claims: dict[str, str] + :ivar caller: the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. - :type caller: str - :param description: the description of the event. - :type description: str - :param id: the Id of this event as required by ARM for RBAC. It contains + :vartype caller: str + :ivar description: the description of the event. + :vartype description: str + :ivar id: the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. - :type id: str - :param event_data_id: the event data Id. This is a unique identifier for - an event. - :type event_data_id: str - :param correlation_id: the correlation Id, usually a GUID in the string + :vartype id: str + :ivar event_data_id: the event data Id. This is a unique identifier for an + event. + :vartype event_data_id: str + :ivar correlation_id: the correlation Id, usually a GUID in the string format. The correlation Id is shared among the events that belong to the same uber operation. - :type correlation_id: str - :param event_name: the event name. This value should not be confused with + :vartype correlation_id: str + :ivar event_name: the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. - :type event_name: ~azure.mgmt.monitor.models.LocalizableString - :param category: the event category. - :type category: ~azure.mgmt.monitor.models.LocalizableString - :param http_request: the HTTP request info. Usually includes the + :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar category: the event category. + :vartype category: ~azure.mgmt.monitor.models.LocalizableString + :ivar http_request: the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - :type http_request: ~azure.mgmt.monitor.models.HttpRequestInfo - :param level: the event level. Possible values include: 'Critical', + :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo + :ivar level: the event level. Possible values include: 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - :type level: str or ~azure.mgmt.monitor.models.EventLevel - :param resource_group_name: the resource group name of the impacted + :vartype level: str or ~azure.mgmt.monitor.models.EventLevel + :ivar resource_group_name: the resource group name of the impacted resource. - :type resource_group_name: str - :param resource_provider_name: the resource provider name of the impacted + :vartype resource_group_name: str + :ivar resource_provider_name: the resource provider name of the impacted resource. - :type resource_provider_name: ~azure.mgmt.monitor.models.LocalizableString - :param resource_id: the resource uri that uniquely identifies the resource + :vartype resource_provider_name: + ~azure.mgmt.monitor.models.LocalizableString + :ivar resource_id: the resource uri that uniquely identifies the resource that caused this event. - :type resource_id: str - :param resource_type: the resource type - :type resource_type: ~azure.mgmt.monitor.models.LocalizableString - :param operation_id: It is usually a GUID shared among the events + :vartype resource_id: str + :ivar resource_type: the resource type + :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString + :ivar operation_id: It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. - :type operation_id: str - :param operation_name: the operation name. - :type operation_name: ~azure.mgmt.monitor.models.LocalizableString - :param properties: the set of pairs (usually a + :vartype operation_id: str + :ivar operation_name: the operation name. + :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar properties: the set of pairs (usually a Dictionary) that includes details about the event. - :type properties: dict[str, str] - :param status: a string describing the status of the operation. Some + :vartype properties: dict[str, str] + :ivar status: a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. - :type status: ~azure.mgmt.monitor.models.LocalizableString - :param sub_status: the event sub status. Most of the time, when included, + :vartype status: ~azure.mgmt.monitor.models.LocalizableString + :ivar sub_status: the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP @@ -78,27 +82,48 @@ class EventData(Model): Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504) - :type sub_status: ~azure.mgmt.monitor.models.LocalizableString - :param event_timestamp: the timestamp of when the event was generated by + :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString + :ivar event_timestamp: the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. - :type event_timestamp: datetime - :param submission_timestamp: the timestamp of when the event became + :vartype event_timestamp: datetime + :ivar submission_timestamp: the timestamp of when the event became available for querying via this API. It is in ISO 8601 format. This value should not be confused eventTimestamp. As there might be a delay between the occurrence time of the event, and the time that the event is submitted to the Azure logging infrastructure. - :type submission_timestamp: datetime - :param subscription_id: the Azure subscription Id usually a GUID. - :type subscription_id: str - :param tenant_id: the Azure tenant Id - :type tenant_id: str + :vartype submission_timestamp: datetime + :ivar subscription_id: the Azure subscription Id usually a GUID. + :vartype subscription_id: str + :ivar tenant_id: the Azure tenant Id + :vartype tenant_id: str """ _validation = { - 'level': {'required': True}, - 'event_timestamp': {'required': True}, - 'submission_timestamp': {'required': True}, + 'authorization': {'readonly': True}, + 'claims': {'readonly': True}, + 'caller': {'readonly': True}, + 'description': {'readonly': True}, + 'id': {'readonly': True}, + 'event_data_id': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'event_name': {'readonly': True}, + 'category': {'readonly': True}, + 'http_request': {'readonly': True}, + 'level': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_provider_name': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'operation_name': {'readonly': True}, + 'properties': {'readonly': True}, + 'status': {'readonly': True}, + 'sub_status': {'readonly': True}, + 'event_timestamp': {'readonly': True}, + 'submission_timestamp': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, } _attribute_map = { @@ -128,29 +153,29 @@ class EventData(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, level, event_timestamp, submission_timestamp, authorization=None, claims=None, caller=None, description=None, id=None, event_data_id=None, correlation_id=None, event_name=None, category=None, http_request=None, resource_group_name=None, resource_provider_name=None, resource_id=None, resource_type=None, operation_id=None, operation_name=None, properties=None, status=None, sub_status=None, subscription_id=None, tenant_id=None): + def __init__(self): super(EventData, self).__init__() - self.authorization = authorization - self.claims = claims - self.caller = caller - self.description = description - self.id = id - self.event_data_id = event_data_id - self.correlation_id = correlation_id - self.event_name = event_name - self.category = category - self.http_request = http_request - self.level = level - self.resource_group_name = resource_group_name - self.resource_provider_name = resource_provider_name - self.resource_id = resource_id - self.resource_type = resource_type - self.operation_id = operation_id - self.operation_name = operation_name - self.properties = properties - self.status = status - self.sub_status = sub_status - self.event_timestamp = event_timestamp - self.submission_timestamp = submission_timestamp - self.subscription_id = subscription_id - self.tenant_id = tenant_id + self.authorization = None + self.claims = None + self.caller = None + self.description = None + self.id = None + self.event_data_id = None + self.correlation_id = None + self.event_name = None + self.category = None + self.http_request = None + self.level = None + self.resource_group_name = None + self.resource_provider_name = None + self.resource_id = None + self.resource_type = None + self.operation_id = None + self.operation_name = None + self.properties = None + self.status = None + self.sub_status = None + self.event_timestamp = None + self.submission_timestamp = None + self.subscription_id = None + self.tenant_id = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py index 518a1bccefdf..8ba664998175 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/monitor_management_client.py @@ -41,13 +41,11 @@ class MonitorManagementClientConfiguration(AzureConfiguration): object` :param subscription_id: The Azure subscription Id. :type subscription_id: str - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, metricnamespace=None, base_url=None): + self, credentials, subscription_id, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") @@ -63,7 +61,6 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id - self.metricnamespace = metricnamespace class MonitorManagementClient(object): @@ -108,15 +105,13 @@ class MonitorManagementClient(object): object` :param subscription_id: The Azure subscription Id. :type subscription_id: str - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, metricnamespace=None, base_url=None): + self, credentials, subscription_id, base_url=None): - self.config = MonitorManagementClientConfiguration(credentials, subscription_id, metricnamespace, base_url) + self.config = MonitorManagementClientConfiguration(credentials, subscription_id, base_url) self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py index 19b4ba3c84d4..ddd2271eb4ed 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metric_definitions_operations.py @@ -37,11 +37,14 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, resource_uri, custom_headers=None, raw=False, **operation_config): + self, resource_uri, metricnamespace=None, custom_headers=None, raw=False, **operation_config): """Lists the metric definitions for the resource. :param resource_uri: The identifier of the resource. :type resource_uri: str + :param metricnamespace: Metric namespace to query metric definitions + for. + :type metricnamespace: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -66,8 +69,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if self.config.metricnamespace is not None: - query_parameters['metricnamespace'] = self._serialize.query("self.config.metricnamespace", self.config.metricnamespace, 'str') + if metricnamespace is not None: + query_parameters['metricnamespace'] = self._serialize.query("metricnamespace", metricnamespace, 'str') else: url = next_link diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index 2ad03c03eaa1..c49259284593 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, resource_uri, timespan=None, interval=None, metric=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, custom_headers=None, raw=False, **operation_config): + self, resource_uri, timespan=None, interval=None, metric=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, metricnamespace=None, custom_headers=None, raw=False, **operation_config): """**Lists the metric values for a resource**. :param resource_uri: The identifier of the resource. @@ -76,6 +76,9 @@ def list( allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata' :type result_type: str or ~azure.mgmt.monitor.models.ResultType + :param metricnamespace: Metric namespace to query metric definitions + for. + :type metricnamespace: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -113,8 +116,8 @@ def list( if result_type is not None: query_parameters['resultType'] = self._serialize.query("result_type", result_type, 'ResultType') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if self.config.metricnamespace is not None: - query_parameters['metricnamespace'] = self._serialize.query("self.config.metricnamespace", self.config.metricnamespace, 'str') + if metricnamespace is not None: + query_parameters['metricnamespace'] = self._serialize.query("metricnamespace", metricnamespace, 'str') # Construct headers header_parameters = {} From 08752312c791e2c5bfefceff6d4ef0171492ebec Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 2 Mar 2018 09:49:56 -0800 Subject: [PATCH 08/12] Generated from b0b757a970cf10c190a722bef8a33de12b42ee93 (#2087) [Monitor] Fixing issue with metrics api queryparameter name (#2575) --- .../mgmt/monitor/operations/metrics_operations.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index c49259284593..4d66d0dcb80c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, resource_uri, timespan=None, interval=None, metric=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, metricnamespace=None, custom_headers=None, raw=False, **operation_config): + self, resource_uri, timespan=None, interval=None, metricnames=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, metricnamespace=None, custom_headers=None, raw=False, **operation_config): """**Lists the metric values for a resource**. :param resource_uri: The identifier of the resource. @@ -47,8 +47,9 @@ def list( :type timespan: str :param interval: The interval (i.e. timegrain) of the query. :type interval: timedelta - :param metric: The name of the metric to retrieve. - :type metric: str + :param metricnames: The names of the metrics (comma separated) to + retrieve. + :type metricnames: str :param aggregation: The list of aggregation types (comma separated) to retrieve. :type aggregation: str @@ -103,8 +104,8 @@ def list( query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') if interval is not None: query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') - if metric is not None: - query_parameters['metric'] = self._serialize.query("metric", metric, 'str') + if metricnames is not None: + query_parameters['metricnames'] = self._serialize.query("metricnames", metricnames, 'str') if aggregation is not None: query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') if top is not None: From 18d253ac4f13e09303a0f08ecf85e6551e95cad9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Mar 2018 16:45:09 -0700 Subject: [PATCH 09/12] Generated from 189d112e0d578ff72b4e4531174f8d3c80c0b2f3 (#2176) [Monitor] Fixing incorrect specification of top parameter for Metrics API (#2655) --- .../azure/mgmt/monitor/models/__init__.py | 224 ++++++++++++------ .../monitor/models/action_group_patch_body.py | 8 +- .../models/action_group_patch_body_py3.py | 34 +++ .../monitor/models/action_group_resource.py | 32 +-- .../models/action_group_resource_py3.py | 96 ++++++++ .../models/activity_log_alert_action_group.py | 14 +- .../activity_log_alert_action_group_py3.py | 40 ++++ .../models/activity_log_alert_action_list.py | 6 +- .../activity_log_alert_action_list_py3.py | 29 +++ .../activity_log_alert_all_of_condition.py | 10 +- ...activity_log_alert_all_of_condition_py3.py | 36 +++ .../activity_log_alert_leaf_condition.py | 22 +- .../activity_log_alert_leaf_condition_py3.py | 45 ++++ .../models/activity_log_alert_patch_body.py | 8 +- .../activity_log_alert_patch_body_py3.py | 34 +++ .../models/activity_log_alert_resource.py | 31 ++- .../models/activity_log_alert_resource_py3.py | 81 +++++++ .../monitor/models/alert_rule_resource.py | 28 ++- .../models/alert_rule_resource_patch.py | 28 ++- .../models/alert_rule_resource_patch_py3.py | 68 ++++++ .../monitor/models/alert_rule_resource_py3.py | 83 +++++++ .../models/automation_runbook_receiver.py | 32 +-- .../models/automation_runbook_receiver_py3.py | 60 +++++ .../monitor/models/autoscale_notification.py | 14 +- .../models/autoscale_notification_py3.py | 47 ++++ .../mgmt/monitor/models/autoscale_profile.py | 27 ++- .../monitor/models/autoscale_profile_py3.py | 57 +++++ .../models/autoscale_setting_resource.py | 24 +- .../autoscale_setting_resource_patch.py | 24 +- .../autoscale_setting_resource_patch_py3.py | 60 +++++ .../models/autoscale_setting_resource_py3.py | 78 ++++++ .../monitor/models/azure_app_push_receiver.py | 18 +- .../models/azure_app_push_receiver_py3.py | 41 ++++ .../azure/mgmt/monitor/models/baseline.py | 20 +- .../monitor/models/baseline_metadata_value.py | 8 +- .../models/baseline_metadata_value_py3.py | 32 +++ .../azure/mgmt/monitor/models/baseline_py3.py | 45 ++++ .../mgmt/monitor/models/baseline_response.py | 16 +- .../monitor/models/baseline_response_py3.py | 76 ++++++ .../models/calculate_baseline_response.py | 16 +- .../models/calculate_baseline_response_py3.py | 43 ++++ .../diagnostic_settings_category_resource.py | 6 +- ...c_settings_category_resource_collection.py | 6 +- ...ttings_category_resource_collection_py3.py | 29 +++ ...agnostic_settings_category_resource_py3.py | 47 ++++ .../models/diagnostic_settings_resource.py | 16 +- ...diagnostic_settings_resource_collection.py | 6 +- ...nostic_settings_resource_collection_py3.py | 28 +++ .../diagnostic_settings_resource_py3.py | 72 ++++++ .../mgmt/monitor/models/email_notification.py | 10 +- .../monitor/models/email_notification_py3.py | 39 +++ .../mgmt/monitor/models/email_receiver.py | 16 +- .../mgmt/monitor/models/email_receiver_py3.py | 49 ++++ .../mgmt/monitor/models/enable_request.py | 10 +- .../mgmt/monitor/models/enable_request_py3.py | 34 +++ .../mgmt/monitor/models/error_response.py | 8 +- .../mgmt/monitor/models/error_response_py3.py | 45 ++++ .../azure/mgmt/monitor/models/event_data.py | 4 +- .../mgmt/monitor/models/event_data_py3.py | 181 ++++++++++++++ .../mgmt/monitor/models/http_request_info.py | 12 +- .../monitor/models/http_request_info_py3.py | 40 ++++ .../azure/mgmt/monitor/models/incident.py | 4 +- .../azure/mgmt/monitor/models/incident_py3.py | 58 +++++ .../mgmt/monitor/models/itsm_receiver.py | 33 +-- .../mgmt/monitor/models/itsm_receiver_py3.py | 59 +++++ .../mgmt/monitor/models/localizable_string.py | 12 +- .../monitor/models/localizable_string_py3.py | 38 +++ .../location_threshold_rule_condition.py | 16 +- .../location_threshold_rule_condition_py3.py | 50 ++++ .../monitor/models/log_profile_resource.py | 33 +-- .../models/log_profile_resource_patch.py | 33 +-- .../models/log_profile_resource_patch_py3.py | 65 +++++ .../models/log_profile_resource_py3.py | 83 +++++++ .../azure/mgmt/monitor/models/log_settings.py | 14 +- .../mgmt/monitor/models/log_settings_py3.py | 46 ++++ .../management_event_aggregation_condition.py | 10 +- ...agement_event_aggregation_condition_py3.py | 39 +++ .../models/management_event_rule_condition.py | 10 +- .../management_event_rule_condition_py3.py | 46 ++++ .../mgmt/monitor/models/metadata_value.py | 8 +- .../mgmt/monitor/models/metadata_value_py3.py | 32 +++ .../azure/mgmt/monitor/models/metric.py | 32 +-- .../monitor/models/metric_availability.py | 8 +- .../monitor/models/metric_availability_py3.py | 35 +++ .../mgmt/monitor/models/metric_definition.py | 24 +- .../monitor/models/metric_definition_py3.py | 77 ++++++ .../azure/mgmt/monitor/models/metric_py3.py | 58 +++++ .../mgmt/monitor/models/metric_settings.py | 17 +- .../monitor/models/metric_settings_py3.py | 51 ++++ .../mgmt/monitor/models/metric_trigger.py | 64 ++--- .../mgmt/monitor/models/metric_trigger_py3.py | 85 +++++++ .../azure/mgmt/monitor/models/metric_value.py | 21 +- .../mgmt/monitor/models/metric_value_py3.py | 56 +++++ .../models/monitor_management_client_enums.py | 30 +-- .../azure/mgmt/monitor/models/operation.py | 8 +- .../mgmt/monitor/models/operation_display.py | 10 +- .../monitor/models/operation_display_py3.py | 37 +++ .../monitor/models/operation_list_result.py | 8 +- .../models/operation_list_result_py3.py | 35 +++ .../mgmt/monitor/models/operation_py3.py | 32 +++ .../monitor/models/proxy_only_resource.py | 4 +- .../monitor/models/proxy_only_resource_py3.py | 45 ++++ .../azure/mgmt/monitor/models/recurrence.py | 21 +- .../mgmt/monitor/models/recurrence_py3.py | 44 ++++ .../mgmt/monitor/models/recurrent_schedule.py | 104 ++++---- .../monitor/models/recurrent_schedule_py3.py | 90 +++++++ .../azure/mgmt/monitor/models/resource.py | 12 +- .../azure/mgmt/monitor/models/resource_py3.py | 56 +++++ .../azure/mgmt/monitor/models/response.py | 26 +- .../azure/mgmt/monitor/models/response_py3.py | 64 +++++ .../mgmt/monitor/models/retention_policy.py | 18 +- .../monitor/models/retention_policy_py3.py | 41 ++++ .../azure/mgmt/monitor/models/rule_action.py | 8 +- .../mgmt/monitor/models/rule_action_py3.py | 42 ++++ .../mgmt/monitor/models/rule_condition.py | 10 +- .../mgmt/monitor/models/rule_condition_py3.py | 47 ++++ .../mgmt/monitor/models/rule_data_source.py | 10 +- .../monitor/models/rule_data_source_py3.py | 46 ++++ .../mgmt/monitor/models/rule_email_action.py | 12 +- .../monitor/models/rule_email_action_py3.py | 46 ++++ ...ule_management_event_claims_data_source.py | 6 +- ...management_event_claims_data_source_py3.py | 28 +++ .../rule_management_event_data_source.py | 26 +- .../rule_management_event_data_source_py3.py | 78 ++++++ .../monitor/models/rule_metric_data_source.py | 10 +- .../models/rule_metric_data_source_py3.py | 44 ++++ .../monitor/models/rule_webhook_action.py | 12 +- .../monitor/models/rule_webhook_action_py3.py | 45 ++++ .../azure/mgmt/monitor/models/scale_action.py | 30 +-- .../mgmt/monitor/models/scale_action_py3.py | 56 +++++ .../mgmt/monitor/models/scale_capacity.py | 27 ++- .../mgmt/monitor/models/scale_capacity_py3.py | 49 ++++ .../azure/mgmt/monitor/models/scale_rule.py | 15 +- .../mgmt/monitor/models/scale_rule_py3.py | 40 ++++ .../monitor/models/sender_authorization.py | 10 +- .../models/sender_authorization_py3.py | 39 +++ .../azure/mgmt/monitor/models/sms_receiver.py | 20 +- .../mgmt/monitor/models/sms_receiver_py3.py | 54 +++++ .../models/threshold_rule_condition.py | 24 +- .../models/threshold_rule_condition_py3.py | 64 +++++ .../monitor/models/time_series_element.py | 8 +- .../monitor/models/time_series_element_py3.py | 35 +++ .../monitor/models/time_series_information.py | 18 +- .../models/time_series_information_py3.py | 44 ++++ .../azure/mgmt/monitor/models/time_window.py | 16 +- .../mgmt/monitor/models/time_window_py3.py | 80 +++++++ .../monitor/models/webhook_notification.py | 8 +- .../models/webhook_notification_py3.py | 32 +++ .../mgmt/monitor/models/webhook_receiver.py | 16 +- .../monitor/models/webhook_receiver_py3.py | 40 ++++ .../monitor/operations/metrics_operations.py | 4 +- 151 files changed, 4760 insertions(+), 694 deletions(-) create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index 8f9add947966..f0a59de93e28 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -9,80 +9,156 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .scale_capacity import ScaleCapacity -from .metric_trigger import MetricTrigger -from .scale_action import ScaleAction -from .scale_rule import ScaleRule -from .time_window import TimeWindow -from .recurrent_schedule import RecurrentSchedule -from .recurrence import Recurrence -from .autoscale_profile import AutoscaleProfile -from .email_notification import EmailNotification -from .webhook_notification import WebhookNotification -from .autoscale_notification import AutoscaleNotification -from .autoscale_setting_resource import AutoscaleSettingResource -from .autoscale_setting_resource_patch import AutoscaleSettingResourcePatch -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .operation_list_result import OperationListResult -from .incident import Incident -from .rule_data_source import RuleDataSource -from .rule_condition import RuleCondition -from .rule_metric_data_source import RuleMetricDataSource -from .rule_management_event_claims_data_source import RuleManagementEventClaimsDataSource -from .rule_management_event_data_source import RuleManagementEventDataSource -from .threshold_rule_condition import ThresholdRuleCondition -from .location_threshold_rule_condition import LocationThresholdRuleCondition -from .management_event_aggregation_condition import ManagementEventAggregationCondition -from .management_event_rule_condition import ManagementEventRuleCondition -from .rule_action import RuleAction -from .rule_email_action import RuleEmailAction -from .rule_webhook_action import RuleWebhookAction -from .alert_rule_resource import AlertRuleResource -from .alert_rule_resource_patch import AlertRuleResourcePatch -from .retention_policy import RetentionPolicy -from .log_profile_resource import LogProfileResource -from .log_profile_resource_patch import LogProfileResourcePatch -from .proxy_only_resource import ProxyOnlyResource -from .metric_settings import MetricSettings -from .log_settings import LogSettings -from .diagnostic_settings_resource import DiagnosticSettingsResource -from .diagnostic_settings_resource_collection import DiagnosticSettingsResourceCollection -from .diagnostic_settings_category_resource import DiagnosticSettingsCategoryResource -from .diagnostic_settings_category_resource_collection import DiagnosticSettingsCategoryResourceCollection -from .email_receiver import EmailReceiver -from .sms_receiver import SmsReceiver -from .webhook_receiver import WebhookReceiver -from .itsm_receiver import ItsmReceiver -from .azure_app_push_receiver import AzureAppPushReceiver -from .automation_runbook_receiver import AutomationRunbookReceiver -from .action_group_resource import ActionGroupResource -from .enable_request import EnableRequest -from .action_group_patch_body import ActionGroupPatchBody -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 .localizable_string import LocalizableString -from .sender_authorization import SenderAuthorization -from .http_request_info import HttpRequestInfo -from .event_data import EventData -from .metric_availability import MetricAvailability -from .metric_definition import MetricDefinition -from .metric_value import MetricValue -from .metadata_value import MetadataValue -from .time_series_element import TimeSeriesElement -from .metric import Metric -from .response import Response -from .baseline_metadata_value import BaselineMetadataValue -from .baseline import Baseline -from .baseline_response import BaselineResponse -from .time_series_information import TimeSeriesInformation -from .calculate_baseline_response import CalculateBaselineResponse +try: + from .resource_py3 import Resource + from .scale_capacity_py3 import ScaleCapacity + from .metric_trigger_py3 import MetricTrigger + from .scale_action_py3 import ScaleAction + from .scale_rule_py3 import ScaleRule + from .time_window_py3 import TimeWindow + from .recurrent_schedule_py3 import RecurrentSchedule + from .recurrence_py3 import Recurrence + from .autoscale_profile_py3 import AutoscaleProfile + from .email_notification_py3 import EmailNotification + from .webhook_notification_py3 import WebhookNotification + from .autoscale_notification_py3 import AutoscaleNotification + from .autoscale_setting_resource_py3 import AutoscaleSettingResource + from .autoscale_setting_resource_patch_py3 import AutoscaleSettingResourcePatch + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .operation_list_result_py3 import OperationListResult + from .incident_py3 import Incident + from .rule_data_source_py3 import RuleDataSource + from .rule_condition_py3 import RuleCondition + from .rule_metric_data_source_py3 import RuleMetricDataSource + from .rule_management_event_claims_data_source_py3 import RuleManagementEventClaimsDataSource + from .rule_management_event_data_source_py3 import RuleManagementEventDataSource + from .threshold_rule_condition_py3 import ThresholdRuleCondition + from .location_threshold_rule_condition_py3 import LocationThresholdRuleCondition + from .management_event_aggregation_condition_py3 import ManagementEventAggregationCondition + from .management_event_rule_condition_py3 import ManagementEventRuleCondition + from .rule_action_py3 import RuleAction + from .rule_email_action_py3 import RuleEmailAction + from .rule_webhook_action_py3 import RuleWebhookAction + from .alert_rule_resource_py3 import AlertRuleResource + from .alert_rule_resource_patch_py3 import AlertRuleResourcePatch + from .retention_policy_py3 import RetentionPolicy + from .log_profile_resource_py3 import LogProfileResource + from .log_profile_resource_patch_py3 import LogProfileResourcePatch + from .proxy_only_resource_py3 import ProxyOnlyResource + from .metric_settings_py3 import MetricSettings + from .log_settings_py3 import LogSettings + from .diagnostic_settings_resource_py3 import DiagnosticSettingsResource + from .diagnostic_settings_resource_collection_py3 import DiagnosticSettingsResourceCollection + from .diagnostic_settings_category_resource_py3 import DiagnosticSettingsCategoryResource + from .diagnostic_settings_category_resource_collection_py3 import DiagnosticSettingsCategoryResourceCollection + from .email_receiver_py3 import EmailReceiver + from .sms_receiver_py3 import SmsReceiver + from .webhook_receiver_py3 import WebhookReceiver + from .itsm_receiver_py3 import ItsmReceiver + from .azure_app_push_receiver_py3 import AzureAppPushReceiver + from .automation_runbook_receiver_py3 import AutomationRunbookReceiver + from .action_group_resource_py3 import ActionGroupResource + from .enable_request_py3 import EnableRequest + from .action_group_patch_body_py3 import ActionGroupPatchBody + from .activity_log_alert_leaf_condition_py3 import ActivityLogAlertLeafCondition + from .activity_log_alert_all_of_condition_py3 import ActivityLogAlertAllOfCondition + from .activity_log_alert_action_group_py3 import ActivityLogAlertActionGroup + from .activity_log_alert_action_list_py3 import ActivityLogAlertActionList + from .activity_log_alert_resource_py3 import ActivityLogAlertResource + from .activity_log_alert_patch_body_py3 import ActivityLogAlertPatchBody + from .localizable_string_py3 import LocalizableString + from .sender_authorization_py3 import SenderAuthorization + from .http_request_info_py3 import HttpRequestInfo + from .event_data_py3 import EventData + from .metric_availability_py3 import MetricAvailability + from .metric_definition_py3 import MetricDefinition + from .metric_value_py3 import MetricValue + from .metadata_value_py3 import MetadataValue + from .time_series_element_py3 import TimeSeriesElement + from .metric_py3 import Metric + from .response_py3 import Response + from .baseline_metadata_value_py3 import BaselineMetadataValue + from .baseline_py3 import Baseline + from .baseline_response_py3 import BaselineResponse + from .time_series_information_py3 import TimeSeriesInformation + from .calculate_baseline_response_py3 import CalculateBaselineResponse +except (SyntaxError, ImportError): + from .resource import Resource + from .scale_capacity import ScaleCapacity + from .metric_trigger import MetricTrigger + from .scale_action import ScaleAction + from .scale_rule import ScaleRule + from .time_window import TimeWindow + from .recurrent_schedule import RecurrentSchedule + from .recurrence import Recurrence + from .autoscale_profile import AutoscaleProfile + from .email_notification import EmailNotification + from .webhook_notification import WebhookNotification + from .autoscale_notification import AutoscaleNotification + from .autoscale_setting_resource import AutoscaleSettingResource + from .autoscale_setting_resource_patch import AutoscaleSettingResourcePatch + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display import OperationDisplay + from .operation import Operation + from .operation_list_result import OperationListResult + from .incident import Incident + from .rule_data_source import RuleDataSource + from .rule_condition import RuleCondition + from .rule_metric_data_source import RuleMetricDataSource + from .rule_management_event_claims_data_source import RuleManagementEventClaimsDataSource + from .rule_management_event_data_source import RuleManagementEventDataSource + from .threshold_rule_condition import ThresholdRuleCondition + from .location_threshold_rule_condition import LocationThresholdRuleCondition + from .management_event_aggregation_condition import ManagementEventAggregationCondition + from .management_event_rule_condition import ManagementEventRuleCondition + from .rule_action import RuleAction + from .rule_email_action import RuleEmailAction + from .rule_webhook_action import RuleWebhookAction + from .alert_rule_resource import AlertRuleResource + from .alert_rule_resource_patch import AlertRuleResourcePatch + from .retention_policy import RetentionPolicy + from .log_profile_resource import LogProfileResource + from .log_profile_resource_patch import LogProfileResourcePatch + from .proxy_only_resource import ProxyOnlyResource + from .metric_settings import MetricSettings + from .log_settings import LogSettings + from .diagnostic_settings_resource import DiagnosticSettingsResource + from .diagnostic_settings_resource_collection import DiagnosticSettingsResourceCollection + from .diagnostic_settings_category_resource import DiagnosticSettingsCategoryResource + from .diagnostic_settings_category_resource_collection import DiagnosticSettingsCategoryResourceCollection + from .email_receiver import EmailReceiver + from .sms_receiver import SmsReceiver + from .webhook_receiver import WebhookReceiver + from .itsm_receiver import ItsmReceiver + from .azure_app_push_receiver import AzureAppPushReceiver + from .automation_runbook_receiver import AutomationRunbookReceiver + from .action_group_resource import ActionGroupResource + from .enable_request import EnableRequest + from .action_group_patch_body import ActionGroupPatchBody + 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 .localizable_string import LocalizableString + from .sender_authorization import SenderAuthorization + from .http_request_info import HttpRequestInfo + from .event_data import EventData + from .metric_availability import MetricAvailability + from .metric_definition import MetricDefinition + from .metric_value import MetricValue + from .metadata_value import MetadataValue + from .time_series_element import TimeSeriesElement + from .metric import Metric + from .response import Response + from .baseline_metadata_value import BaselineMetadataValue + from .baseline import Baseline + from .baseline_response import BaselineResponse + from .time_series_information import TimeSeriesInformation + from .calculate_baseline_response import CalculateBaselineResponse from .autoscale_setting_resource_paged import AutoscaleSettingResourcePaged from .incident_paged import IncidentPaged from .alert_rule_resource_paged import AlertRuleResourcePaged diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py index a17c4984ec0c..5c4c2016543a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body.py @@ -28,7 +28,7 @@ class ActionGroupPatchBody(Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, tags=None, enabled=True): - super(ActionGroupPatchBody, self).__init__() - self.tags = tags - self.enabled = enabled + def __init__(self, **kwargs): + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py new file mode 100644 index 000000000000..9840a35ee526 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_patch_body_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActionGroupPatchBody(Model): + """An action group object for the body of patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an + action group is not enabled, then none of its actions will be activated. + Default value: True . + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, enabled: bool=True, **kwargs) -> None: + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py index 9d4b8d20865e..4cdf16d25a2d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource.py @@ -18,21 +18,23 @@ class ActionGroupResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param group_short_name: The short name of the action group. This will be - used in SMS messages. + :param group_short_name: Required. The short name of the action group. + This will be used in SMS messages. :type group_short_name: str - :param enabled: Indicates whether this action group is enabled. If an - action group is not enabled, then none of its receivers will receive + :param enabled: Required. Indicates whether this action group is enabled. + If an action group is not enabled, then none of its receivers will receive communications. Default value: True . :type enabled: bool :param email_receivers: The list of email receivers that are part of this @@ -82,13 +84,13 @@ class ActionGroupResource(Resource): 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, } - def __init__(self, location, group_short_name, tags=None, enabled=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None): - super(ActionGroupResource, self).__init__(location=location, tags=tags) - self.group_short_name = group_short_name - self.enabled = enabled - self.email_receivers = email_receivers - self.sms_receivers = sms_receivers - self.webhook_receivers = webhook_receivers - self.itsm_receivers = itsm_receivers - self.azure_app_push_receivers = azure_app_push_receivers - self.automation_runbook_receivers = automation_runbook_receivers + def __init__(self, **kwargs): + super(ActionGroupResource, self).__init__(**kwargs) + self.group_short_name = kwargs.get('group_short_name', None) + self.enabled = kwargs.get('enabled', True) + self.email_receivers = kwargs.get('email_receivers', None) + self.sms_receivers = kwargs.get('sms_receivers', None) + self.webhook_receivers = kwargs.get('webhook_receivers', None) + self.itsm_receivers = kwargs.get('itsm_receivers', None) + self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None) + self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py new file mode 100644 index 000000000000..fdd6a95d4f1a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/action_group_resource_py3.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ActionGroupResource(Resource): + """An action group resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param group_short_name: Required. The short name of the action group. + This will be used in SMS messages. + :type group_short_name: str + :param enabled: Required. Indicates whether this action group is enabled. + If an action group is not enabled, then none of its receivers will receive + communications. Default value: True . + :type enabled: bool + :param email_receivers: The list of email receivers that are part of this + action group. + :type email_receivers: list[~azure.mgmt.monitor.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this + action group. + :type sms_receivers: list[~azure.mgmt.monitor.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of + this action group. + :type webhook_receivers: list[~azure.mgmt.monitor.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this + action group. + :type itsm_receivers: list[~azure.mgmt.monitor.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that + are part of this action group. + :type azure_app_push_receivers: + list[~azure.mgmt.monitor.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook + receivers that are part of this action group. + :type automation_runbook_receivers: + list[~azure.mgmt.monitor.models.AutomationRunbookReceiver] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'group_short_name': {'required': True, 'max_length': 15}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + } + + def __init__(self, *, location: str, group_short_name: str, tags=None, enabled: bool=True, email_receivers=None, sms_receivers=None, webhook_receivers=None, itsm_receivers=None, azure_app_push_receivers=None, automation_runbook_receivers=None, **kwargs) -> None: + super(ActionGroupResource, self).__init__(location=location, tags=tags, **kwargs) + self.group_short_name = group_short_name + self.enabled = enabled + self.email_receivers = email_receivers + self.sms_receivers = sms_receivers + self.webhook_receivers = webhook_receivers + self.itsm_receivers = itsm_receivers + self.azure_app_push_receivers = azure_app_push_receivers + self.automation_runbook_receivers = automation_runbook_receivers diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py index fbd7cad9b61a..e1594897e5cc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group.py @@ -15,8 +15,10 @@ class ActivityLogAlertActionGroup(Model): """A pointer to an Azure Action Group. - :param action_group_id: The resourceId of the action group. This cannot be - null or empty. + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resourceId of the action group. This + cannot be null or empty. :type action_group_id: str :param webhook_properties: the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. @@ -32,7 +34,7 @@ class ActivityLogAlertActionGroup(Model): 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, } - def __init__(self, action_group_id, webhook_properties=None): - super(ActivityLogAlertActionGroup, self).__init__() - self.action_group_id = action_group_id - self.webhook_properties = webhook_properties + def __init__(self, **kwargs): + super(ActivityLogAlertActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs.get('action_group_id', None) + self.webhook_properties = kwargs.get('webhook_properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py new file mode 100644 index 000000000000..b138c3d966d6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_group_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertActionGroup(Model): + """A pointer to an Azure Action Group. + + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resourceId of the action group. This + cannot be null or empty. + :type action_group_id: str + :param webhook_properties: the dictionary of custom properties to include + with the post operation. These data are appended to the webhook payload. + :type webhook_properties: dict[str, str] + """ + + _validation = { + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__(self, *, action_group_id: str, webhook_properties=None, **kwargs) -> None: + super(ActivityLogAlertActionGroup, self).__init__(**kwargs) + self.action_group_id = action_group_id + self.webhook_properties = webhook_properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py index 93e89bf58cff..7fb9b68880fc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list.py @@ -24,6 +24,6 @@ class ActivityLogAlertActionList(Model): 'action_groups': {'key': 'actionGroups', 'type': '[ActivityLogAlertActionGroup]'}, } - def __init__(self, action_groups=None): - super(ActivityLogAlertActionList, self).__init__() - self.action_groups = action_groups + def __init__(self, **kwargs): + super(ActivityLogAlertActionList, self).__init__(**kwargs) + self.action_groups = kwargs.get('action_groups', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py new file mode 100644 index 000000000000..c5e38e2fe62f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_action_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertActionList(Model): + """A list of activity log alert actions. + + :param action_groups: The list of activity log alerts. + :type action_groups: + list[~azure.mgmt.monitor.models.ActivityLogAlertActionGroup] + """ + + _attribute_map = { + 'action_groups': {'key': 'actionGroups', 'type': '[ActivityLogAlertActionGroup]'}, + } + + def __init__(self, *, action_groups=None, **kwargs) -> None: + super(ActivityLogAlertActionList, self).__init__(**kwargs) + self.action_groups = action_groups diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py index bdcd86017bfb..0ba82fb32498 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition.py @@ -16,7 +16,9 @@ class ActivityLogAlertAllOfCondition(Model): """An Activity Log alert condition that is met when all its member conditions are met. - :param all_of: The list of activity log alert conditions. + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of activity log alert conditions. :type all_of: list[~azure.mgmt.monitor.models.ActivityLogAlertLeafCondition] """ @@ -29,6 +31,6 @@ class ActivityLogAlertAllOfCondition(Model): 'all_of': {'key': 'allOf', 'type': '[ActivityLogAlertLeafCondition]'}, } - def __init__(self, all_of): - super(ActivityLogAlertAllOfCondition, self).__init__() - self.all_of = all_of + def __init__(self, **kwargs): + super(ActivityLogAlertAllOfCondition, self).__init__(**kwargs) + self.all_of = kwargs.get('all_of', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py new file mode 100644 index 000000000000..e9a59663a2ce --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_all_of_condition_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertAllOfCondition(Model): + """An Activity Log alert condition that is met when all its member conditions + are met. + + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of activity log alert conditions. + :type all_of: + list[~azure.mgmt.monitor.models.ActivityLogAlertLeafCondition] + """ + + _validation = { + 'all_of': {'required': True}, + } + + _attribute_map = { + 'all_of': {'key': 'allOf', 'type': '[ActivityLogAlertLeafCondition]'}, + } + + def __init__(self, *, all_of, **kwargs) -> None: + super(ActivityLogAlertAllOfCondition, self).__init__(**kwargs) + self.all_of = all_of diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py index d31f514e88b7..682dada893dc 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition.py @@ -16,13 +16,15 @@ class ActivityLogAlertLeafCondition(Model): """An Activity Log alert condition that is met by comparing an activity log field and value. - :param field: The name of the field that this condition will examine. The - possible values for this field are (case-insensitive): 'resourceId', - 'category', 'caller', 'level', 'operationName', 'resourceGroup', - 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything - beginning with 'properties.'. + All required parameters must be populated in order to send to Azure. + + :param field: Required. The name of the field that this condition will + examine. The possible values for this field are (case-insensitive): + 'resourceId', 'category', 'caller', 'level', 'operationName', + 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties.'. :type field: str - :param equals: The field value will be compared to this value + :param equals: Required. The field value will be compared to this value (case-insensitive) to determine if the condition is met. :type equals: str """ @@ -37,7 +39,7 @@ class ActivityLogAlertLeafCondition(Model): 'equals': {'key': 'equals', 'type': 'str'}, } - def __init__(self, field, equals): - super(ActivityLogAlertLeafCondition, self).__init__() - self.field = field - self.equals = equals + def __init__(self, **kwargs): + super(ActivityLogAlertLeafCondition, self).__init__(**kwargs) + self.field = kwargs.get('field', None) + self.equals = kwargs.get('equals', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py new file mode 100644 index 000000000000..ddab0eec0048 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_leaf_condition_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertLeafCondition(Model): + """An Activity Log alert condition that is met by comparing an activity log + field and value. + + All required parameters must be populated in order to send to Azure. + + :param field: Required. The name of the field that this condition will + examine. The possible values for this field are (case-insensitive): + 'resourceId', 'category', 'caller', 'level', 'operationName', + 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties.'. + :type field: str + :param equals: Required. The field value will be compared to this value + (case-insensitive) to determine if the condition is met. + :type equals: str + """ + + _validation = { + 'field': {'required': True}, + 'equals': {'required': True}, + } + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + } + + def __init__(self, *, field: str, equals: str, **kwargs) -> None: + super(ActivityLogAlertLeafCondition, self).__init__(**kwargs) + self.field = field + self.equals = equals diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py index 37cb2aef8ac8..904b640b483e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body.py @@ -28,7 +28,7 @@ class ActivityLogAlertPatchBody(Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, tags=None, enabled=True): - super(ActivityLogAlertPatchBody, self).__init__() - self.tags = tags - self.enabled = enabled + def __init__(self, **kwargs): + super(ActivityLogAlertPatchBody, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py new file mode 100644 index 000000000000..886a84337990 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_patch_body_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ActivityLogAlertPatchBody(Model): + """An activity log alert object for the body of patch operations. + + :param tags: Resource tags + :type tags: dict[str, str] + :param enabled: Indicates whether this activity log alert is enabled. If + an activity log alert is not enabled, then none of its actions will be + activated. Default value: True . + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__(self, *, tags=None, enabled: bool=True, **kwargs) -> None: + super(ActivityLogAlertPatchBody, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py index c27273a5df87..6fe9ff307863 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource.py @@ -18,27 +18,32 @@ class ActivityLogAlertResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param scopes: A list of resourceIds that will be used as prefixes. The - alert will only apply to activityLogs with resourceIds that fall under one - of these prefixes. This list must include at least one item. + :param scopes: Required. A list of resourceIds that will be used as + prefixes. The alert will only apply to activityLogs with resourceIds that + fall under one of these prefixes. This list must include at least one + item. :type scopes: list[str] :param enabled: Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated. Default value: True . :type enabled: bool - :param condition: The condition that will cause this alert to activate. + :param condition: Required. The condition that will cause this alert to + activate. :type condition: ~azure.mgmt.monitor.models.ActivityLogAlertAllOfCondition - :param actions: The actions that will activate when the condition is met. + :param actions: Required. The actions that will activate when the + condition is met. :type actions: ~azure.mgmt.monitor.models.ActivityLogAlertActionList :param description: A description of this activity log alert. :type description: str @@ -67,10 +72,10 @@ class ActivityLogAlertResource(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, } - def __init__(self, location, scopes, condition, actions, tags=None, enabled=True, description=None): - super(ActivityLogAlertResource, self).__init__(location=location, tags=tags) - self.scopes = scopes - self.enabled = enabled - self.condition = condition - self.actions = actions - self.description = description + def __init__(self, **kwargs): + super(ActivityLogAlertResource, self).__init__(**kwargs) + self.scopes = kwargs.get('scopes', None) + self.enabled = kwargs.get('enabled', True) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py new file mode 100644 index 000000000000..bc03347d612d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/activity_log_alert_resource_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ActivityLogAlertResource(Resource): + """An activity log alert resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param scopes: Required. A list of resourceIds that will be used as + prefixes. The alert will only apply to activityLogs with resourceIds that + fall under one of these prefixes. This list must include at least one + item. + :type scopes: list[str] + :param enabled: Indicates whether this activity log alert is enabled. If + an activity log alert is not enabled, then none of its actions will be + activated. Default value: True . + :type enabled: bool + :param condition: Required. The condition that will cause this alert to + activate. + :type condition: ~azure.mgmt.monitor.models.ActivityLogAlertAllOfCondition + :param actions: Required. The actions that will activate when the + condition is met. + :type actions: ~azure.mgmt.monitor.models.ActivityLogAlertActionList + :param description: A description of this activity log alert. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'scopes': {'required': True}, + 'condition': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'ActivityLogAlertAllOfCondition'}, + 'actions': {'key': 'properties.actions', 'type': 'ActivityLogAlertActionList'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, *, location: str, scopes, condition, actions, tags=None, enabled: bool=True, description: str=None, **kwargs) -> None: + super(ActivityLogAlertResource, self).__init__(location=location, tags=tags, **kwargs) + self.scopes = scopes + self.enabled = enabled + self.condition = condition + self.actions = actions + self.description = description diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py index a7a074fc5038..1ed610f6e0f1 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource.py @@ -18,26 +18,28 @@ class AlertRuleResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param alert_rule_resource_name: the name of the alert rule. + :param alert_rule_resource_name: Required. the name of the alert rule. :type alert_rule_resource_name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str - :param is_enabled: the flag that indicates whether the alert rule is - enabled. + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. :type is_enabled: bool - :param condition: the condition that results in the alert rule being - activated. + :param condition: Required. the condition that results in the alert rule + being activated. :type condition: ~azure.mgmt.monitor.models.RuleCondition :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. @@ -71,11 +73,11 @@ class AlertRuleResource(Resource): 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } - def __init__(self, location, alert_rule_resource_name, is_enabled, condition, tags=None, description=None, actions=None): - super(AlertRuleResource, self).__init__(location=location, tags=tags) - self.alert_rule_resource_name = alert_rule_resource_name - self.description = description - self.is_enabled = is_enabled - self.condition = condition - self.actions = actions + def __init__(self, **kwargs): + super(AlertRuleResource, self).__init__(**kwargs) + self.alert_rule_resource_name = kwargs.get('alert_rule_resource_name', None) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py index 75d06c07d0c9..c557856b15a9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch.py @@ -18,18 +18,20 @@ class AlertRuleResourcePatch(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] - :param name: the name of the alert rule. + :param name: Required. the name of the alert rule. :type name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str - :param is_enabled: the flag that indicates whether the alert rule is - enabled. + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. :type is_enabled: bool - :param condition: the condition that results in the alert rule being - activated. + :param condition: Required. the condition that results in the alert rule + being activated. :type condition: ~azure.mgmt.monitor.models.RuleCondition :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. @@ -55,12 +57,12 @@ class AlertRuleResourcePatch(Model): 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } - def __init__(self, name, is_enabled, condition, tags=None, description=None, actions=None): - super(AlertRuleResourcePatch, self).__init__() - self.tags = tags - self.name = name - self.description = description - self.is_enabled = is_enabled - self.condition = condition - self.actions = actions + def __init__(self, **kwargs): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py new file mode 100644 index 000000000000..61a979fde502 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_patch_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AlertRuleResourcePatch(Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param name: Required. the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be + included in the alert email. + :type description: str + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule + being activated. + :type condition: ~azure.mgmt.monitor.models.RuleCondition + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str, is_enabled: bool, condition, tags=None, description: str=None, actions=None, **kwargs) -> None: + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.name = name + self.description = description + self.is_enabled = is_enabled + self.condition = condition + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py new file mode 100644 index 000000000000..83f226b1201d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/alert_rule_resource_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param alert_rule_resource_name: Required. the name of the alert rule. + :type alert_rule_resource_name: str + :param description: the description of the alert rule that will be + included in the alert email. + :type description: str + :param is_enabled: Required. the flag that indicates whether the alert + rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule + being activated. + :type condition: ~azure.mgmt.monitor.models.RuleCondition + :param actions: the array of actions that are performed when the alert + rule becomes active, and when an alert condition is resolved. + :type actions: list[~azure.mgmt.monitor.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'alert_rule_resource_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'alert_rule_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, location: str, alert_rule_resource_name: str, is_enabled: bool, condition, tags=None, description: str=None, actions=None, **kwargs) -> None: + super(AlertRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.alert_rule_resource_name = alert_rule_resource_name + self.description = description + self.is_enabled = is_enabled + self.condition = condition + self.actions = actions + self.last_updated_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py index f9061c65f2d8..f7aa0bde67ed 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver.py @@ -15,16 +15,18 @@ class AutomationRunbookReceiver(Model): """The Azure Automation Runbook notification receiver. - :param automation_account_id: The Azure automation account Id which holds - this runbook and authenticate to Azure resource. + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id + which holds this runbook and authenticate to Azure resource. :type automation_account_id: str - :param runbook_name: The name for this runbook. + :param runbook_name: Required. The name for this runbook. :type runbook_name: str - :param webhook_resource_id: The resource id for webhook linked to this - runbook. + :param webhook_resource_id: Required. The resource id for webhook linked + to this runbook. :type webhook_resource_id: str - :param is_global_runbook: Indicates whether this instance is global - runbook. + :param is_global_runbook: Required. Indicates whether this instance is + global runbook. :type is_global_runbook: bool :param name: Indicates name of the webhook. :type name: str @@ -48,11 +50,11 @@ class AutomationRunbookReceiver(Model): 'service_uri': {'key': 'serviceUri', 'type': 'str'}, } - def __init__(self, automation_account_id, runbook_name, webhook_resource_id, is_global_runbook, name=None, service_uri=None): - super(AutomationRunbookReceiver, self).__init__() - self.automation_account_id = automation_account_id - self.runbook_name = runbook_name - self.webhook_resource_id = webhook_resource_id - self.is_global_runbook = is_global_runbook - self.name = name - self.service_uri = service_uri + def __init__(self, **kwargs): + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = kwargs.get('automation_account_id', None) + self.runbook_name = kwargs.get('runbook_name', None) + self.webhook_resource_id = kwargs.get('webhook_resource_id', None) + self.is_global_runbook = kwargs.get('is_global_runbook', None) + self.name = kwargs.get('name', None) + self.service_uri = kwargs.get('service_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py new file mode 100644 index 000000000000..0367cc1eb750 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/automation_runbook_receiver_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutomationRunbookReceiver(Model): + """The Azure Automation Runbook notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id + which holds this runbook and authenticate to Azure resource. + :type automation_account_id: str + :param runbook_name: Required. The name for this runbook. + :type runbook_name: str + :param webhook_resource_id: Required. The resource id for webhook linked + to this runbook. + :type webhook_resource_id: str + :param is_global_runbook: Required. Indicates whether this instance is + global runbook. + :type is_global_runbook: bool + :param name: Indicates name of the webhook. + :type name: str + :param service_uri: The URI where webhooks should be sent. + :type service_uri: str + """ + + _validation = { + 'automation_account_id': {'required': True}, + 'runbook_name': {'required': True}, + 'webhook_resource_id': {'required': True}, + 'is_global_runbook': {'required': True}, + } + + _attribute_map = { + 'automation_account_id': {'key': 'automationAccountId', 'type': 'str'}, + 'runbook_name': {'key': 'runbookName', 'type': 'str'}, + 'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'}, + 'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + } + + def __init__(self, *, automation_account_id: str, runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, name: str=None, service_uri: str=None, **kwargs) -> None: + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = automation_account_id + self.runbook_name = runbook_name + self.webhook_resource_id = webhook_resource_id + self.is_global_runbook = is_global_runbook + self.name = name + self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py index 1e294501f4a5..602508bd4e69 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification.py @@ -18,8 +18,10 @@ class AutoscaleNotification(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar operation: the operation associated with the notification and its - value must be "scale". Default value: "Scale" . + All required parameters must be populated in order to send to Azure. + + :ivar operation: Required. the operation associated with the notification + and its value must be "scale". Default value: "Scale" . :vartype operation: str :param email: the email notification. :type email: ~azure.mgmt.monitor.models.EmailNotification @@ -39,7 +41,7 @@ class AutoscaleNotification(Model): operation = "Scale" - def __init__(self, email=None, webhooks=None): - super(AutoscaleNotification, self).__init__() - self.email = email - self.webhooks = webhooks + def __init__(self, **kwargs): + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.webhooks = kwargs.get('webhooks', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py new file mode 100644 index 000000000000..0c441f1321fb --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleNotification(Model): + """Autoscale notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar operation: Required. the operation associated with the notification + and its value must be "scale". Default value: "Scale" . + :vartype operation: str + :param email: the email notification. + :type email: ~azure.mgmt.monitor.models.EmailNotification + :param webhooks: the collection of webhook notifications. + :type webhooks: list[~azure.mgmt.monitor.models.WebhookNotification] + """ + + _validation = { + 'operation': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'EmailNotification'}, + 'webhooks': {'key': 'webhooks', 'type': '[WebhookNotification]'}, + } + + operation = "Scale" + + def __init__(self, *, email=None, webhooks=None, **kwargs) -> None: + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = email + self.webhooks = webhooks diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py index c36998aa1b21..401b6f802543 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile.py @@ -15,13 +15,16 @@ class AutoscaleProfile(Model): """Autoscale profile. - :param name: the name of the profile. + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. :type name: str - :param capacity: the number of instances that can be used during this - profile. + :param capacity: Required. the number of instances that can be used during + this profile. :type capacity: ~azure.mgmt.monitor.models.ScaleCapacity - :param rules: the collection of rules that provide the triggers and - parameters for the scaling action. A maximum of 10 rules can be specified. + :param rules: Required. the collection of rules that provide the triggers + and parameters for the scaling action. A maximum of 10 rules can be + specified. :type rules: list[~azure.mgmt.monitor.models.ScaleRule] :param fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. @@ -45,10 +48,10 @@ class AutoscaleProfile(Model): 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, } - def __init__(self, name, capacity, rules, fixed_date=None, recurrence=None): - super(AutoscaleProfile, self).__init__() - self.name = name - self.capacity = capacity - self.rules = rules - self.fixed_date = fixed_date - self.recurrence = recurrence + def __init__(self, **kwargs): + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.capacity = kwargs.get('capacity', None) + self.rules = kwargs.get('rules', None) + self.fixed_date = kwargs.get('fixed_date', None) + self.recurrence = kwargs.get('recurrence', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py new file mode 100644 index 000000000000..5665e09b1353 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_profile_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleProfile(Model): + """Autoscale profile. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. + :type name: str + :param capacity: Required. the number of instances that can be used during + this profile. + :type capacity: ~azure.mgmt.monitor.models.ScaleCapacity + :param rules: Required. the collection of rules that provide the triggers + and parameters for the scaling action. A maximum of 10 rules can be + specified. + :type rules: list[~azure.mgmt.monitor.models.ScaleRule] + :param fixed_date: the specific date-time for the profile. This element is + not used if the Recurrence element is used. + :type fixed_date: ~azure.mgmt.monitor.models.TimeWindow + :param recurrence: the repeating times at which this profile begins. This + element is not used if the FixedDate element is used. + :type recurrence: ~azure.mgmt.monitor.models.Recurrence + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ScaleCapacity'}, + 'rules': {'key': 'rules', 'type': '[ScaleRule]'}, + 'fixed_date': {'key': 'fixedDate', 'type': 'TimeWindow'}, + 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, + } + + def __init__(self, *, name: str, capacity, rules, fixed_date=None, recurrence=None, **kwargs) -> None: + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + self.rules = rules + self.fixed_date = fixed_date + self.recurrence = recurrence diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py index b58bb677e7b1..8659f72e634e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource.py @@ -18,19 +18,21 @@ class AutoscaleSettingResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] - :param profiles: the collection of automatic scaling profiles that specify - different scaling parameters for different time periods. A maximum of 20 - profiles can be specified. + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] :param notifications: the collection of notifications. :type notifications: @@ -67,10 +69,10 @@ class AutoscaleSettingResource(Resource): 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, } - def __init__(self, location, profiles, tags=None, notifications=None, enabled=True, autoscale_setting_resource_name=None, target_resource_uri=None): - super(AutoscaleSettingResource, self).__init__(location=location, tags=tags) - self.profiles = profiles - self.notifications = notifications - self.enabled = enabled - self.autoscale_setting_resource_name = autoscale_setting_resource_name - self.target_resource_uri = target_resource_uri + def __init__(self, **kwargs): + super(AutoscaleSettingResource, self).__init__(**kwargs) + self.profiles = kwargs.get('profiles', None) + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.autoscale_setting_resource_name = kwargs.get('autoscale_setting_resource_name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py index d2cad20ddd15..e5dd6ebd6c08 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch.py @@ -15,11 +15,13 @@ class AutoscaleSettingResourcePatch(Model): """The autoscale setting object for patch operations. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] - :param profiles: the collection of automatic scaling profiles that specify - different scaling parameters for different time periods. A maximum of 20 - profiles can be specified. + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] :param notifications: the collection of notifications. :type notifications: @@ -48,11 +50,11 @@ class AutoscaleSettingResourcePatch(Model): 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, } - def __init__(self, profiles, tags=None, notifications=None, enabled=True, name=None, target_resource_uri=None): - super(AutoscaleSettingResourcePatch, self).__init__() - self.tags = tags - self.profiles = profiles - self.notifications = notifications - self.enabled = enabled - self.name = name - self.target_resource_uri = target_resource_uri + def __init__(self, **kwargs): + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.profiles = kwargs.get('profiles', None) + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.name = kwargs.get('name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py new file mode 100644 index 000000000000..be2567532ab0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_patch_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoscaleSettingResourcePatch(Model): + """The autoscale setting object for patch operations. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. + :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~azure.mgmt.monitor.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is + enabled for the resource. The default value is 'true'. Default value: True + . + :type enabled: bool + :param name: the name of the autoscale setting. + :type name: str + :param target_resource_uri: the resource identifier of the resource that + the autoscale setting should be added to. + :type target_resource_uri: str + """ + + _validation = { + 'profiles': {'required': True, 'max_items': 20}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + } + + def __init__(self, *, profiles, tags=None, notifications=None, enabled: bool=True, name: str=None, target_resource_uri: str=None, **kwargs) -> None: + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.name = name + self.target_resource_uri = target_resource_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py new file mode 100644 index 000000000000..b09a23c57c85 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_setting_resource_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AutoscaleSettingResource(Resource): + """The autoscale setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param profiles: Required. the collection of automatic scaling profiles + that specify different scaling parameters for different time periods. A + maximum of 20 profiles can be specified. + :type profiles: list[~azure.mgmt.monitor.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~azure.mgmt.monitor.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is + enabled for the resource. The default value is 'true'. Default value: True + . + :type enabled: bool + :param autoscale_setting_resource_name: the name of the autoscale setting. + :type autoscale_setting_resource_name: str + :param target_resource_uri: the resource identifier of the resource that + the autoscale setting should be added to. + :type target_resource_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'profiles': {'required': True, 'max_items': 20}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'autoscale_setting_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + } + + def __init__(self, *, location: str, profiles, tags=None, notifications=None, enabled: bool=True, autoscale_setting_resource_name: str=None, target_resource_uri: str=None, **kwargs) -> None: + super(AutoscaleSettingResource, self).__init__(location=location, tags=tags, **kwargs) + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.autoscale_setting_resource_name = autoscale_setting_resource_name + self.target_resource_uri = target_resource_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py index 6aa6de323552..3acb85b22433 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver.py @@ -15,11 +15,13 @@ class AzureAppPushReceiver(Model): """The Azure mobile App push notification receiver. - :param name: The name of the Azure mobile app push receiver. Names must be - unique across all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. + Names must be unique across all receivers within an action group. :type name: str - :param email_address: The email address registered for the Azure mobile - app. + :param email_address: Required. The email address registered for the Azure + mobile app. :type email_address: str """ @@ -33,7 +35,7 @@ class AzureAppPushReceiver(Model): 'email_address': {'key': 'emailAddress', 'type': 'str'}, } - def __init__(self, name, email_address): - super(AzureAppPushReceiver, self).__init__() - self.name = name - self.email_address = email_address + def __init__(self, **kwargs): + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.email_address = kwargs.get('email_address', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py new file mode 100644 index 000000000000..eee03feaa788 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/azure_app_push_receiver_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureAppPushReceiver(Model): + """The Azure mobile App push notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. + Names must be unique across all receivers within an action group. + :type name: str + :param email_address: Required. The email address registered for the Azure + mobile app. + :type email_address: str + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, email_address: str, **kwargs) -> None: + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py index c4c788fedcad..ae375dd23587 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline.py @@ -15,12 +15,14 @@ class Baseline(Model): """The baseline values for a single sensitivity value. - :param sensitivity: the sensitivity of the baseline. Possible values - include: 'Low', 'Medium', 'High' + All required parameters must be populated in order to send to Azure. + + :param sensitivity: Required. the sensitivity of the baseline. Possible + values include: 'Low', 'Medium', 'High' :type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity - :param low_thresholds: The low thresholds of the baseline. + :param low_thresholds: Required. The low thresholds of the baseline. :type low_thresholds: list[float] - :param high_thresholds: The high thresholds of the baseline. + :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] """ @@ -36,8 +38,8 @@ class Baseline(Model): 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, } - def __init__(self, sensitivity, low_thresholds, high_thresholds): - super(Baseline, self).__init__() - self.sensitivity = sensitivity - self.low_thresholds = low_thresholds - self.high_thresholds = high_thresholds + def __init__(self, **kwargs): + super(Baseline, self).__init__(**kwargs) + self.sensitivity = kwargs.get('sensitivity', None) + self.low_thresholds = kwargs.get('low_thresholds', None) + self.high_thresholds = kwargs.get('high_thresholds', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py index d1e576f99407..33364a07cf4f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.py @@ -26,7 +26,7 @@ class BaselineMetadataValue(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(BaselineMetadataValue, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(BaselineMetadataValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py new file mode 100644 index 000000000000..9ac4552031d0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineMetadataValue(Model): + """Represents a baseline metadata value. + + :param name: the name of the metadata. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param value: the value of the metadata. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name=None, value: str=None, **kwargs) -> None: + super(BaselineMetadataValue, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py new file mode 100644 index 000000000000..6fbaab8dc7e6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Baseline(Model): + """The baseline values for a single sensitivity value. + + All required parameters must be populated in order to send to Azure. + + :param sensitivity: Required. the sensitivity of the baseline. Possible + values include: 'Low', 'Medium', 'High' + :type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity + :param low_thresholds: Required. The low thresholds of the baseline. + :type low_thresholds: list[float] + :param high_thresholds: Required. The high thresholds of the baseline. + :type high_thresholds: list[float] + """ + + _validation = { + 'sensitivity': {'required': True}, + 'low_thresholds': {'required': True}, + 'high_thresholds': {'required': True}, + } + + _attribute_map = { + 'sensitivity': {'key': 'sensitivity', 'type': 'Sensitivity'}, + 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, + 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + } + + def __init__(self, *, sensitivity, low_thresholds, high_thresholds, **kwargs) -> None: + super(Baseline, self).__init__(**kwargs) + self.sensitivity = sensitivity + self.low_thresholds = low_thresholds + self.high_thresholds = high_thresholds diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py index 2eb7f3d7e1ba..4f5e33789a34 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.py @@ -63,14 +63,14 @@ class BaselineResponse(Model): 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, } - def __init__(self, timespan=None, interval=None, aggregation=None, timestamps=None, baseline=None, metadata=None): - super(BaselineResponse, self).__init__() + def __init__(self, **kwargs): + super(BaselineResponse, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.timespan = timespan - self.interval = interval - self.aggregation = aggregation - self.timestamps = timestamps - self.baseline = baseline - self.metadata = metadata + self.timespan = kwargs.get('timespan', None) + self.interval = kwargs.get('interval', None) + self.aggregation = kwargs.get('aggregation', None) + self.timestamps = kwargs.get('timestamps', None) + self.baseline = kwargs.get('baseline', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py new file mode 100644 index 000000000000..34e00bbdb19a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaselineResponse(Model): + """The response to a baseline query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: the metric baseline Id. + :vartype id: str + :ivar type: the resource type of the baseline resource. + :vartype type: str + :ivar name: the name and the display name of the metric, i.e. it is + localizable string. + :vartype name: ~azure.mgmt.monitor.models.LocalizableString + :param timespan: The timespan for which the data was retrieved. Its value + consists of two datatimes concatenated, separated by '/'. This may be + adjusted in the future and returned back from what was originally + requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was + returned in. This may be adjusted in the future and returned back from + what was originally requested. This is not present if a metadata request + was made. + :type interval: timedelta + :param aggregation: The aggregation type of the metric. + :type aggregation: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + :param metadata: the baseline metadata values. + :type metadata: list[~azure.mgmt.monitor.models.BaselineMetadataValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'timespan': {'key': 'properties.timespan', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'duration'}, + 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, + 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, + 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, + } + + def __init__(self, *, timespan: str=None, interval=None, aggregation: str=None, timestamps=None, baseline=None, metadata=None, **kwargs) -> None: + super(BaselineResponse, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.timespan = timespan + self.interval = interval + self.aggregation = aggregation + self.timestamps = timestamps + self.baseline = baseline + self.metadata = metadata diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py index f5faef335596..b2a275759db5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.py @@ -15,11 +15,13 @@ class CalculateBaselineResponse(Model): """The response to a calcualte baseline call. - :param type: the resource type of the baseline resource. + All required parameters must be populated in order to send to Azure. + + :param type: Required. the resource type of the baseline resource. :type type: str :param timestamps: the array of timestamps of the baselines. :type timestamps: list[datetime] - :param baseline: the baseline values for each sensitivity. + :param baseline: Required. the baseline values for each sensitivity. :type baseline: list[~azure.mgmt.monitor.models.Baseline] """ @@ -34,8 +36,8 @@ class CalculateBaselineResponse(Model): 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, } - def __init__(self, type, baseline, timestamps=None): - super(CalculateBaselineResponse, self).__init__() - self.type = type - self.timestamps = timestamps - self.baseline = baseline + def __init__(self, **kwargs): + super(CalculateBaselineResponse, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.timestamps = kwargs.get('timestamps', None) + self.baseline = kwargs.get('baseline', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py new file mode 100644 index 000000000000..5a39b8a64d95 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CalculateBaselineResponse(Model): + """The response to a calcualte baseline call. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. the resource type of the baseline resource. + :type type: str + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + :param baseline: Required. the baseline values for each sensitivity. + :type baseline: list[~azure.mgmt.monitor.models.Baseline] + """ + + _validation = { + 'type': {'required': True}, + 'baseline': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + } + + def __init__(self, *, type: str, baseline, timestamps=None, **kwargs) -> None: + super(CalculateBaselineResponse, self).__init__(**kwargs) + self.type = type + self.timestamps = timestamps + self.baseline = baseline diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py index 4103b2e9bcbd..22a2951b0b3f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource.py @@ -42,6 +42,6 @@ class DiagnosticSettingsCategoryResource(ProxyOnlyResource): 'category_type': {'key': 'properties.categoryType', 'type': 'CategoryType'}, } - def __init__(self, category_type=None): - super(DiagnosticSettingsCategoryResource, self).__init__() - self.category_type = category_type + def __init__(self, **kwargs): + super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs) + self.category_type = kwargs.get('category_type', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py index a3a42e0f1085..1192f620b392 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection.py @@ -24,6 +24,6 @@ class DiagnosticSettingsCategoryResourceCollection(Model): 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, } - def __init__(self, value=None): - super(DiagnosticSettingsCategoryResourceCollection, self).__init__() - self.value = value + def __init__(self, **kwargs): + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py new file mode 100644 index 000000000000..7e7e044da6c8 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_collection_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticSettingsCategoryResourceCollection(Model): + """Represents a collection of diagnostic setting category resources. + + :param value: The collection of diagnostic settings category resources. + :type value: + list[~azure.mgmt.monitor.models.DiagnosticSettingsCategoryResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py new file mode 100644 index 000000000000..4a9a95c9f8ea --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_category_resource_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticSettingsCategoryResource(ProxyOnlyResource): + """The diagnostic settings category resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param category_type: The type of the diagnostic settings category. + Possible values include: 'Metrics', 'Logs' + :type category_type: str or ~azure.mgmt.monitor.models.CategoryType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category_type': {'key': 'properties.categoryType', 'type': 'CategoryType'}, + } + + def __init__(self, *, category_type=None, **kwargs) -> None: + super(DiagnosticSettingsCategoryResource, self).__init__(, **kwargs) + self.category_type = category_type diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py index a022ef0d9bad..09cbca388e28 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource.py @@ -62,11 +62,11 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, } - def __init__(self, storage_account_id=None, event_hub_authorization_rule_id=None, event_hub_name=None, metrics=None, logs=None, workspace_id=None): - super(DiagnosticSettingsResource, self).__init__() - self.storage_account_id = storage_account_id - self.event_hub_authorization_rule_id = event_hub_authorization_rule_id - self.event_hub_name = event_hub_name - self.metrics = metrics - self.logs = logs - self.workspace_id = workspace_id + def __init__(self, **kwargs): + super(DiagnosticSettingsResource, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None) + self.event_hub_name = kwargs.get('event_hub_name', None) + self.metrics = kwargs.get('metrics', None) + self.logs = kwargs.get('logs', None) + self.workspace_id = kwargs.get('workspace_id', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py index 3aee18a1edf6..396b3e7b7afb 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection.py @@ -23,6 +23,6 @@ class DiagnosticSettingsResourceCollection(Model): 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, } - def __init__(self, value=None): - super(DiagnosticSettingsResourceCollection, self).__init__() - self.value = value + def __init__(self, **kwargs): + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py new file mode 100644 index 000000000000..8e1ec8c0813b --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_collection_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticSettingsResourceCollection(Model): + """Represents a collection of alert rule resources. + + :param value: The collection of diagnostic settings resources;. + :type value: list[~azure.mgmt.monitor.models.DiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py new file mode 100644 index 000000000000..7d0526053d72 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/diagnostic_settings_resource_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticSettingsResource(ProxyOnlyResource): + """The diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param storage_account_id: The resource ID of the storage account to which + you would like to send Diagnostic Logs. + :type storage_account_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub + authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, + the default event hub will be selected. + :type event_hub_name: str + :param metrics: the list of metric settings. + :type metrics: list[~azure.mgmt.monitor.models.MetricSettings] + :param logs: the list of logs settings. + :type logs: list[~azure.mgmt.monitor.models.LogSettings] + :param workspace_id: The workspace ID (resource ID of a Log Analytics + workspace) for a Log Analytics workspace to which you would like to send + Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 + :type workspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, + 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + } + + def __init__(self, *, storage_account_id: str=None, event_hub_authorization_rule_id: str=None, event_hub_name: str=None, metrics=None, logs=None, workspace_id: str=None, **kwargs) -> None: + super(DiagnosticSettingsResource, self).__init__(, **kwargs) + self.storage_account_id = storage_account_id + self.event_hub_authorization_rule_id = event_hub_authorization_rule_id + self.event_hub_name = event_hub_name + self.metrics = metrics + self.logs = logs + self.workspace_id = workspace_id diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py index ef6f1c0b0656..558502e35955 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification.py @@ -32,8 +32,8 @@ class EmailNotification(Model): 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, } - def __init__(self, send_to_subscription_administrator=None, send_to_subscription_co_administrators=None, custom_emails=None): - super(EmailNotification, self).__init__() - self.send_to_subscription_administrator = send_to_subscription_administrator - self.send_to_subscription_co_administrators = send_to_subscription_co_administrators - self.custom_emails = custom_emails + def __init__(self, **kwargs): + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = kwargs.get('send_to_subscription_administrator', None) + self.send_to_subscription_co_administrators = kwargs.get('send_to_subscription_co_administrators', None) + self.custom_emails = kwargs.get('custom_emails', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py new file mode 100644 index 000000000000..aef62c2218b5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_notification_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EmailNotification(Model): + """Email notification of an autoscale event. + + :param send_to_subscription_administrator: a value indicating whether to + send email to subscription administrator. + :type send_to_subscription_administrator: bool + :param send_to_subscription_co_administrators: a value indicating whether + to send email to subscription co-administrators. + :type send_to_subscription_co_administrators: bool + :param custom_emails: the custom e-mails list. This value can be null or + empty, in which case this attribute will be ignored. + :type custom_emails: list[str] + """ + + _attribute_map = { + 'send_to_subscription_administrator': {'key': 'sendToSubscriptionAdministrator', 'type': 'bool'}, + 'send_to_subscription_co_administrators': {'key': 'sendToSubscriptionCoAdministrators', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__(self, *, send_to_subscription_administrator: bool=None, send_to_subscription_co_administrators: bool=None, custom_emails=None, **kwargs) -> None: + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = send_to_subscription_administrator + self.send_to_subscription_co_administrators = send_to_subscription_co_administrators + self.custom_emails = custom_emails diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py index 1b1b11c78495..4877d8aea802 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver.py @@ -18,10 +18,12 @@ class EmailReceiver(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name of the email receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the email receiver. Names must be + unique across all receivers within an action group. :type name: str - :param email_address: The email address of this receiver. + :param email_address: Required. The email address of this receiver. :type email_address: str :ivar status: The receiver status of the e-mail. Possible values include: 'NotSpecified', 'Enabled', 'Disabled' @@ -40,8 +42,8 @@ class EmailReceiver(Model): 'status': {'key': 'status', 'type': 'ReceiverStatus'}, } - def __init__(self, name, email_address): - super(EmailReceiver, self).__init__() - self.name = name - self.email_address = email_address + def __init__(self, **kwargs): + super(EmailReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.email_address = kwargs.get('email_address', None) self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py new file mode 100644 index 000000000000..1f9c3f03f4a9 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/email_receiver_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EmailReceiver(Model): + """An email receiver. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the email receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param email_address: Required. The email address of this receiver. + :type email_address: str + :ivar status: The receiver status of the e-mail. Possible values include: + 'NotSpecified', 'Enabled', 'Disabled' + :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ReceiverStatus'}, + } + + def __init__(self, *, name: str, email_address: str, **kwargs) -> None: + super(EmailReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address + self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py index 5f481ee3f3d4..655222716b8c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request.py @@ -15,7 +15,9 @@ class EnableRequest(Model): """Describes a receiver that should be resubscribed. - :param receiver_name: The name of the receiver to resubscribe. + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. :type receiver_name: str """ @@ -27,6 +29,6 @@ class EnableRequest(Model): 'receiver_name': {'key': 'receiverName', 'type': 'str'}, } - def __init__(self, receiver_name): - super(EnableRequest, self).__init__() - self.receiver_name = receiver_name + def __init__(self, **kwargs): + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = kwargs.get('receiver_name', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py new file mode 100644 index 000000000000..cd2037beb359 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/enable_request_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnableRequest(Model): + """Describes a receiver that should be resubscribed. + + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. + :type receiver_name: str + """ + + _validation = { + 'receiver_name': {'required': True}, + } + + _attribute_map = { + 'receiver_name': {'key': 'receiverName', 'type': 'str'}, + } + + def __init__(self, *, receiver_name: str, **kwargs) -> None: + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = receiver_name diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py index 1a399569811b..b3d490a49503 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response.py @@ -27,10 +27,10 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorResponse, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py new file mode 100644 index 000000000000..5504940d6873 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/error_response_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py index 990e7e16a3d8..392b04f3e4a6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data.py @@ -153,8 +153,8 @@ class EventData(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self): - super(EventData, self).__init__() + def __init__(self, **kwargs): + super(EventData, self).__init__(**kwargs) self.authorization = None self.claims = None self.caller = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py new file mode 100644 index 000000000000..79ca08143d5c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py @@ -0,0 +1,181 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EventData(Model): + """The Azure event log entries are of type EventData. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar authorization: + :vartype authorization: ~azure.mgmt.monitor.models.SenderAuthorization + :ivar claims: key value pairs to identify ARM permissions. + :vartype claims: dict[str, str] + :ivar caller: the email address of the user who has performed the + operation, the UPN claim or SPN claim based on availability. + :vartype caller: str + :ivar description: the description of the event. + :vartype description: str + :ivar id: the Id of this event as required by ARM for RBAC. It contains + the EventDataID and a timestamp information. + :vartype id: str + :ivar event_data_id: the event data Id. This is a unique identifier for an + event. + :vartype event_data_id: str + :ivar correlation_id: the correlation Id, usually a GUID in the string + format. The correlation Id is shared among the events that belong to the + same uber operation. + :vartype correlation_id: str + :ivar event_name: the event name. This value should not be confused with + OperationName. For practical purposes, OperationName might be more + appealing to end users. + :vartype event_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar category: the event category. + :vartype category: ~azure.mgmt.monitor.models.LocalizableString + :ivar http_request: the HTTP request info. Usually includes the + 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated + the event) and 'method' (HTTP method e.g. PUT). + :vartype http_request: ~azure.mgmt.monitor.models.HttpRequestInfo + :ivar level: the event level. Possible values include: 'Critical', + 'Error', 'Warning', 'Informational', 'Verbose' + :vartype level: str or ~azure.mgmt.monitor.models.EventLevel + :ivar resource_group_name: the resource group name of the impacted + resource. + :vartype resource_group_name: str + :ivar resource_provider_name: the resource provider name of the impacted + resource. + :vartype resource_provider_name: + ~azure.mgmt.monitor.models.LocalizableString + :ivar resource_id: the resource uri that uniquely identifies the resource + that caused this event. + :vartype resource_id: str + :ivar resource_type: the resource type + :vartype resource_type: ~azure.mgmt.monitor.models.LocalizableString + :ivar operation_id: It is usually a GUID shared among the events + corresponding to single operation. This value should not be confused with + EventName. + :vartype operation_id: str + :ivar operation_name: the operation name. + :vartype operation_name: ~azure.mgmt.monitor.models.LocalizableString + :ivar properties: the set of pairs (usually a + Dictionary) that includes details about the event. + :vartype properties: dict[str, str] + :ivar status: a string describing the status of the operation. Some + typical values are: Started, In progress, Succeeded, Failed, Resolved. + :vartype status: ~azure.mgmt.monitor.models.LocalizableString + :ivar sub_status: the event sub status. Most of the time, when included, + this captures the HTTP status code of the REST call. Common values are: OK + (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP + Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP + Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP + Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service + Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: + 504) + :vartype sub_status: ~azure.mgmt.monitor.models.LocalizableString + :ivar event_timestamp: the timestamp of when the event was generated by + the Azure service processing the request corresponding the event. It in + ISO 8601 format. + :vartype event_timestamp: datetime + :ivar submission_timestamp: the timestamp of when the event became + available for querying via this API. It is in ISO 8601 format. This value + should not be confused eventTimestamp. As there might be a delay between + the occurrence time of the event, and the time that the event is submitted + to the Azure logging infrastructure. + :vartype submission_timestamp: datetime + :ivar subscription_id: the Azure subscription Id usually a GUID. + :vartype subscription_id: str + :ivar tenant_id: the Azure tenant Id + :vartype tenant_id: str + """ + + _validation = { + 'authorization': {'readonly': True}, + 'claims': {'readonly': True}, + 'caller': {'readonly': True}, + 'description': {'readonly': True}, + 'id': {'readonly': True}, + 'event_data_id': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'event_name': {'readonly': True}, + 'category': {'readonly': True}, + 'http_request': {'readonly': True}, + 'level': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_provider_name': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'operation_id': {'readonly': True}, + 'operation_name': {'readonly': True}, + 'properties': {'readonly': True}, + 'status': {'readonly': True}, + 'sub_status': {'readonly': True}, + 'event_timestamp': {'readonly': True}, + 'submission_timestamp': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'authorization': {'key': 'authorization', 'type': 'SenderAuthorization'}, + 'claims': {'key': 'claims', 'type': '{str}'}, + 'caller': {'key': 'caller', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'event_data_id': {'key': 'eventDataId', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'LocalizableString'}, + 'category': {'key': 'category', 'type': 'LocalizableString'}, + 'http_request': {'key': 'httpRequest', 'type': 'HttpRequestInfo'}, + 'level': {'key': 'level', 'type': 'EventLevel'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'LocalizableString'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'LocalizableString'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'LocalizableString'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'LocalizableString'}, + 'sub_status': {'key': 'subStatus', 'type': 'LocalizableString'}, + 'event_timestamp': {'key': 'eventTimestamp', 'type': 'iso-8601'}, + 'submission_timestamp': {'key': 'submissionTimestamp', 'type': 'iso-8601'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(EventData, self).__init__(**kwargs) + self.authorization = None + self.claims = None + self.caller = None + self.description = None + self.id = None + self.event_data_id = None + self.correlation_id = None + self.event_name = None + self.category = None + self.http_request = None + self.level = None + self.resource_group_name = None + self.resource_provider_name = None + self.resource_id = None + self.resource_type = None + self.operation_id = None + self.operation_name = None + self.properties = None + self.status = None + self.sub_status = None + self.event_timestamp = None + self.submission_timestamp = None + self.subscription_id = None + self.tenant_id = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py index d25e92a5190f..45e910390503 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info.py @@ -32,9 +32,9 @@ class HttpRequestInfo(Model): 'uri': {'key': 'uri', 'type': 'str'}, } - def __init__(self, client_request_id=None, client_ip_address=None, method=None, uri=None): - super(HttpRequestInfo, self).__init__() - self.client_request_id = client_request_id - self.client_ip_address = client_ip_address - self.method = method - self.uri = uri + def __init__(self, **kwargs): + super(HttpRequestInfo, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) + self.client_ip_address = kwargs.get('client_ip_address', None) + self.method = kwargs.get('method', None) + self.uri = kwargs.get('uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py new file mode 100644 index 000000000000..5e0e15d35a83 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/http_request_info_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRequestInfo(Model): + """The Http request info. + + :param client_request_id: the client request id. + :type client_request_id: str + :param client_ip_address: the client Ip Address + :type client_ip_address: str + :param method: the Http request method. + :type method: str + :param uri: the Uri. + :type uri: str + """ + + _attribute_map = { + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'client_ip_address': {'key': 'clientIpAddress', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, client_ip_address: str=None, method: str=None, uri: str=None, **kwargs) -> None: + super(HttpRequestInfo, self).__init__(**kwargs) + self.client_request_id = client_request_id + self.client_ip_address = client_ip_address + self.method = method + self.uri = uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py index be7eb38e45f0..806624781a55 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident.py @@ -49,8 +49,8 @@ class Incident(Model): 'resolved_time': {'key': 'resolvedTime', 'type': 'iso-8601'}, } - def __init__(self): - super(Incident, self).__init__() + def __init__(self, **kwargs): + super(Incident, self).__init__(**kwargs) self.name = None self.rule_name = None self.is_active = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py new file mode 100644 index 000000000000..ea8b18ee8554 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/incident_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Incident(Model): + """An alert incident indicates the activation status of an alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Incident name. + :vartype name: str + :ivar rule_name: Rule name that is associated with the incident. + :vartype rule_name: str + :ivar is_active: A boolean to indicate whether the incident is active or + resolved. + :vartype is_active: bool + :ivar activated_time: The time at which the incident was activated in + ISO8601 format. + :vartype activated_time: datetime + :ivar resolved_time: The time at which the incident was resolved in + ISO8601 format. If null, it means the incident is still active. + :vartype resolved_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'rule_name': {'readonly': True}, + 'is_active': {'readonly': True}, + 'activated_time': {'readonly': True}, + 'resolved_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'activated_time': {'key': 'activatedTime', 'type': 'iso-8601'}, + 'resolved_time': {'key': 'resolvedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(Incident, self).__init__(**kwargs) + self.name = None + self.rule_name = None + self.is_active = None + self.activated_time = None + self.resolved_time = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py index 3d58ce856e98..054037009c07 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver.py @@ -15,18 +15,21 @@ class ItsmReceiver(Model): """An Itsm receiver. - :param name: The name of the Itsm receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique + across all receivers within an action group. :type name: str - :param workspace_id: OMS LA instance identifier. + :param workspace_id: Required. OMS LA instance identifier. :type workspace_id: str - :param connection_id: Unique identification of ITSM connection among - multiple defined in above workspace. + :param connection_id: Required. Unique identification of ITSM connection + among multiple defined in above workspace. :type connection_id: str - :param ticket_configuration: JSON blob for the configurations of the ITSM - action. CreateMultipleWorkItems option will be part of this blob as well. + :param ticket_configuration: Required. JSON blob for the configurations of + the ITSM action. CreateMultipleWorkItems option will be part of this blob + as well. :type ticket_configuration: str - :param region: Region in which workspace resides. Supported + :param region: Required. Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' :type region: str """ @@ -47,10 +50,10 @@ class ItsmReceiver(Model): 'region': {'key': 'region', 'type': 'str'}, } - def __init__(self, name, workspace_id, connection_id, ticket_configuration, region): - super(ItsmReceiver, self).__init__() - self.name = name - self.workspace_id = workspace_id - self.connection_id = connection_id - self.ticket_configuration = ticket_configuration - self.region = region + def __init__(self, **kwargs): + super(ItsmReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.connection_id = kwargs.get('connection_id', None) + self.ticket_configuration = kwargs.get('ticket_configuration', None) + self.region = kwargs.get('region', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py new file mode 100644 index 000000000000..581cb90911b5 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/itsm_receiver_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ItsmReceiver(Model): + """An Itsm receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param workspace_id: Required. OMS LA instance identifier. + :type workspace_id: str + :param connection_id: Required. Unique identification of ITSM connection + among multiple defined in above workspace. + :type connection_id: str + :param ticket_configuration: Required. JSON blob for the configurations of + the ITSM action. CreateMultipleWorkItems option will be part of this blob + as well. + :type ticket_configuration: str + :param region: Required. Region in which workspace resides. Supported + values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' + :type region: str + """ + + _validation = { + 'name': {'required': True}, + 'workspace_id': {'required': True}, + 'connection_id': {'required': True}, + 'ticket_configuration': {'required': True}, + 'region': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, *, name: str, workspace_id: str, connection_id: str, ticket_configuration: str, region: str, **kwargs) -> None: + super(ItsmReceiver, self).__init__(**kwargs) + self.name = name + self.workspace_id = workspace_id + self.connection_id = connection_id + self.ticket_configuration = ticket_configuration + self.region = region diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py index 3e058e870290..05db04fb721f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string.py @@ -15,7 +15,9 @@ class LocalizableString(Model): """The localizable string class. - :param value: the invariant value. + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. :type value: str :param localized_value: the locale specific value. :type localized_value: str @@ -30,7 +32,7 @@ class LocalizableString(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value, localized_value=None): - super(LocalizableString, self).__init__() - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(LocalizableString, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py new file mode 100644 index 000000000000..8bae3303a19f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/localizable_string_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LocalizableString(Model): + """The localizable string class. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. + :type value: str + :param localized_value: the locale specific value. + :type localized_value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str, localized_value: str=None, **kwargs) -> None: + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py index 5c67c3027dd2..50a9b346dbd6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition.py @@ -15,17 +15,19 @@ class LocationThresholdRuleCondition(RuleCondition): """A rule condition based on a certain number of locations failing. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. :type window_size: timedelta - :param failed_location_count: the number of locations that must fail to - activate the alert. + :param failed_location_count: Required. the number of locations that must + fail to activate the alert. :type failed_location_count: int """ @@ -41,8 +43,8 @@ class LocationThresholdRuleCondition(RuleCondition): 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, } - def __init__(self, failed_location_count, data_source=None, window_size=None): - super(LocationThresholdRuleCondition, self).__init__(data_source=data_source) - self.window_size = window_size - self.failed_location_count = failed_location_count + def __init__(self, **kwargs): + super(LocationThresholdRuleCondition, self).__init__(**kwargs) + self.window_size = kwargs.get('window_size', None) + self.failed_location_count = kwargs.get('failed_location_count', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py new file mode 100644 index 000000000000..1d4157b8cdd1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/location_threshold_rule_condition_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + :param failed_location_count: Required. the number of locations that must + fail to activate the alert. + :type failed_location_count: int + """ + + _validation = { + 'odatatype': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__(self, *, failed_location_count: int, data_source=None, window_size=None, **kwargs) -> None: + super(LocationThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.window_size = window_size + self.failed_location_count = failed_location_count + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py index 0ab72410609a..42e068ce12b8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource.py @@ -18,13 +18,15 @@ class LogProfileResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] @@ -36,15 +38,16 @@ class LogProfileResource(Resource): the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. :type service_bus_rule_id: str - :param locations: List of regions for which Activity Log events should be - stored or streamed. It is a comma separated list of valid ARM locations - including the 'global' location. + :param locations: Required. List of regions for which Activity Log events + should be stored or streamed. It is a comma separated list of valid ARM + locations including the 'global' location. :type locations: list[str] - :param categories: the categories of the logs. These categories are - created as is convenient to the user. Some values are: 'Write', 'Delete', - and/or 'Action.' + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' :type categories: list[str] - :param retention_policy: the retention policy for the events in the log. + :param retention_policy: Required. the retention policy for the events in + the log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy """ @@ -71,10 +74,10 @@ class LogProfileResource(Resource): 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, location, locations, categories, retention_policy, tags=None, storage_account_id=None, service_bus_rule_id=None): - super(LogProfileResource, self).__init__(location=location, tags=tags) - self.storage_account_id = storage_account_id - self.service_bus_rule_id = service_bus_rule_id - self.locations = locations - self.categories = categories - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogProfileResource, self).__init__(**kwargs) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.locations = kwargs.get('locations', None) + self.categories = kwargs.get('categories', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py index d5a5316148d6..c6ae3dc17e4b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py @@ -15,6 +15,8 @@ class LogProfileResourcePatch(Model): """The log profile resource for patch operations. + All required parameters must be populated in order to send to Azure. + :param tags: Resource tags :type tags: dict[str, str] :param storage_account_id: the resource id of the storage account to which @@ -25,15 +27,16 @@ class LogProfileResourcePatch(Model): the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. :type service_bus_rule_id: str - :param locations: List of regions for which Activity Log events should be - stored or streamed. It is a comma separated list of valid ARM locations - including the 'global' location. + :param locations: Required. List of regions for which Activity Log events + should be stored or streamed. It is a comma separated list of valid ARM + locations including the 'global' location. :type locations: list[str] - :param categories: the categories of the logs. These categories are - created as is convenient to the user. Some values are: 'Write', 'Delete', - and/or 'Action.' + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' :type categories: list[str] - :param retention_policy: the retention policy for the events in the log. + :param retention_policy: Required. the retention policy for the events in + the log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy """ @@ -52,11 +55,11 @@ class LogProfileResourcePatch(Model): 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, locations, categories, retention_policy, tags=None, storage_account_id=None, service_bus_rule_id=None): - super(LogProfileResourcePatch, self).__init__() - self.tags = tags - self.storage_account_id = storage_account_id - self.service_bus_rule_id = service_bus_rule_id - self.locations = locations - self.categories = categories - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogProfileResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.locations = kwargs.get('locations', None) + self.categories = kwargs.get('categories', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py new file mode 100644 index 000000000000..783dc9fb262c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogProfileResourcePatch(Model): + """The log profile resource for patch operations. + + All required parameters must be populated in order to send to Azure. + + :param tags: Resource tags + :type tags: dict[str, str] + :param storage_account_id: the resource id of the storage account to which + you would like to send the Activity Log. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule ID of the service bus + namespace in which you would like to have Event Hubs created for streaming + the Activity Log. The rule ID is of the format: '{service bus resource + ID}/authorizationrules/{key name}'. + :type service_bus_rule_id: str + :param locations: Required. List of regions for which Activity Log events + should be stored or streamed. It is a comma separated list of valid ARM + locations including the 'global' location. + :type locations: list[str] + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' + :type categories: list[str] + :param retention_policy: Required. the retention policy for the events in + the log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'locations': {'required': True}, + 'categories': {'required': True}, + 'retention_policy': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, locations, categories, retention_policy, tags=None, storage_account_id: str=None, service_bus_rule_id: str=None, **kwargs) -> None: + super(LogProfileResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.locations = locations + self.categories = categories + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py new file mode 100644 index 000000000000..ec376218e6c2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class LogProfileResource(Resource): + """The log profile resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param storage_account_id: the resource id of the storage account to which + you would like to send the Activity Log. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule ID of the service bus + namespace in which you would like to have Event Hubs created for streaming + the Activity Log. The rule ID is of the format: '{service bus resource + ID}/authorizationrules/{key name}'. + :type service_bus_rule_id: str + :param locations: Required. List of regions for which Activity Log events + should be stored or streamed. It is a comma separated list of valid ARM + locations including the 'global' location. + :type locations: list[str] + :param categories: Required. the categories of the logs. These categories + are created as is convenient to the user. Some values are: 'Write', + 'Delete', and/or 'Action.' + :type categories: list[str] + :param retention_policy: Required. the retention policy for the events in + the log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'locations': {'required': True}, + 'categories': {'required': True}, + 'retention_policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + 'categories': {'key': 'properties.categories', 'type': '[str]'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, location: str, locations, categories, retention_policy, tags=None, storage_account_id: str=None, service_bus_rule_id: str=None, **kwargs) -> None: + super(LogProfileResource, self).__init__(location=location, tags=tags, **kwargs) + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.locations = locations + self.categories = categories + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py index 6e5b89a68254..fa6e2a4103da 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings.py @@ -16,12 +16,14 @@ class LogSettings(Model): """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. + All required parameters must be populated in order to send to Azure. + :param category: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. :type category: str - :param enabled: a value indicating whether this log is enabled. + :param enabled: Required. a value indicating whether this log is enabled. :type enabled: bool :param retention_policy: the retention policy for this log. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy @@ -37,8 +39,8 @@ class LogSettings(Model): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, enabled, category=None, retention_policy=None): - super(LogSettings, self).__init__() - self.category = category - self.enabled = enabled - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(LogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.enabled = kwargs.get('enabled', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py new file mode 100644 index 000000000000..a1b7ac84dee6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/log_settings_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LogSettings(Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a + particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Diagnostic Log category for a resource type + this setting is applied to. To obtain the list of Diagnostic Log + categories for a resource, first perform a GET diagnostic settings + operation. + :type category: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this log. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, enabled: bool, category: str=None, retention_policy=None, **kwargs) -> None: + super(LogSettings, self).__init__(**kwargs) + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py index 5e0e19292cac..1bbdf560448d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition.py @@ -32,8 +32,8 @@ class ManagementEventAggregationCondition(Model): 'window_size': {'key': 'windowSize', 'type': 'duration'}, } - def __init__(self, operator=None, threshold=None, window_size=None): - super(ManagementEventAggregationCondition, self).__init__() - self.operator = operator - self.threshold = threshold - self.window_size = window_size + def __init__(self, **kwargs): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py new file mode 100644 index 000000000000..4591b5292d5e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_aggregation_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementEventAggregationCondition(Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: + 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'ConditionOperator'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__(self, *, operator=None, threshold: float=None, window_size=None, **kwargs) -> None: + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py index 5c6775bb0f67..5aead2a65738 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition.py @@ -15,10 +15,12 @@ class ManagementEventRuleCondition(RuleCondition): """A management event rule condition. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event @@ -38,7 +40,7 @@ class ManagementEventRuleCondition(RuleCondition): 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, } - def __init__(self, data_source=None, aggregation=None): - super(ManagementEventRuleCondition, self).__init__(data_source=data_source) - self.aggregation = aggregation + def __init__(self, **kwargs): + super(ManagementEventRuleCondition, self).__init__(**kwargs) + self.aggregation = kwargs.get('aggregation', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py new file mode 100644 index 000000000000..6de67497fbcd --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/management_event_rule_condition_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param aggregation: How the data that is collected should be combined over + time and when the alert is activated. Note that for management event + alerts aggregation is optional – if it is not provided then any event will + cause the alert to activate. + :type aggregation: + ~azure.mgmt.monitor.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__(self, *, data_source=None, aggregation=None, **kwargs) -> None: + super(ManagementEventRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.aggregation = aggregation + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py index 21d0ba797749..4ce548907f00 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value.py @@ -26,7 +26,7 @@ class MetadataValue(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(MetadataValue, self).__init__() - self.name = name - self.value = value + def __init__(self, **kwargs): + super(MetadataValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py new file mode 100644 index 000000000000..9e23ac9e985a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metadata_value_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetadataValue(Model): + """Represents a metric metadata value. + + :param name: the name of the metadata. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param value: the value of the metadata. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name=None, value: str=None, **kwargs) -> None: + super(MetadataValue, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py index 4ae5e08847bc..03cad7fe40ed 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric.py @@ -15,18 +15,20 @@ class Metric(Model): """The result data of a query. - :param id: the metric Id. + All required parameters must be populated in order to send to Azure. + + :param id: Required. the metric Id. :type id: str - :param type: the resource type of the metric resource. + :param type: Required. the resource type of the metric resource. :type type: str - :param name: the name and the display name of the metric, i.e. it is - localizable string. + :param name: Required. the name and the display name of the metric, i.e. + it is localizable string. :type name: ~azure.mgmt.monitor.models.LocalizableString - :param unit: the unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :param unit: Required. the unit of the metric. Possible values include: + 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' :type unit: str or ~azure.mgmt.monitor.models.Unit - :param timeseries: the time series returned when a data query is + :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~azure.mgmt.monitor.models.TimeSeriesElement] """ @@ -47,10 +49,10 @@ class Metric(Model): 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } - def __init__(self, id, type, name, unit, timeseries): - super(Metric, self).__init__() - self.id = id - self.type = type - self.name = name - self.unit = unit - self.timeseries = timeseries + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.timeseries = kwargs.get('timeseries', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py index d46322343000..a50838988a18 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability.py @@ -29,7 +29,7 @@ class MetricAvailability(Model): 'retention': {'key': 'retention', 'type': 'duration'}, } - def __init__(self, time_grain=None, retention=None): - super(MetricAvailability, self).__init__() - self.time_grain = time_grain - self.retention = retention + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py new file mode 100644 index 000000000000..32f1d11c91f7 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_availability_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricAvailability(Model): + """Metric availability specifies the time grain (aggregation interval or + frequency) and the retention period for that time grain. + + :param time_grain: the time grain specifies the aggregation interval for + the metric. Expressed as a duration 'PT1M', 'P1D', etc. + :type time_grain: timedelta + :param retention: the retention period for the metric at the specified + timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + :type retention: timedelta + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'retention': {'key': 'retention', 'type': 'duration'}, + } + + def __init__(self, *, time_grain=None, retention=None, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py index 321a5a0781f2..4347bb0e6fd6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition.py @@ -63,15 +63,15 @@ class MetricDefinition(Model): 'dimensions': {'key': 'dimensions', 'type': '[LocalizableString]'}, } - def __init__(self, is_dimension_required=None, resource_id=None, namespace=None, name=None, unit=None, primary_aggregation_type=None, supported_aggregation_types=None, metric_availabilities=None, id=None, dimensions=None): - super(MetricDefinition, self).__init__() - self.is_dimension_required = is_dimension_required - self.resource_id = resource_id - self.namespace = namespace - self.name = name - self.unit = unit - self.primary_aggregation_type = primary_aggregation_type - self.supported_aggregation_types = supported_aggregation_types - self.metric_availabilities = metric_availabilities - self.id = id - self.dimensions = dimensions + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.is_dimension_required = kwargs.get('is_dimension_required', None) + self.resource_id = kwargs.get('resource_id', None) + self.namespace = kwargs.get('namespace', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.primary_aggregation_type = kwargs.get('primary_aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.metric_availabilities = kwargs.get('metric_availabilities', None) + self.id = kwargs.get('id', None) + self.dimensions = kwargs.get('dimensions', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py new file mode 100644 index 000000000000..7ec1d11d319e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_definition_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricDefinition(Model): + """Metric definition class specifies the metadata for a metric. + + :param is_dimension_required: Flag to indicate whether the dimension is + required. + :type is_dimension_required: bool + :param resource_id: the resource identifier of the resource that emitted + the metric. + :type resource_id: str + :param namespace: the namespace the metric blongs to. + :type namespace: str + :param name: the name and the display name of the metric, i.e. it is a + localizable string. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param unit: the unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', + 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :type unit: str or ~azure.mgmt.monitor.models.Unit + :param primary_aggregation_type: the primary aggregation type value + defining how to use the values for display. Possible values include: + 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + :type primary_aggregation_type: str or + ~azure.mgmt.monitor.models.AggregationType + :param supported_aggregation_types: the collection of what aggregation + types are supported. + :type supported_aggregation_types: list[str or + ~azure.mgmt.monitor.models.AggregationType] + :param metric_availabilities: the collection of what aggregation intervals + are available to be queried. + :type metric_availabilities: + list[~azure.mgmt.monitor.models.MetricAvailability] + :param id: the resource identifier of the metric definition. + :type id: str + :param dimensions: the name and the display name of the dimension, i.e. it + is a localizable string. + :type dimensions: list[~azure.mgmt.monitor.models.LocalizableString] + """ + + _attribute_map = { + 'is_dimension_required': {'key': 'isDimensionRequired', 'type': 'bool'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'unit': {'key': 'unit', 'type': 'Unit'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'AggregationType'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[AggregationType]'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[LocalizableString]'}, + } + + def __init__(self, *, is_dimension_required: bool=None, resource_id: str=None, namespace: str=None, name=None, unit=None, primary_aggregation_type=None, supported_aggregation_types=None, metric_availabilities=None, id: str=None, dimensions=None, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.is_dimension_required = is_dimension_required + self.resource_id = resource_id + self.namespace = namespace + self.name = name + self.unit = unit + self.primary_aggregation_type = primary_aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.metric_availabilities = metric_availabilities + self.id = id + self.dimensions = dimensions diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py new file mode 100644 index 000000000000..fde8b416e98f --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Metric(Model): + """The result data of a query. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. the metric Id. + :type id: str + :param type: Required. the resource type of the metric resource. + :type type: str + :param name: Required. the name and the display name of the metric, i.e. + it is localizable string. + :type name: ~azure.mgmt.monitor.models.LocalizableString + :param unit: Required. the unit of the metric. Possible values include: + 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + :type unit: str or ~azure.mgmt.monitor.models.Unit + :param timeseries: Required. the time series returned when a data query is + performed. + :type timeseries: list[~azure.mgmt.monitor.models.TimeSeriesElement] + """ + + _validation = { + 'id': {'required': True}, + 'type': {'required': True}, + 'name': {'required': True}, + 'unit': {'required': True}, + 'timeseries': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'unit': {'key': 'unit', 'type': 'Unit'}, + 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, + } + + def __init__(self, *, id: str, type: str, name, unit, timeseries, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.unit = unit + self.timeseries = timeseries diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py index 11de4a95fb41..e62931905b34 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings.py @@ -16,6 +16,8 @@ class MetricSettings(Model): """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. + All required parameters must be populated in order to send to Azure. + :param time_grain: the timegrain of the metric in ISO8601 format. :type time_grain: timedelta :param category: Name of a Diagnostic Metric category for a resource type @@ -23,7 +25,8 @@ class MetricSettings(Model): categories for a resource, first perform a GET diagnostic settings operation. :type category: str - :param enabled: a value indicating whether this category is enabled. + :param enabled: Required. a value indicating whether this category is + enabled. :type enabled: bool :param retention_policy: the retention policy for this category. :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy @@ -40,9 +43,9 @@ class MetricSettings(Model): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, enabled, time_grain=None, category=None, retention_policy=None): - super(MetricSettings, self).__init__() - self.time_grain = time_grain - self.category = category - self.enabled = enabled - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.category = kwargs.get('category', None) + self.enabled = kwargs.get('enabled', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py new file mode 100644 index 000000000000..1fc0eb1ddb20 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_settings_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSettings(Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a + particular metric. + + All required parameters must be populated in order to send to Azure. + + :param time_grain: the timegrain of the metric in ISO8601 format. + :type time_grain: timedelta + :param category: Name of a Diagnostic Metric category for a resource type + this setting is applied to. To obtain the list of Diagnostic metric + categories for a resource, first perform a GET diagnostic settings + operation. + :type category: str + :param enabled: Required. a value indicating whether this category is + enabled. + :type enabled: bool + :param retention_policy: the retention policy for this category. + :type retention_policy: ~azure.mgmt.monitor.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, enabled: bool, time_grain=None, category: str=None, retention_policy=None, **kwargs) -> None: + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = time_grain + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py index b374fb2a039a..0bc042577bb6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger.py @@ -15,35 +15,39 @@ class MetricTrigger(Model): """The trigger that results in a scaling action. - :param metric_name: the name of the metric that defines what the rule - monitors. - :type metric_name: str - :param metric_resource_uri: the resource identifier of the resource the + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the rule monitors. + :type metric_name: str + :param metric_resource_uri: Required. the resource identifier of the + resource the rule monitors. :type metric_resource_uri: str - :param time_grain: the granularity of metrics the rule monitors. Must be - one of the predefined values returned from metric definitions for the - metric. Must be between 12 hours and 1 minute. + :param time_grain: Required. the granularity of metrics the rule monitors. + Must be one of the predefined values returned from metric definitions for + the metric. Must be between 12 hours and 1 minute. :type time_grain: timedelta - :param statistic: the metric statistic type. How the metrics from multiple - instances are combined. Possible values include: 'Average', 'Min', 'Max', - 'Sum' + :param statistic: Required. the metric statistic type. How the metrics + from multiple instances are combined. Possible values include: 'Average', + 'Min', 'Max', 'Sum' :type statistic: str or ~azure.mgmt.monitor.models.MetricStatisticType - :param time_window: the range of time in which instance data is collected. - This value must be greater than the delay in metric collection, which can - vary from resource-to-resource. Must be between 12 hours and 5 minutes. + :param time_window: Required. the range of time in which instance data is + collected. This value must be greater than the delay in metric collection, + which can vary from resource-to-resource. Must be between 12 hours and 5 + minutes. :type time_window: timedelta - :param time_aggregation: time aggregation type. How the data that is - collected should be combined over time. The default value is Average. - Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count' + :param time_aggregation: Required. time aggregation type. How the data + that is collected should be combined over time. The default value is + Average. Possible values include: 'Average', 'Minimum', 'Maximum', + 'Total', 'Count' :type time_aggregation: str or ~azure.mgmt.monitor.models.TimeAggregationType - :param operator: the operator that is used to compare the metric data and - the threshold. Possible values include: 'Equals', 'NotEquals', + :param operator: Required. the operator that is used to compare the metric + data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' :type operator: str or ~azure.mgmt.monitor.models.ComparisonOperationType - :param threshold: the threshold of the metric that triggers the scale - action. + :param threshold: Required. the threshold of the metric that triggers the + scale action. :type threshold: float """ @@ -69,13 +73,13 @@ class MetricTrigger(Model): 'threshold': {'key': 'threshold', 'type': 'float'}, } - def __init__(self, metric_name, metric_resource_uri, time_grain, statistic, time_window, time_aggregation, operator, threshold): - super(MetricTrigger, self).__init__() - self.metric_name = metric_name - self.metric_resource_uri = metric_resource_uri - self.time_grain = time_grain - self.statistic = statistic - self.time_window = time_window - self.time_aggregation = time_aggregation - self.operator = operator - self.threshold = threshold + def __init__(self, **kwargs): + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.metric_resource_uri = kwargs.get('metric_resource_uri', None) + self.time_grain = kwargs.get('time_grain', None) + self.statistic = kwargs.get('statistic', None) + self.time_window = kwargs.get('time_window', None) + self.time_aggregation = kwargs.get('time_aggregation', None) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py new file mode 100644 index 000000000000..991b29d2707c --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_trigger_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricTrigger(Model): + """The trigger that results in a scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the + rule monitors. + :type metric_name: str + :param metric_resource_uri: Required. the resource identifier of the + resource the rule monitors. + :type metric_resource_uri: str + :param time_grain: Required. the granularity of metrics the rule monitors. + Must be one of the predefined values returned from metric definitions for + the metric. Must be between 12 hours and 1 minute. + :type time_grain: timedelta + :param statistic: Required. the metric statistic type. How the metrics + from multiple instances are combined. Possible values include: 'Average', + 'Min', 'Max', 'Sum' + :type statistic: str or ~azure.mgmt.monitor.models.MetricStatisticType + :param time_window: Required. the range of time in which instance data is + collected. This value must be greater than the delay in metric collection, + which can vary from resource-to-resource. Must be between 12 hours and 5 + minutes. + :type time_window: timedelta + :param time_aggregation: Required. time aggregation type. How the data + that is collected should be combined over time. The default value is + Average. Possible values include: 'Average', 'Minimum', 'Maximum', + 'Total', 'Count' + :type time_aggregation: str or + ~azure.mgmt.monitor.models.TimeAggregationType + :param operator: Required. the operator that is used to compare the metric + data and the threshold. Possible values include: 'Equals', 'NotEquals', + 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ComparisonOperationType + :param threshold: Required. the threshold of the metric that triggers the + scale action. + :type threshold: float + """ + + _validation = { + 'metric_name': {'required': True}, + 'metric_resource_uri': {'required': True}, + 'time_grain': {'required': True}, + 'statistic': {'required': True}, + 'time_window': {'required': True}, + 'time_aggregation': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'statistic': {'key': 'statistic', 'type': 'MetricStatisticType'}, + 'time_window': {'key': 'timeWindow', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationType'}, + 'operator': {'key': 'operator', 'type': 'ComparisonOperationType'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + } + + def __init__(self, *, metric_name: str, metric_resource_uri: str, time_grain, statistic, time_window, time_aggregation, operator, threshold: float, **kwargs) -> None: + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.metric_resource_uri = metric_resource_uri + self.time_grain = time_grain + self.statistic = statistic + self.time_window = time_window + self.time_aggregation = time_aggregation + self.operator = operator + self.threshold = threshold diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py index 5b5a550057ba..80af772b92be 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value.py @@ -15,7 +15,10 @@ class MetricValue(Model): """Represents a metric value. - :param time_stamp: the timestamp for the metric value in ISO 8601 format. + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO + 8601 format. :type time_stamp: datetime :param average: the average value in the time range. :type average: float @@ -43,11 +46,11 @@ class MetricValue(Model): 'count': {'key': 'count', 'type': 'long'}, } - def __init__(self, time_stamp, average=None, minimum=None, maximum=None, total=None, count=None): - super(MetricValue, self).__init__() - self.time_stamp = time_stamp - self.average = average - self.minimum = minimum - self.maximum = maximum - self.total = total - self.count = count + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self.time_stamp = kwargs.get('time_stamp', None) + self.average = kwargs.get('average', None) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.total = kwargs.get('total', None) + self.count = kwargs.get('count', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py new file mode 100644 index 000000000000..c6c65186df25 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_value_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricValue(Model): + """Represents a metric value. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO + 8601 format. + :type time_stamp: datetime + :param average: the average value in the time range. + :type average: float + :param minimum: the least value in the time range. + :type minimum: float + :param maximum: the greatest value in the time range. + :type maximum: float + :param total: the sum of all of the values in the time range. + :type total: float + :param count: the number of samples in the time range. Can be used to + determine the number of values that contributed to the average value. + :type count: long + """ + + _validation = { + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'total': {'key': 'total', 'type': 'float'}, + 'count': {'key': 'count', 'type': 'long'}, + } + + def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: int=None, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self.time_stamp = time_stamp + self.average = average + self.minimum = minimum + self.maximum = maximum + self.total = total + self.count = count diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py index 9475e9ad4e05..0f3e04d11484 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/monitor_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class MetricStatisticType(Enum): +class MetricStatisticType(str, Enum): average = "Average" min = "Min" @@ -20,7 +20,7 @@ class MetricStatisticType(Enum): sum = "Sum" -class TimeAggregationType(Enum): +class TimeAggregationType(str, Enum): average = "Average" minimum = "Minimum" @@ -29,7 +29,7 @@ class TimeAggregationType(Enum): count = "Count" -class ComparisonOperationType(Enum): +class ComparisonOperationType(str, Enum): equals = "Equals" not_equals = "NotEquals" @@ -39,21 +39,21 @@ class ComparisonOperationType(Enum): less_than_or_equal = "LessThanOrEqual" -class ScaleDirection(Enum): +class ScaleDirection(str, Enum): none = "None" increase = "Increase" decrease = "Decrease" -class ScaleType(Enum): +class ScaleType(str, Enum): change_count = "ChangeCount" percent_change_count = "PercentChangeCount" exact_count = "ExactCount" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): none = "None" second = "Second" @@ -65,7 +65,7 @@ class RecurrenceFrequency(Enum): year = "Year" -class ConditionOperator(Enum): +class ConditionOperator(str, Enum): greater_than = "GreaterThan" greater_than_or_equal = "GreaterThanOrEqual" @@ -73,7 +73,7 @@ class ConditionOperator(Enum): less_than_or_equal = "LessThanOrEqual" -class TimeAggregationOperator(Enum): +class TimeAggregationOperator(str, Enum): average = "Average" minimum = "Minimum" @@ -82,20 +82,20 @@ class TimeAggregationOperator(Enum): last = "Last" -class CategoryType(Enum): +class CategoryType(str, Enum): metrics = "Metrics" logs = "Logs" -class ReceiverStatus(Enum): +class ReceiverStatus(str, Enum): not_specified = "NotSpecified" enabled = "Enabled" disabled = "Disabled" -class EventLevel(Enum): +class EventLevel(str, Enum): critical = "Critical" error = "Error" @@ -104,7 +104,7 @@ class EventLevel(Enum): verbose = "Verbose" -class Unit(Enum): +class Unit(str, Enum): count = "Count" bytes = "Bytes" @@ -117,7 +117,7 @@ class Unit(Enum): unspecified = "Unspecified" -class AggregationType(Enum): +class AggregationType(str, Enum): none = "None" average = "Average" @@ -127,14 +127,14 @@ class AggregationType(Enum): total = "Total" -class Sensitivity(Enum): +class Sensitivity(str, Enum): low = "Low" medium = "Medium" high = "High" -class ResultType(Enum): +class ResultType(str, Enum): data = "Data" metadata = "Metadata" diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py index dc5a77d93a18..0a5d8d878f02 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation.py @@ -26,7 +26,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - super(Operation, self).__init__() - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py index 82830778f953..55dcaf3793ab 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display.py @@ -30,8 +30,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py new file mode 100644 index 000000000000..22b9a326e4a0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft.Insights + :type provider: str + :param resource: Resource on which the operation is performed: AlertRules, + Autoscale, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py index 28f86e07b03a..6e7d1a8e5bce 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result.py @@ -29,7 +29,7 @@ class OperationListResult(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, value=None, next_link=None): - super(OperationListResult, self).__init__() - self.value = value - self.next_link = next_link + def __init__(self, **kwargs): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py new file mode 100644 index 000000000000..8221d9c7a75d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_list_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationListResult(Model): + """Result of the request to list Microsoft.Insights operations. It contains a + list of operations and a URL link to get the next set of results. + + :param value: List of operations supported by the Microsoft.Insights + provider. + :type value: list[~azure.mgmt.monitor.models.Operation] + :param next_link: URL to get the next set of operation list results if + there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py new file mode 100644 index 000000000000..918a7f985873 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Microsoft Insights API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.monitor.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py index 3a9545a03ffe..9db3e9cb46e5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource.py @@ -38,8 +38,8 @@ class ProxyOnlyResource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(ProxyOnlyResource, self).__init__() + def __init__(self, **kwargs): + super(ProxyOnlyResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py new file mode 100644 index 000000000000..4ba894b76537 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/proxy_only_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyOnlyResource(Model): + """A proxy only azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py index 5f918315655d..d9034ce60be9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py @@ -16,12 +16,15 @@ class Recurrence(Model): """The repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :param frequency: the recurrence frequency. How often the schedule profile - should take effect. This value must be Week, meaning each week will have - the same set of profiles. Possible values include: 'None', 'Second', - 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the + schedule profile should take effect. This value must be Week, meaning each + week will have the same set of profiles. Possible values include: 'None', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' :type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency - :param schedule: the scheduling constraints for when the profile begins. + :param schedule: Required. the scheduling constraints for when the profile + begins. :type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule """ @@ -35,7 +38,7 @@ class Recurrence(Model): 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, } - def __init__(self, frequency, schedule): - super(Recurrence, self).__init__() - self.frequency = frequency - self.schedule = schedule + def __init__(self, **kwargs): + super(Recurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py new file mode 100644 index 000000000000..759577e56a12 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Recurrence(Model): + """The repeating times at which this profile begins. This element is not used + if the FixedDate element is used. + + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the + schedule profile should take effect. This value must be Week, meaning each + week will have the same set of profiles. Possible values include: 'None', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency + :param schedule: Required. the scheduling constraints for when the profile + begins. + :type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule + """ + + _validation = { + 'frequency': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, + } + + def __init__(self, *, frequency, schedule, **kwargs) -> None: + super(Recurrence, self).__init__(**kwargs) + self.frequency = frequency + self.schedule = schedule diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py index c862eb520257..68440d00078c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule.py @@ -15,54 +15,56 @@ class RecurrentSchedule(Model): """The scheduling constraints for when the profile begins. - :param time_zone: the timezone for the hours of the profile. Some examples - of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard - Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific - Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), - Mountain Standard Time, Central America Standard Time, Central Standard - Time, Central Standard Time (Mexico), Canada Central Standard Time, SA - Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, - Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, - Central Brazilian Standard Time, SA Western Standard Time, Pacific SA - Standard Time, Newfoundland Standard Time, E. South America Standard Time, - Argentina Standard Time, SA Eastern Standard Time, Greenland Standard - Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic - Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco - Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe - Standard Time, Central Europe Standard Time, Romance Standard Time, - Central European Standard Time, W. Central Africa Standard Time, Namibia - Standard Time, Jordan Standard Time, GTB Standard Time, Middle East - Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe - Standard Time, South Africa Standard Time, FLE Standard Time, Turkey - Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya - Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard - Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, - Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, - Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, - Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard - Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard - Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard - Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia - Standard Time, North Asia Standard Time, China Standard Time, North Asia - East Standard Time, Singapore Standard Time, W. Australia Standard Time, - Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, - Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, - AUS Central Standard Time, E. Australia Standard Time, AUS Eastern - Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan - Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central - Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, - UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, - Samoa Standard Time, Line Islands Standard Time + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time :type time_zone: str - :param days: the collection of days that the profile takes effect on. - Possible values are Sunday through Saturday. + :param days: Required. the collection of days that the profile takes + effect on. Possible values are Sunday through Saturday. :type days: list[str] - :param hours: A collection of hours that the profile takes effect on. - Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not - supported). + :param hours: Required. A collection of hours that the profile takes + effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times + are not supported). :type hours: list[int] - :param minutes: A collection of minutes at which the profile takes effect - at. + :param minutes: Required. A collection of minutes at which the profile + takes effect at. :type minutes: list[int] """ @@ -80,9 +82,9 @@ class RecurrentSchedule(Model): 'minutes': {'key': 'minutes', 'type': '[int]'}, } - def __init__(self, time_zone, days, hours, minutes): - super(RecurrentSchedule, self).__init__() - self.time_zone = time_zone - self.days = days - self.hours = hours - self.minutes = minutes + def __init__(self, **kwargs): + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.days = kwargs.get('days', None) + self.hours = kwargs.get('hours', None) + self.minutes = kwargs.get('minutes', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py new file mode 100644 index 000000000000..b5eaffff3542 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/recurrent_schedule_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecurrentSchedule(Model): + """The scheduling constraints for when the profile begins. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time + :type time_zone: str + :param days: Required. the collection of days that the profile takes + effect on. Possible values are Sunday through Saturday. + :type days: list[str] + :param hours: Required. A collection of hours that the profile takes + effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times + are not supported). + :type hours: list[int] + :param minutes: Required. A collection of minutes at which the profile + takes effect at. + :type minutes: list[int] + """ + + _validation = { + 'time_zone': {'required': True}, + 'days': {'required': True}, + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'days': {'key': 'days', 'type': '[str]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + } + + def __init__(self, *, time_zone: str, days, hours, minutes, **kwargs) -> None: + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = time_zone + self.days = days + self.hours = hours + self.minutes = minutes diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py index 1552cf70c86d..a081f9d31754 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource.py @@ -18,13 +18,15 @@ class Resource(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id :vartype id: str :ivar name: Azure resource name :vartype name: str :ivar type: Azure resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags :type tags: dict[str, str] @@ -45,10 +47,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py new file mode 100644 index 000000000000..8411fb563e05 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/resource_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py index 3f62025c3d5a..c3b4eb5e2ad2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response.py @@ -15,12 +15,14 @@ class Response(Model): """The response to a metrics query. + All required parameters must be populated in order to send to Azure. + :param cost: The integer value representing the cost of the query, for data case. :type cost: float - :param timespan: The timespan for which the data was retrieved. Its value - consists of two datatimes concatenated, separated by '/'. This may be - adjusted in the future and returned back from what was originally + :param timespan: Required. The timespan for which the data was retrieved. + Its value consists of two datatimes concatenated, separated by '/'. This + may be adjusted in the future and returned back from what was originally requested. :type timespan: str :param interval: The interval (window size) for which the metric data was @@ -33,7 +35,7 @@ class Response(Model): :param resourceregion: The region of the resource been queried for metrics. :type resourceregion: str - :param value: the value of the collection. + :param value: Required. the value of the collection. :type value: list[~azure.mgmt.monitor.models.Metric] """ @@ -52,11 +54,11 @@ class Response(Model): 'value': {'key': 'value', 'type': '[Metric]'}, } - def __init__(self, timespan, value, cost=None, interval=None, namespace=None, resourceregion=None): - super(Response, self).__init__() - self.cost = cost - self.timespan = timespan - self.interval = interval - self.namespace = namespace - self.resourceregion = resourceregion - self.value = value + def __init__(self, **kwargs): + super(Response, self).__init__(**kwargs) + self.cost = kwargs.get('cost', None) + self.timespan = kwargs.get('timespan', None) + self.interval = kwargs.get('interval', None) + self.namespace = kwargs.get('namespace', None) + self.resourceregion = kwargs.get('resourceregion', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py new file mode 100644 index 000000000000..9816e6052b09 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/response_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Response(Model): + """The response to a metrics query. + + All required parameters must be populated in order to send to Azure. + + :param cost: The integer value representing the cost of the query, for + data case. + :type cost: float + :param timespan: Required. The timespan for which the data was retrieved. + Its value consists of two datatimes concatenated, separated by '/'. This + may be adjusted in the future and returned back from what was originally + requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was + returned in. This may be adjusted in the future and returned back from + what was originally requested. This is not present if a metadata request + was made. + :type interval: timedelta + :param namespace: The namespace of the metrics been queried + :type namespace: str + :param resourceregion: The region of the resource been queried for + metrics. + :type resourceregion: str + :param value: Required. the value of the collection. + :type value: list[~azure.mgmt.monitor.models.Metric] + """ + + _validation = { + 'cost': {'minimum': 0}, + 'timespan': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'cost': {'key': 'cost', 'type': 'float'}, + 'timespan': {'key': 'timespan', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'duration'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'resourceregion': {'key': 'resourceregion', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Metric]'}, + } + + def __init__(self, *, timespan: str, value, cost: float=None, interval=None, namespace: str=None, resourceregion: str=None, **kwargs) -> None: + super(Response, self).__init__(**kwargs) + self.cost = cost + self.timespan = timespan + self.interval = interval + self.namespace = namespace + self.resourceregion = resourceregion + self.value = value diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py index 883bbd32f622..cca287401ccd 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy.py @@ -15,11 +15,13 @@ class RetentionPolicy(Model): """Specifies the retention policy for the log. - :param enabled: a value indicating whether the retention policy is - enabled. + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy + is enabled. :type enabled: bool - :param days: the number of days for the retention in days. A value of 0 - will retain the events indefinitely. + :param days: Required. the number of days for the retention in days. A + value of 0 will retain the events indefinitely. :type days: int """ @@ -33,7 +35,7 @@ class RetentionPolicy(Model): 'days': {'key': 'days', 'type': 'int'}, } - def __init__(self, enabled, days): - super(RetentionPolicy, self).__init__() - self.enabled = enabled - self.days = days + def __init__(self, **kwargs): + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.days = kwargs.get('days', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py new file mode 100644 index 000000000000..ffc9a5fbaab0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/retention_policy_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionPolicy(Model): + """Specifies the retention policy for the log. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy + is enabled. + :type enabled: bool + :param days: Required. the number of days for the retention in days. A + value of 0 will retain the events indefinitely. + :type days: int + """ + + _validation = { + 'enabled': {'required': True}, + 'days': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, *, enabled: bool, days: int, **kwargs) -> None: + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = enabled + self.days = days diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py index 3eb36c4a18c6..3fbc729ef113 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py @@ -19,7 +19,9 @@ class RuleAction(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: RuleEmailAction, RuleWebhookAction - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -35,6 +37,6 @@ class RuleAction(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} } - def __init__(self): - super(RuleAction, self).__init__() + def __init__(self, **kwargs): + super(RuleAction, self).__init__(**kwargs) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py new file mode 100644 index 000000000000..32207256e690 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleAction(Model): + """The action that is performed when the alert rule becomes active, and when + an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__(self, **kwargs) -> None: + super(RuleAction, self).__init__(**kwargs) + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py index ec5456c825d5..e6dcfefd8409 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition.py @@ -19,10 +19,12 @@ class RuleCondition(Model): sub-classes are: ThresholdRuleCondition, LocationThresholdRuleCondition, ManagementEventRuleCondition + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -39,7 +41,7 @@ class RuleCondition(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition'} } - def __init__(self, data_source=None): - super(RuleCondition, self).__init__() - self.data_source = data_source + def __init__(self, **kwargs): + super(RuleCondition, self).__init__(**kwargs) + self.data_source = kwargs.get('data_source', None) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py new file mode 100644 index 000000000000..6e97fff6db18 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_condition_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleCondition(Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ThresholdRuleCondition, LocationThresholdRuleCondition, + ManagementEventRuleCondition + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition'} + } + + def __init__(self, *, data_source=None, **kwargs) -> None: + super(RuleCondition, self).__init__(**kwargs) + self.data_source = data_source + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py index 49352fbec023..bd87a54ca8a9 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source.py @@ -18,10 +18,12 @@ class RuleDataSource(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: RuleMetricDataSource, RuleManagementEventDataSource + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str """ @@ -38,7 +40,7 @@ class RuleDataSource(Model): 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource'} } - def __init__(self, resource_uri=None): - super(RuleDataSource, self).__init__() - self.resource_uri = resource_uri + def __init__(self, **kwargs): + super(RuleDataSource, self).__init__(**kwargs) + self.resource_uri = kwargs.get('resource_uri', None) self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py new file mode 100644 index 000000000000..5b5971d7ad4e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_data_source_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleDataSource(Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleMetricDataSource, RuleManagementEventDataSource + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource'} + } + + def __init__(self, *, resource_uri: str=None, **kwargs) -> None: + super(RuleDataSource, self).__init__(**kwargs) + self.resource_uri = resource_uri + self.odatatype = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py index f9e2cb4af4ce..d22d3ce52458 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action.py @@ -16,7 +16,9 @@ class RuleEmailAction(RuleAction): """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str :param send_to_service_owners: Whether the administrators (service and co-administrators) of the service should be notified when the alert is @@ -37,8 +39,8 @@ class RuleEmailAction(RuleAction): 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, } - def __init__(self, send_to_service_owners=None, custom_emails=None): - super(RuleEmailAction, self).__init__() - self.send_to_service_owners = send_to_service_owners - self.custom_emails = custom_emails + def __init__(self, **kwargs): + super(RuleEmailAction, self).__init__(**kwargs) + self.send_to_service_owners = kwargs.get('send_to_service_owners', None) + self.custom_emails = kwargs.get('custom_emails', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py new file mode 100644 index 000000000000..2734c265a97e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_email_action_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_action import RuleAction + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. + The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param send_to_service_owners: Whether the administrators (service and + co-administrators) of the service should be notified when the alert is + activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses + to notify of the activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__(self, *, send_to_service_owners: bool=None, custom_emails=None, **kwargs) -> None: + super(RuleEmailAction, self).__init__(, **kwargs) + self.send_to_service_owners = send_to_service_owners + self.custom_emails = custom_emails + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py index ebb474e18727..1f31cdbcc3a7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source.py @@ -23,6 +23,6 @@ class RuleManagementEventClaimsDataSource(Model): 'email_address': {'key': 'emailAddress', 'type': 'str'}, } - def __init__(self, email_address=None): - super(RuleManagementEventClaimsDataSource, self).__init__() - self.email_address = email_address + def __init__(self, **kwargs): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = kwargs.get('email_address', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py new file mode 100644 index 000000000000..86f5d6e66e68 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_claims_data_source_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuleManagementEventClaimsDataSource(Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__(self, *, email_address: str=None, **kwargs) -> None: + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = email_address diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py index af6c99f92e25..01afeb1b0784 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source.py @@ -16,10 +16,12 @@ class RuleManagementEventDataSource(RuleDataSource): """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param event_name: the event name. :type event_name: str @@ -62,15 +64,15 @@ class RuleManagementEventDataSource(RuleDataSource): 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, } - def __init__(self, resource_uri=None, event_name=None, event_source=None, level=None, operation_name=None, resource_group_name=None, resource_provider_name=None, status=None, sub_status=None, claims=None): - super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri) - self.event_name = event_name - self.event_source = event_source - self.level = level - self.operation_name = operation_name - self.resource_group_name = resource_group_name - self.resource_provider_name = resource_provider_name - self.status = status - self.sub_status = sub_status - self.claims = claims + def __init__(self, **kwargs): + super(RuleManagementEventDataSource, self).__init__(**kwargs) + self.event_name = kwargs.get('event_name', None) + self.event_source = kwargs.get('event_source', None) + self.level = kwargs.get('level', None) + self.operation_name = kwargs.get('operation_name', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_provider_name = kwargs.get('resource_provider_name', None) + self.status = kwargs.get('status', None) + self.sub_status = kwargs.get('sub_status', None) + self.claims = kwargs.get('claims', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py new file mode 100644 index 000000000000..5bf22d45150d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_management_event_data_source_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_data_source import RuleDataSource + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always + RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked + for. If no name is provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If + no status is provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: + ~azure.mgmt.monitor.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__(self, *, resource_uri: str=None, event_name: str=None, event_source: str=None, level: str=None, operation_name: str=None, resource_group_name: str=None, resource_provider_name: str=None, status: str=None, sub_status: str=None, claims=None, **kwargs) -> None: + super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + self.event_name = event_name + self.event_source = event_source + self.level = level + self.operation_name = operation_name + self.resource_group_name = resource_group_name + self.resource_provider_name = resource_provider_name + self.status = status + self.sub_status = sub_status + self.claims = claims + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py index d18479246de7..472762df29c4 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source.py @@ -16,10 +16,12 @@ class RuleMetricDataSource(RuleDataSource): """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + All required parameters must be populated in order to send to Azure. + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. :type resource_uri: str - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str :param metric_name: the name of the metric that defines what the rule monitors. @@ -36,7 +38,7 @@ class RuleMetricDataSource(RuleDataSource): 'metric_name': {'key': 'metricName', 'type': 'str'}, } - def __init__(self, resource_uri=None, metric_name=None): - super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri) - self.metric_name = metric_name + def __init__(self, **kwargs): + super(RuleMetricDataSource, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py new file mode 100644 index 000000000000..d29e9ecf9fd1 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_metric_data_source_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_data_source import RuleDataSource + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always + RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param resource_uri: the resource identifier of the resource the rule + monitors. **NOTE**: this property cannot be updated for an existing rule. + :type resource_uri: str + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param metric_name: the name of the metric that defines what the rule + monitors. + :type metric_name: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__(self, *, resource_uri: str=None, metric_name: str=None, **kwargs) -> None: + super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + self.metric_name = metric_name + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py index 16a1055e7cf3..88a3ef2004c6 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action.py @@ -16,7 +16,9 @@ class RuleWebhookAction(RuleAction): """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. - :param odatatype: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. :type odatatype: str :param service_uri: the service uri to Post the notification when the alert activates or resolves. @@ -36,8 +38,8 @@ class RuleWebhookAction(RuleAction): 'properties': {'key': 'properties', 'type': '{str}'}, } - def __init__(self, service_uri=None, properties=None): - super(RuleWebhookAction, self).__init__() - self.service_uri = service_uri - self.properties = properties + def __init__(self, **kwargs): + super(RuleWebhookAction, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py new file mode 100644 index 000000000000..06de75307ca2 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/rule_webhook_action_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_action import RuleAction + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is + evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param service_uri: the service uri to Post the notification when the + alert activates or resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the + post operation. These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, service_uri: str=None, properties=None, **kwargs) -> None: + super(RuleWebhookAction, self).__init__(, **kwargs) + self.service_uri = service_uri + self.properties = properties + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py index 4e4ed1ffb2ec..353e37d1ead5 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action.py @@ -15,21 +15,23 @@ class ScaleAction(Model): """The parameters for the scaling action. - :param direction: the scale direction. Whether the scaling action - increases or decreases the number of instances. Possible values include: - 'None', 'Increase', 'Decrease' + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling + action increases or decreases the number of instances. Possible values + include: 'None', 'Increase', 'Decrease' :type direction: str or ~azure.mgmt.monitor.models.ScaleDirection - :param type: the type of action that should occur when the scale rule - fires. Possible values include: 'ChangeCount', 'PercentChangeCount', + :param type: Required. the type of action that should occur when the scale + rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount' :type type: str or ~azure.mgmt.monitor.models.ScaleType :param value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. Default value: "1" . :type value: str - :param cooldown: the amount of time to wait since the last scaling action - before this action occurs. It must be between 1 week and 1 minute in ISO - 8601 format. + :param cooldown: Required. the amount of time to wait since the last + scaling action before this action occurs. It must be between 1 week and 1 + minute in ISO 8601 format. :type cooldown: timedelta """ @@ -46,9 +48,9 @@ class ScaleAction(Model): 'cooldown': {'key': 'cooldown', 'type': 'duration'}, } - def __init__(self, direction, type, cooldown, value="1"): - super(ScaleAction, self).__init__() - self.direction = direction - self.type = type - self.value = value - self.cooldown = cooldown + def __init__(self, **kwargs): + super(ScaleAction, self).__init__(**kwargs) + self.direction = kwargs.get('direction', None) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', "1") + self.cooldown = kwargs.get('cooldown', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py new file mode 100644 index 000000000000..0e1d4639879e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_action_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleAction(Model): + """The parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling + action increases or decreases the number of instances. Possible values + include: 'None', 'Increase', 'Decrease' + :type direction: str or ~azure.mgmt.monitor.models.ScaleDirection + :param type: Required. the type of action that should occur when the scale + rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', + 'ExactCount' + :type type: str or ~azure.mgmt.monitor.models.ScaleType + :param value: the number of instances that are involved in the scaling + action. This value must be 1 or greater. The default value is 1. Default + value: "1" . + :type value: str + :param cooldown: Required. the amount of time to wait since the last + scaling action before this action occurs. It must be between 1 week and 1 + minute in ISO 8601 format. + :type cooldown: timedelta + """ + + _validation = { + 'direction': {'required': True}, + 'type': {'required': True}, + 'cooldown': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'ScaleDirection'}, + 'type': {'key': 'type', 'type': 'ScaleType'}, + 'value': {'key': 'value', 'type': 'str'}, + 'cooldown': {'key': 'cooldown', 'type': 'duration'}, + } + + def __init__(self, *, direction, type, cooldown, value: str="1", **kwargs) -> None: + super(ScaleAction, self).__init__(**kwargs) + self.direction = direction + self.type = type + self.value = value + self.cooldown = cooldown diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py index 98db9fb3279f..3e3e0a228333 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity.py @@ -15,15 +15,18 @@ class ScaleCapacity(Model): """The number of instances that can be used during this profile. - :param minimum: the minimum number of instances for the resource. + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the + resource. :type minimum: str - :param maximum: the maximum number of instances for the resource. The - actual maximum number of instances is limited by the cores that are - available in the subscription. + :param maximum: Required. the maximum number of instances for the + resource. The actual maximum number of instances is limited by the cores + that are available in the subscription. :type maximum: str - :param default: the number of instances that will be set if metrics are - not available for evaluation. The default is only used if the current - instance count is lower than the default. + :param default: Required. the number of instances that will be set if + metrics are not available for evaluation. The default is only used if the + current instance count is lower than the default. :type default: str """ @@ -39,8 +42,8 @@ class ScaleCapacity(Model): 'default': {'key': 'default', 'type': 'str'}, } - def __init__(self, minimum, maximum, default): - super(ScaleCapacity, self).__init__() - self.minimum = minimum - self.maximum = maximum - self.default = default + def __init__(self, **kwargs): + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.default = kwargs.get('default', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py new file mode 100644 index 000000000000..c69b76c8a4d3 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_capacity_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleCapacity(Model): + """The number of instances that can be used during this profile. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the + resource. + :type minimum: str + :param maximum: Required. the maximum number of instances for the + resource. The actual maximum number of instances is limited by the cores + that are available in the subscription. + :type maximum: str + :param default: Required. the number of instances that will be set if + metrics are not available for evaluation. The default is only used if the + current instance count is lower than the default. + :type default: str + """ + + _validation = { + 'minimum': {'required': True}, + 'maximum': {'required': True}, + 'default': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, *, minimum: str, maximum: str, default: str, **kwargs) -> None: + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py index f210b77581ee..ef2cc94480d2 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule.py @@ -15,9 +15,12 @@ class ScaleRule(Model): """A rule that provide the triggers and parameters for the scaling action. - :param metric_trigger: the trigger that results in a scaling action. + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling + action. :type metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger - :param scale_action: the parameters for the scaling action. + :param scale_action: Required. the parameters for the scaling action. :type scale_action: ~azure.mgmt.monitor.models.ScaleAction """ @@ -31,7 +34,7 @@ class ScaleRule(Model): 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, } - def __init__(self, metric_trigger, scale_action): - super(ScaleRule, self).__init__() - self.metric_trigger = metric_trigger - self.scale_action = scale_action + def __init__(self, **kwargs): + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = kwargs.get('metric_trigger', None) + self.scale_action = kwargs.get('scale_action', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py new file mode 100644 index 000000000000..2fe2640f9f4d --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/scale_rule_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleRule(Model): + """A rule that provide the triggers and parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling + action. + :type metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger + :param scale_action: Required. the parameters for the scaling action. + :type scale_action: ~azure.mgmt.monitor.models.ScaleAction + """ + + _validation = { + 'metric_trigger': {'required': True}, + 'scale_action': {'required': True}, + } + + _attribute_map = { + 'metric_trigger': {'key': 'metricTrigger', 'type': 'MetricTrigger'}, + 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, + } + + def __init__(self, *, metric_trigger, scale_action, **kwargs) -> None: + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = metric_trigger + self.scale_action = scale_action diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py index 3a0c733e8ef7..f4f08cb4f5ac 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization.py @@ -32,8 +32,8 @@ class SenderAuthorization(Model): 'scope': {'key': 'scope', 'type': 'str'}, } - def __init__(self, action=None, role=None, scope=None): - super(SenderAuthorization, self).__init__() - self.action = action - self.role = role - self.scope = scope + def __init__(self, **kwargs): + super(SenderAuthorization, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.role = kwargs.get('role', None) + self.scope = kwargs.get('scope', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py new file mode 100644 index 000000000000..fc908dab0e93 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SenderAuthorization(Model): + """the authorization used by the user who has performed the operation that led + to this event. This captures the RBAC properties of the event. These + usually include the 'action', 'role' and the 'scope'. + + :param action: the permissible actions. For instance: + microsoft.support/supporttickets/write + :type action: str + :param role: the role of the user. For instance: Subscription Admin + :type role: str + :param scope: the scope. + :type scope: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, *, action: str=None, role: str=None, scope: str=None, **kwargs) -> None: + super(SenderAuthorization, self).__init__(**kwargs) + self.action = action + self.role = role + self.scope = scope diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py index 3aef994a3e0b..98c399ffde50 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver.py @@ -18,12 +18,14 @@ class SmsReceiver(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The name of the SMS receiver. Names must be unique across all - receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SMS receiver. Names must be unique + across all receivers within an action group. :type name: str - :param country_code: The country code of the SMS receiver. + :param country_code: Required. The country code of the SMS receiver. :type country_code: str - :param phone_number: The phone number of the SMS receiver. + :param phone_number: Required. The phone number of the SMS receiver. :type phone_number: str :ivar status: The status of the receiver. Possible values include: 'NotSpecified', 'Enabled', 'Disabled' @@ -44,9 +46,9 @@ class SmsReceiver(Model): 'status': {'key': 'status', 'type': 'ReceiverStatus'}, } - def __init__(self, name, country_code, phone_number): - super(SmsReceiver, self).__init__() - self.name = name - self.country_code = country_code - self.phone_number = phone_number + def __init__(self, **kwargs): + super(SmsReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.country_code = kwargs.get('country_code', None) + self.phone_number = kwargs.get('phone_number', None) self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py new file mode 100644 index 000000000000..036ad0520bff --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/sms_receiver_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SmsReceiver(Model): + """An SMS receiver. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SMS receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param country_code: Required. The country code of the SMS receiver. + :type country_code: str + :param phone_number: Required. The phone number of the SMS receiver. + :type phone_number: str + :ivar status: The status of the receiver. Possible values include: + 'NotSpecified', 'Enabled', 'Disabled' + :vartype status: str or ~azure.mgmt.monitor.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'ReceiverStatus'}, + } + + def __init__(self, *, name: str, country_code: str, phone_number: str, **kwargs) -> None: + super(SmsReceiver, self).__init__(**kwargs) + self.name = name + self.country_code = country_code + self.phone_number = phone_number + self.status = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py index c330e8cc6601..9afb3402def0 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition.py @@ -15,16 +15,18 @@ class ThresholdRuleCondition(RuleCondition): """A rule condition based on a metric crossing a threshold. + All required parameters must be populated in order to send to Azure. + :param data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. :type data_source: ~azure.mgmt.monitor.models.RuleDataSource - :param odatatype: Constant filled by server. + :param odatatype: Required. Constant filled by server. :type odatatype: str - :param operator: the operator used to compare the data and the threshold. - Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', - 'LessThanOrEqual' + :param operator: Required. the operator used to compare the data and the + threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', + 'LessThan', 'LessThanOrEqual' :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator - :param threshold: the threshold value that activates the alert. + :param threshold: Required. the threshold value that activates the alert. :type threshold: float :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified @@ -53,10 +55,10 @@ class ThresholdRuleCondition(RuleCondition): 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationOperator'}, } - def __init__(self, operator, threshold, data_source=None, window_size=None, time_aggregation=None): - super(ThresholdRuleCondition, self).__init__(data_source=data_source) - self.operator = operator - self.threshold = threshold - self.window_size = window_size - self.time_aggregation = time_aggregation + def __init__(self, **kwargs): + super(ThresholdRuleCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) + self.time_aggregation = kwargs.get('time_aggregation', None) self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py new file mode 100644 index 000000000000..e2f2340c02b0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/threshold_rule_condition_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .rule_condition import RuleCondition + + +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param data_source: the resource from which the rule collects its data. + For this type dataSource will always be of type RuleMetricDataSource. + :type data_source: ~azure.mgmt.monitor.models.RuleDataSource + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param operator: Required. the operator used to compare the data and the + threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', + 'LessThan', 'LessThanOrEqual' + :type operator: str or ~azure.mgmt.monitor.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that + is used to monitor alert activity based on the threshold. If specified + then it must be between 5 minutes and 1 day. + :type window_size: timedelta + :param time_aggregation: the time aggregation operator. How the data that + are collected should be combined over time. The default value is the + PrimaryAggregationType of the Metric. Possible values include: 'Average', + 'Minimum', 'Maximum', 'Total', 'Last' + :type time_aggregation: str or + ~azure.mgmt.monitor.models.TimeAggregationOperator + """ + + _validation = { + 'odatatype': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'ConditionOperator'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'TimeAggregationOperator'}, + } + + def __init__(self, *, operator, threshold: float, data_source=None, window_size=None, time_aggregation=None, **kwargs) -> None: + super(ThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size + self.time_aggregation = time_aggregation + self.odatatype = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py index db441d8e5f54..6d7851c0962e 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element.py @@ -29,7 +29,7 @@ class TimeSeriesElement(Model): 'data': {'key': 'data', 'type': '[MetricValue]'}, } - def __init__(self, metadatavalues=None, data=None): - super(TimeSeriesElement, self).__init__() - self.metadatavalues = metadatavalues - self.data = data + def __init__(self, **kwargs): + super(TimeSeriesElement, self).__init__(**kwargs) + self.metadatavalues = kwargs.get('metadatavalues', None) + self.data = kwargs.get('data', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py new file mode 100644 index 000000000000..98afc2d1ce05 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_element_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeSeriesElement(Model): + """A time series result type. The discriminator value is always TimeSeries in + this case. + + :param metadatavalues: the metadata values returned if $filter was + specified in the call. + :type metadatavalues: list[~azure.mgmt.monitor.models.MetadataValue] + :param data: An array of data points representing the metric values. This + is only returned if a result type of data is specified. + :type data: list[~azure.mgmt.monitor.models.MetricValue] + """ + + _attribute_map = { + 'metadatavalues': {'key': 'metadatavalues', 'type': '[MetadataValue]'}, + 'data': {'key': 'data', 'type': '[MetricValue]'}, + } + + def __init__(self, *, metadatavalues=None, data=None, **kwargs) -> None: + super(TimeSeriesElement, self).__init__(**kwargs) + self.metadatavalues = metadatavalues + self.data = data diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py index 3ccae5cc9aee..ab1e8d790d8a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information.py @@ -15,10 +15,12 @@ class TimeSeriesInformation(Model): """The time series info needed for calculating the baseline. - :param sensitivities: the list of sensitivities for calculating the - baseline. + All required parameters must be populated in order to send to Azure. + + :param sensitivities: Required. the list of sensitivities for calculating + the baseline. :type sensitivities: list[str] - :param values: The metric values to calculate the baseline. + :param values: Required. The metric values to calculate the baseline. :type values: list[float] :param timestamps: the array of timestamps of the baselines. :type timestamps: list[datetime] @@ -35,8 +37,8 @@ class TimeSeriesInformation(Model): 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, } - def __init__(self, sensitivities, values, timestamps=None): - super(TimeSeriesInformation, self).__init__() - self.sensitivities = sensitivities - self.values = values - self.timestamps = timestamps + def __init__(self, **kwargs): + super(TimeSeriesInformation, self).__init__(**kwargs) + self.sensitivities = kwargs.get('sensitivities', None) + self.values = kwargs.get('values', None) + self.timestamps = kwargs.get('timestamps', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py new file mode 100644 index 000000000000..1a00c52ce44a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_series_information_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeSeriesInformation(Model): + """The time series info needed for calculating the baseline. + + All required parameters must be populated in order to send to Azure. + + :param sensitivities: Required. the list of sensitivities for calculating + the baseline. + :type sensitivities: list[str] + :param values: Required. The metric values to calculate the baseline. + :type values: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[datetime] + """ + + _validation = { + 'sensitivities': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'sensitivities': {'key': 'sensitivities', 'type': '[str]'}, + 'values': {'key': 'values', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + } + + def __init__(self, *, sensitivities, values, timestamps=None, **kwargs) -> None: + super(TimeSeriesInformation, self).__init__(**kwargs) + self.sensitivities = sensitivities + self.values = values + self.timestamps = timestamps diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py index b0bf8c35377c..ed6ea33f45ab 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window.py @@ -15,6 +15,8 @@ class TimeWindow(Model): """A specific date-time for the profile. + All required parameters must be populated in order to send to Azure. + :param time_zone: the timezone of the start and end times for the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time @@ -54,9 +56,9 @@ class TimeWindow(Model): Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time :type time_zone: str - :param start: the start time for the profile in ISO 8601 format. + :param start: Required. the start time for the profile in ISO 8601 format. :type start: datetime - :param end: the end time for the profile in ISO 8601 format. + :param end: Required. the end time for the profile in ISO 8601 format. :type end: datetime """ @@ -71,8 +73,8 @@ class TimeWindow(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, start, end, time_zone=None): - super(TimeWindow, self).__init__() - self.time_zone = time_zone - self.start = start - self.end = end + def __init__(self, **kwargs): + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py new file mode 100644 index 000000000000..196d096684a0 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/time_window_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeWindow(Model): + """A specific date-time for the profile. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: the timezone of the start and end times for the profile. + Some examples of valid timezones are: Dateline Standard Time, UTC-11, + Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time + (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard + Time, Central Standard Time, Central Standard Time (Mexico), Canada + Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US + Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, + Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + South America Standard Time, Argentina Standard Time, SA Eastern Standard + Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + Standard Time, W. Europe Standard Time, Central Europe Standard Time, + Romance Standard Time, Central European Standard Time, W. Central Africa + Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + Standard Time, Afghanistan Standard Time, West Asia Standard Time, + Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + Time, SE Asia Standard Time, North Asia Standard Time, China Standard + Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + Time, Samoa Standard Time, Line Islands Standard Time + :type time_zone: str + :param start: Required. the start time for the profile in ISO 8601 format. + :type start: datetime + :param end: Required. the end time for the profile in ISO 8601 format. + :type end: datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__(self, *, start, end, time_zone: str=None, **kwargs) -> None: + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = time_zone + self.start = start + self.end = end diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py index 5c2a1bbadffa..85dc8d60763b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification.py @@ -26,7 +26,7 @@ class WebhookNotification(Model): 'properties': {'key': 'properties', 'type': '{str}'}, } - def __init__(self, service_uri=None, properties=None): - super(WebhookNotification, self).__init__() - self.service_uri = service_uri - self.properties = properties + def __init__(self, **kwargs): + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py new file mode 100644 index 000000000000..fef993b16933 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_notification_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebhookNotification(Model): + """Webhook notification of an autoscale event. + + :param service_uri: the service address to receive the notification. + :type service_uri: str + :param properties: a property bag of settings. This value can be empty. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, service_uri: str=None, properties=None, **kwargs) -> None: + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = service_uri + self.properties = properties diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py index 1febd8617e14..844b87d1c71d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver.py @@ -15,10 +15,12 @@ class WebhookReceiver(Model): """A webhook receiver. - :param name: The name of the webhook receiver. Names must be unique across - all receivers within an action group. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be + unique across all receivers within an action group. :type name: str - :param service_uri: The URI where webhooks should be sent. + :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str """ @@ -32,7 +34,7 @@ class WebhookReceiver(Model): 'service_uri': {'key': 'serviceUri', 'type': 'str'}, } - def __init__(self, name, service_uri): - super(WebhookReceiver, self).__init__() - self.name = name - self.service_uri = service_uri + def __init__(self, **kwargs): + super(WebhookReceiver, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_uri = kwargs.get('service_uri', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py new file mode 100644 index 000000000000..a59a4f291f5e --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/webhook_receiver_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebhookReceiver(Model): + """A webhook receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be + unique across all receivers within an action group. + :type name: str + :param service_uri: Required. The URI where webhooks should be sent. + :type service_uri: str + """ + + _validation = { + 'name': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + } + + def __init__(self, *, name: str, service_uri: str, **kwargs) -> None: + super(WebhookReceiver, self).__init__(**kwargs) + self.name = name + self.service_uri = service_uri diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py index 4d66d0dcb80c..0afa3bf09ab1 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/operations/metrics_operations.py @@ -56,7 +56,7 @@ def list( :param top: The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. - :type top: float + :type top: int :param orderby: The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. @@ -109,7 +109,7 @@ def list( if aggregation is not None: query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') if top is not None: - query_parameters['top'] = self._serialize.query("top", top, 'float') + query_parameters['top'] = self._serialize.query("top", top, 'int') if orderby is not None: query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') if filter is not None: From 9afc4f7ec014cac9ec9241bd63ddf36bb6014cc4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 15 Mar 2018 14:40:06 -0700 Subject: [PATCH 10/12] Generated from a878bd64cf43e5cb9155fdecff440bfee98a49ce (#2174) Support azureFunctionReceivers in actionGroup APIs From 98dac4703b0ce6ef5d656f7089379760b4401509 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Mon, 19 Mar 2018 12:47:40 -0700 Subject: [PATCH 11/12] azure-mgmt-monitor 0.5.0 --- azure-mgmt-monitor/HISTORY.rst | 43 ++++++++++++++++++++++++++++++++++ azure-mgmt-monitor/README.rst | 10 ++++---- azure-mgmt-monitor/setup.py | 11 ++++----- 3 files changed, 53 insertions(+), 11 deletions(-) diff --git a/azure-mgmt-monitor/HISTORY.rst b/azure-mgmt-monitor/HISTORY.rst index 53018fbc70f4..cfe241635d45 100644 --- a/azure-mgmt-monitor/HISTORY.rst +++ b/azure-mgmt-monitor/HISTORY.rst @@ -3,6 +3,49 @@ Release History =============== +0.5.0 (2017-03-19) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Fix invalid type of "top" in metrics.list operation + +**Features** + +- New operation group metric_baseline +- Add attribute action_group_resource itsm_receivers +- Add operation action_groups.update +- Add new parameter "metricnames" to metrics.list +- Add new parameter "metricnamespace" to metrics.list +- All operations group have now a "models" attribute + +New ApiVersion version of metrics to 2018-01-01 + 0.4.0 (2017-10-25) ++++++++++++++++++ diff --git a/azure-mgmt-monitor/README.rst b/azure-mgmt-monitor/README.rst index 7b462aca9b04..dbfab2bfccfb 100644 --- a/azure-mgmt-monitor/README.rst +++ b/azure-mgmt-monitor/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Monitor Management Client Library. +This is the Microsoft Azure Monitor 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.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Monitor Management -`__ -on readthedocs.org. +For code examples, see `Monitor +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-monitor/setup.py b/azure-mgmt-monitor/setup.py index bbaf2bd4cae7..e0c133de0bf6 100644 --- a/azure-mgmt-monitor/setup.py +++ b/azure-mgmt-monitor/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-monitor" -PACKAGE_PPRINT_NAME = "Monitor Management" +PACKAGE_PPRINT_NAME = "Monitor" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.20,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) From b779c2de9caa816d1c69bdee48721694580ec436 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Mon, 19 Mar 2018 14:35:10 -0700 Subject: [PATCH 12/12] Re-record Monitor tests --- .../test_mgmt_monitor.test_metrics.yaml | 71 ++++++++++--------- azure-mgmt-monitor/tests/test_mgmt_monitor.py | 2 +- 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/azure-mgmt-monitor/tests/recordings/test_mgmt_monitor.test_metrics.yaml b/azure-mgmt-monitor/tests/recordings/test_mgmt_monitor.test_metrics.yaml index 4fe9d27c8cb9..ac1a04464dd6 100644 --- a/azure-mgmt-monitor/tests/recordings/test_mgmt_monitor.test_metrics.yaml +++ b/azure-mgmt-monitor/tests/recordings/test_mgmt_monitor.test_metrics.yaml @@ -6,41 +6,43 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.16299-SP0) requests/2.17.3 msrest/0.4.11 - msrest_azure/0.4.11 monitormanagementclient/0.4.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.20 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricDefinitions?api-version=2017-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricDefinitions?api-version=2018-01-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Percentage - CPU","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Percentage - CPU","localizedValue":"Percentage CPU"},"isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Network - In","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Network - In","localizedValue":"Network In"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Network - Out","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Network - Out","localizedValue":"Network Out"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk - Read Bytes","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Disk - Read Bytes","localizedValue":"Disk Read Bytes"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk - Write Bytes","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Disk - Write Bytes","localizedValue":"Disk Write Bytes"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk - Read Operations/Sec","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Disk - Read Operations/Sec","localizedValue":"Disk Read Operations/Sec"},"isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk - Write Operations/Sec","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"Disk - Write Operations/Sec","localizedValue":"Disk Write Operations/Sec"},"isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/CPU - Credits Remaining","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"CPU - Credits Remaining","localizedValue":"CPU Credits Remaining"},"isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/CPU - Credits Consumed","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","name":{"value":"CPU - Credits Consumed","localizedValue":"CPU Credits Consumed"},"isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"}]}]}'} + CPU","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Percentage + CPU","localizedValue":"Percentage CPU"},"isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Network + In","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Network + In","localizedValue":"Network In"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Network + Out","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Network + Out","localizedValue":"Network Out"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk + Read Bytes","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Disk + Read Bytes","localizedValue":"Disk Read Bytes"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk + Write Bytes","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Disk + Write Bytes","localizedValue":"Disk Write Bytes"},"isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk + Read Operations/Sec","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Disk + Read Operations/Sec","localizedValue":"Disk Read Operations/Sec"},"isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/Disk + Write Operations/Sec","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"Disk + Write Operations/Sec","localizedValue":"Disk Write Operations/Sec"},"isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/CPU + Credits Remaining","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"CPU + Credits Remaining","localizedValue":"CPU Credits Remaining"},"isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metricdefinitions/CPU + Credits Consumed","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632","namespace":"Microsoft.Compute/virtualMachines","name":{"value":"CPU + Credits Consumed","localizedValue":"CPU Credits Consumed"},"isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}]}]}'} headers: - __handlingserverid__: [shoeboxproxyprod_shoeboxproxyprod-red_MetricsMP_IN_11] + __handlingserverid__: [shoeboxproxyprod_shoeboxproxyprod-black_MetricsMP_IN_1] cache-control: [no-cache] - content-length: ['5468'] + content-length: ['8825'] content-type: [application/json] - date: ['Mon, 23 Oct 2017 21:39:43 GMT'] + date: ['Mon, 19 Mar 2018 21:26:25 GMT'] server: [Microsoft-IIS/8.5] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: @@ -50,24 +52,27 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.16299-SP0) requests/2.17.3 msrest/0.4.11 - msrest_azure/0.4.11 monitormanagementclient/0.4.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 + msrest_azure/0.4.20 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metrics?timespan=2017-10-22%2F2017-10-23&metric=Percentage%20CPU&aggregation=Total&api-version=2017-05-01-preview&interval=PT1H + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/microsoft.insights/metrics?timespan=2018-03-17%2F2018-03-18&interval=PT1H&aggregation=Total&api-version=2018-01-01 response: - body: {string: '{"cost":0,"timespan":"2017-10-22T00:00:00Z/2017-10-23T00:00:00Z","interval":"PT1H","value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/Microsoft.Insights/metrics/Percentage + body: {string: '{"cost":0,"timespan":"2018-03-17T00:00:00Z/2018-03-18T00:00:00Z","interval":"PT1H","value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azvmc632/providers/Microsoft.Compute/virtualMachines/azvmc632/providers/Microsoft.Insights/metrics/Percentage CPU","type":"Microsoft.Insights/metrics","name":{"value":"Percentage CPU","localizedValue":"Percentage - CPU"},"unit":"Percent","timeseries":[{"metadatavalues":[],"data":[{"timeStamp":"2017-10-22T00:00:00Z","total":57.290000000000006},{"timeStamp":"2017-10-22T01:00:00Z","total":59.339999999999996},{"timeStamp":"2017-10-22T02:00:00Z","total":58.43},{"timeStamp":"2017-10-22T03:00:00Z","total":98.329999999999956},{"timeStamp":"2017-10-22T04:00:00Z","total":66.79},{"timeStamp":"2017-10-22T05:00:00Z","total":68.859999999999985},{"timeStamp":"2017-10-22T06:00:00Z","total":126.61999999999999},{"timeStamp":"2017-10-22T07:00:00Z","total":131.33000000000007},{"timeStamp":"2017-10-22T08:00:00Z","total":58.01},{"timeStamp":"2017-10-22T09:00:00Z","total":68.04},{"timeStamp":"2017-10-22T10:00:00Z","total":84.659999999999982},{"timeStamp":"2017-10-22T11:00:00Z","total":98.449999999999989},{"timeStamp":"2017-10-22T12:00:00Z","total":100.99999999999994},{"timeStamp":"2017-10-22T13:00:00Z","total":115.09000000000002},{"timeStamp":"2017-10-22T14:00:00Z","total":122.99999999999999},{"timeStamp":"2017-10-22T15:00:00Z","total":114.44999999999999},{"timeStamp":"2017-10-22T16:00:00Z","total":107.05},{"timeStamp":"2017-10-22T17:00:00Z","total":104.34},{"timeStamp":"2017-10-22T18:00:00Z","total":60.229999999999983},{"timeStamp":"2017-10-22T19:00:00Z","total":69.700000000000017},{"timeStamp":"2017-10-22T20:00:00Z","total":79.639999999999986},{"timeStamp":"2017-10-22T21:00:00Z","total":48.460000000000008},{"timeStamp":"2017-10-22T22:00:00Z","total":51.980000000000004},{"timeStamp":"2017-10-22T23:00:00Z","total":56.930000000000021}]}]}]}'} + CPU"},"unit":"Percent","timeseries":[{"metadatavalues":[],"data":[{"timeStamp":"2018-03-17T00:00:00Z","total":47.450000000000017},{"timeStamp":"2018-03-17T01:00:00Z","total":45.22999999999999},{"timeStamp":"2018-03-17T02:00:00Z","total":45.729999999999968},{"timeStamp":"2018-03-17T03:00:00Z","total":49.559999999999995},{"timeStamp":"2018-03-17T04:00:00Z","total":52.159999999999989},{"timeStamp":"2018-03-17T05:00:00Z","total":47.0},{"timeStamp":"2018-03-17T06:00:00Z","total":49.250000000000007},{"timeStamp":"2018-03-17T07:00:00Z","total":47.02999999999998},{"timeStamp":"2018-03-17T08:00:00Z","total":49.09999999999998},{"timeStamp":"2018-03-17T09:00:00Z","total":87.220000000000027},{"timeStamp":"2018-03-17T10:00:00Z","total":48.249999999999993},{"timeStamp":"2018-03-17T11:00:00Z","total":51.909999999999961},{"timeStamp":"2018-03-17T12:00:00Z","total":49.739999999999981},{"timeStamp":"2018-03-17T13:00:00Z","total":49.779999999999994},{"timeStamp":"2018-03-17T14:00:00Z","total":49.75},{"timeStamp":"2018-03-17T15:00:00Z","total":113.83},{"timeStamp":"2018-03-17T16:00:00Z","total":51.77999999999998},{"timeStamp":"2018-03-17T17:00:00Z","total":50.870000000000005},{"timeStamp":"2018-03-17T18:00:00Z","total":49.949999999999974},{"timeStamp":"2018-03-17T19:00:00Z","total":49.329999999999991},{"timeStamp":"2018-03-17T20:00:00Z","total":49.16},{"timeStamp":"2018-03-17T21:00:00Z","total":50.879999999999981},{"timeStamp":"2018-03-17T22:00:00Z","total":50.1},{"timeStamp":"2018-03-17T23:00:00Z","total":59.100000000000016}]}]}],"namespace":"Microsoft.Compute/virtualMachines","resourceregion":"eastus"}'} headers: - __handlingserverid__: [shoeboxproxyprod_shoeboxproxyprod-red_MetricsMP_IN_9] + __handlingserverid__: [shoeboxproxyprod_shoeboxproxyprod-black_MetricsMP_IN_11] cache-control: [no-cache] - content-length: ['1910'] + content-length: ['1990'] content-type: [application/json] - date: ['Mon, 23 Oct 2017 21:39:55 GMT'] + date: ['Mon, 19 Mar 2018 21:26:26 GMT'] server: [Microsoft-IIS/8.5] strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] x-powered-by: [ASP.NET] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-monitor/tests/test_mgmt_monitor.py b/azure-mgmt-monitor/tests/test_mgmt_monitor.py index 95efc621d1fc..a97b7cb8e749 100644 --- a/azure-mgmt-monitor/tests/test_mgmt_monitor.py +++ b/azure-mgmt-monitor/tests/test_mgmt_monitor.py @@ -82,7 +82,7 @@ def test_metrics(self): ) # Need to freeze the date for the recorded tests - today = datetime.date(2017, 10, 23) + today = datetime.date(2018, 3, 18) yesterday = today - datetime.timedelta(days=1) metrics = self.client.metrics.list(