From 2e34251b2b9a8983190370832144c4431b4ae6bc Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Feb 2020 21:16:15 +0000 Subject: [PATCH] Generated from 497f37d011e45d90e7a5f190b1326ec89e2719c8 Merge pull request #6 from Khushboo-Baheti/master merge --- .../operations/_activity_logs_operations.py | 10 +++++----- .../v2017_05_01_preview/models/_models.py | 17 ++++++++++++----- .../v2017_05_01_preview/models/_models_py3.py | 19 +++++++++++++------ .../monitor/v2018_01_01/models/_models.py | 10 ++++++---- .../monitor/v2018_01_01/models/_models_py3.py | 12 +++++++----- .../_monitor_management_client_enums.py | 4 ++++ .../monitor/v2018_03_01/models/_models.py | 8 ++++---- .../monitor/v2018_03_01/models/_models_py3.py | 10 +++++----- 8 files changed, 56 insertions(+), 34 deletions(-) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py index 70e9f879d39f..16004d4d9b34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py @@ -39,11 +39,12 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, filter=None, select=None, custom_headers=None, raw=False, **operation_config): + self, filter, select=None, custom_headers=None, raw=False, **operation_config): """Provides the list of records from the activity logs. - :param filter: Reduces the set of data collected.
The **$filter** - argument is very restricted and allows only the following + :param filter: Reduces the set of data collected.
This argument is + required and it also requires at least the start date/time.
The + **$filter** argument is very restricted and allows only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName @@ -93,8 +94,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if select is not None: query_parameters['$select'] = self._serialize.query("select", select, 'str') diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py index 1f45012628e6..ec08c11a750e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py @@ -131,17 +131,22 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :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. + :param metrics: The list of metric settings. :type metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] - :param logs: the list of logs settings. + :param logs: The list of logs settings. :type logs: list[~azure.mgmt.monitor.v2017_05_01_preview.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: + :param workspace_id: The full ARM resource ID of the 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 + :param log_analytics_destination_type: A string indicating whether the + export to Log Analytics should use the default destination type, i.e. + AzureDiagnostics, or use a destination type constructed as follows: + _. Possible values + are: Dedicated and null (null is default.) + :type log_analytics_destination_type: str """ _validation = { @@ -161,6 +166,7 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -172,6 +178,7 @@ def __init__(self, **kwargs): self.metrics = kwargs.get('metrics', None) self.logs = kwargs.get('logs', None) self.workspace_id = kwargs.get('workspace_id', None) + self.log_analytics_destination_type = kwargs.get('log_analytics_destination_type', None) class DiagnosticSettingsResourceCollection(Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py index 62b3b6b184d8..f1fbd5d163f1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py @@ -131,17 +131,22 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :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. + :param metrics: The list of metric settings. :type metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] - :param logs: the list of logs settings. + :param logs: The list of logs settings. :type logs: list[~azure.mgmt.monitor.v2017_05_01_preview.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: + :param workspace_id: The full ARM resource ID of the 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 + :param log_analytics_destination_type: A string indicating whether the + export to Log Analytics should use the default destination type, i.e. + AzureDiagnostics, or use a destination type constructed as follows: + _. Possible values + are: Dedicated and null (null is default.) + :type log_analytics_destination_type: str """ _validation = { @@ -161,9 +166,10 @@ class DiagnosticSettingsResource(ProxyOnlyResource): 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, } - def __init__(self, *, storage_account_id: str=None, service_bus_rule_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: + def __init__(self, *, storage_account_id: str=None, service_bus_rule_id: str=None, event_hub_authorization_rule_id: str=None, event_hub_name: str=None, metrics=None, logs=None, workspace_id: str=None, log_analytics_destination_type: str=None, **kwargs) -> None: super(DiagnosticSettingsResource, self).__init__(**kwargs) self.storage_account_id = storage_account_id self.service_bus_rule_id = service_bus_rule_id @@ -172,6 +178,7 @@ def __init__(self, *, storage_account_id: str=None, service_bus_rule_id: str=Non self.metrics = metrics self.logs = logs self.workspace_id = workspace_id + self.log_analytics_destination_type = log_analytics_destination_type class DiagnosticSettingsResourceCollection(Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py index 645a3895d476..7f6c659c93a4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py @@ -113,7 +113,8 @@ class Metric(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', - 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', + 'MilliCores', 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param timeseries: Required. the time series returned when a data query is performed. @@ -185,7 +186,8 @@ class MetricDefinition(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', + 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: @@ -253,7 +255,7 @@ class MetricValue(Model): :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 + :type count: float """ _validation = { @@ -266,7 +268,7 @@ class MetricValue(Model): 'minimum': {'key': 'minimum', 'type': 'float'}, 'maximum': {'key': 'maximum', 'type': 'float'}, 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'float'}, } def __init__(self, **kwargs): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py index 972b2120cfb0..946d425e0f4b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py @@ -113,7 +113,8 @@ class Metric(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', - 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', + 'MilliCores', 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param timeseries: Required. the time series returned when a data query is performed. @@ -185,7 +186,8 @@ class MetricDefinition(Model): :type name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', - 'MilliSeconds', 'ByteSeconds', 'Unspecified' + 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', + 'NanoCores', 'BitsPerSecond' :type unit: str or ~azure.mgmt.monitor.v2018_01_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: @@ -253,7 +255,7 @@ class MetricValue(Model): :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 + :type count: float """ _validation = { @@ -266,10 +268,10 @@ class MetricValue(Model): 'minimum': {'key': 'minimum', 'type': 'float'}, 'maximum': {'key': 'maximum', 'type': 'float'}, 'total': {'key': 'total', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'float'}, } - def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: int=None, **kwargs) -> None: + def __init__(self, *, time_stamp, average: float=None, minimum: float=None, maximum: float=None, total: float=None, count: float=None, **kwargs) -> None: super(MetricValue, self).__init__(**kwargs) self.time_stamp = time_stamp self.average = average diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py index 61455e4c0c37..b8c55a6ea3b6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py @@ -23,6 +23,10 @@ class Unit(str, Enum): milli_seconds = "MilliSeconds" byte_seconds = "ByteSeconds" unspecified = "Unspecified" + cores = "Cores" + milli_cores = "MilliCores" + nano_cores = "NanoCores" + bits_per_second = "BitsPerSecond" class AggregationType(str, Enum): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py index afd1c724fc87..e20e834092b4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py @@ -651,19 +651,19 @@ class MetricAlertAction(Model): :param action_group_id: the id of the action group to use. :type action_group_id: str - :param webhook_properties: The properties of a webhook object. - :type webhook_properties: dict[str, str] + :param web_hook_properties: The properties of a webhook object. + :type web_hook_properties: dict[str, str] """ _attribute_map = { 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, - 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + 'web_hook_properties': {'key': 'webHookProperties', 'type': '{str}'}, } def __init__(self, **kwargs): super(MetricAlertAction, self).__init__(**kwargs) self.action_group_id = kwargs.get('action_group_id', None) - self.webhook_properties = kwargs.get('webhook_properties', None) + self.web_hook_properties = kwargs.get('web_hook_properties', None) class MetricAlertCriteria(Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py index 9defb4f09032..059f86cd5542 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py @@ -651,19 +651,19 @@ class MetricAlertAction(Model): :param action_group_id: the id of the action group to use. :type action_group_id: str - :param webhook_properties: The properties of a webhook object. - :type webhook_properties: dict[str, str] + :param web_hook_properties: The properties of a webhook object. + :type web_hook_properties: dict[str, str] """ _attribute_map = { 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, - 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + 'web_hook_properties': {'key': 'webHookProperties', 'type': '{str}'}, } - def __init__(self, *, action_group_id: str=None, webhook_properties=None, **kwargs) -> None: + def __init__(self, *, action_group_id: str=None, web_hook_properties=None, **kwargs) -> None: super(MetricAlertAction, self).__init__(**kwargs) self.action_group_id = action_group_id - self.webhook_properties = webhook_properties + self.web_hook_properties = web_hook_properties class MetricAlertCriteria(Model):