Skip to content

Commit 04c842a

Browse files
LianwMS00Kai0
andauthored
Release azure-mgmt-monitor 0.10.0 (Azure#11873)
* Release azure-mgmt-monitor 0.10.0 Add Missing Json in Readme for Monitor * fix test and ship bad test (#1) Co-authored-by: Kerwin Sun <[email protected]>
1 parent debbb83 commit 04c842a

18 files changed

+4038
-424
lines changed

sdk/monitor/azure-mgmt-monitor/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release History
22

3+
## 0.10.0 (2020-06-08)
4+
5+
**Features**
6+
7+
- Model WebtestLocationAvailabilityCriteria has a new parameter additional_properties
8+
- Added operation group SubscriptionDiagnosticSettingsOperations
9+
10+
**Breaking changes**
11+
12+
- Model WebtestLocationAvailabilityCriteria has a new required parameter odatatype
13+
314
## 0.9.0 (2020-04-09)
415

516
**Features**

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class MonitorManagementClient(MultiApiClientMixin, SDKClient):
7474
'operations': '2015-04-01',
7575
'scheduled_query_rules': '2018-04-16',
7676
'service_diagnostic_settings': '2016-09-01',
77+
'subscription_diagnostic_settings': '2017-05-01-preview',
7778
'tenant_activity_logs': '2015-04-01',
7879
'vm_insights': '2018-11-27-preview',
7980
}},
@@ -569,6 +570,19 @@ def service_diagnostic_settings(self):
569570
raise NotImplementedError("APIVersion {} is not available".format(api_version))
570571
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
571572

573+
@property
574+
def subscription_diagnostic_settings(self):
575+
"""Instance depends on the API version:
576+
577+
* 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations>`
578+
"""
579+
api_version = self._get_api_version('subscription_diagnostic_settings')
580+
if api_version == '2017-05-01-preview':
581+
from .v2017_05_01_preview.operations import SubscriptionDiagnosticSettingsOperations as OperationClass
582+
else:
583+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
584+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
585+
572586
@property
573587
def tenant_activity_logs(self):
574588
"""Instance depends on the API version:

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .operations import DiagnosticSettingsOperations
1818
from .operations import MetricDefinitionsOperations
1919
from .operations import MetricsOperations
20+
from .operations import SubscriptionDiagnosticSettingsOperations
2021
from . import models
2122

2223

@@ -34,6 +35,8 @@ class MonitorManagementClient(SDKClient):
3435
:vartype metric_definitions: azure.mgmt.monitor.v2017_05_01_preview.operations.MetricDefinitionsOperations
3536
:ivar metrics: Metrics operations
3637
:vartype metrics: azure.mgmt.monitor.v2017_05_01_preview.operations.MetricsOperations
38+
:ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettings operations
39+
:vartype subscription_diagnostic_settings: azure.mgmt.monitor.v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations
3740
3841
:param credentials: Credentials needed for the client to connect to Azure.
3942
:type credentials: :mod:`A msrestazure Credentials
@@ -60,3 +63,5 @@ def __init__(
6063
self._client, self.config, self._serialize, self._deserialize)
6164
self.metrics = MetricsOperations(
6265
self._client, self.config, self._serialize, self._deserialize)
66+
self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations(
67+
self._client, self.config, self._serialize, self._deserialize)

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
from ._models_py3 import ProxyOnlyResource
2727
from ._models_py3 import Response
2828
from ._models_py3 import RetentionPolicy
29+
from ._models_py3 import SubscriptionDiagnosticSettingsResource
30+
from ._models_py3 import SubscriptionDiagnosticSettingsResourceCollection
31+
from ._models_py3 import SubscriptionLogSettings
32+
from ._models_py3 import SubscriptionProxyOnlyResource
2933
from ._models_py3 import TimeSeriesElement
3034
except (SyntaxError, ImportError):
3135
from ._models import DiagnosticSettingsCategoryResource
@@ -44,6 +48,10 @@
4448
from ._models import ProxyOnlyResource
4549
from ._models import Response
4650
from ._models import RetentionPolicy
51+
from ._models import SubscriptionDiagnosticSettingsResource
52+
from ._models import SubscriptionDiagnosticSettingsResourceCollection
53+
from ._models import SubscriptionLogSettings
54+
from ._models import SubscriptionProxyOnlyResource
4755
from ._models import TimeSeriesElement
4856
from ._paged_models import MetricDefinitionPaged
4957
from ._monitor_management_client_enums import (
@@ -70,6 +78,10 @@
7078
'ProxyOnlyResource',
7179
'Response',
7280
'RetentionPolicy',
81+
'SubscriptionDiagnosticSettingsResource',
82+
'SubscriptionDiagnosticSettingsResourceCollection',
83+
'SubscriptionLogSettings',
84+
'SubscriptionProxyOnlyResource',
7385
'TimeSeriesElement',
7486
'MetricDefinitionPaged',
7587
'CategoryType',

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,153 @@ def __init__(self, **kwargs):
596596
self.days = kwargs.get('days', None)
597597

598598

599+
class SubscriptionProxyOnlyResource(Model):
600+
"""A proxy only azure resource object.
601+
602+
Variables are only populated by the server, and will be ignored when
603+
sending a request.
604+
605+
:ivar id: Azure resource Id
606+
:vartype id: str
607+
:ivar name: Azure resource name
608+
:vartype name: str
609+
:ivar type: Azure resource type
610+
:vartype type: str
611+
:param location: Location of the resource
612+
:type location: str
613+
"""
614+
615+
_validation = {
616+
'id': {'readonly': True},
617+
'name': {'readonly': True},
618+
'type': {'readonly': True},
619+
}
620+
621+
_attribute_map = {
622+
'id': {'key': 'id', 'type': 'str'},
623+
'name': {'key': 'name', 'type': 'str'},
624+
'type': {'key': 'type', 'type': 'str'},
625+
'location': {'key': 'location', 'type': 'str'},
626+
}
627+
628+
def __init__(self, **kwargs):
629+
super(SubscriptionProxyOnlyResource, self).__init__(**kwargs)
630+
self.id = None
631+
self.name = None
632+
self.type = None
633+
self.location = kwargs.get('location', None)
634+
635+
636+
class SubscriptionDiagnosticSettingsResource(SubscriptionProxyOnlyResource):
637+
"""The subscription diagnostic setting resource.
638+
639+
Variables are only populated by the server, and will be ignored when
640+
sending a request.
641+
642+
:ivar id: Azure resource Id
643+
:vartype id: str
644+
:ivar name: Azure resource name
645+
:vartype name: str
646+
:ivar type: Azure resource type
647+
:vartype type: str
648+
:param location: Location of the resource
649+
:type location: str
650+
:param storage_account_id: The resource ID of the storage account to which
651+
you would like to send Diagnostic Logs.
652+
:type storage_account_id: str
653+
:param service_bus_rule_id: The service bus rule Id of the diagnostic
654+
setting. This is here to maintain backwards compatibility.
655+
:type service_bus_rule_id: str
656+
:param event_hub_authorization_rule_id: The resource Id for the event hub
657+
authorization rule.
658+
:type event_hub_authorization_rule_id: str
659+
:param event_hub_name: The name of the event hub. If none is specified,
660+
the default event hub will be selected.
661+
:type event_hub_name: str
662+
:param logs: The list of logs settings.
663+
:type logs:
664+
list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionLogSettings]
665+
:param workspace_id: The full ARM resource ID of the Log Analytics
666+
workspace to which you would like to send Diagnostic Logs. Example:
667+
/subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
668+
:type workspace_id: str
669+
"""
670+
671+
_validation = {
672+
'id': {'readonly': True},
673+
'name': {'readonly': True},
674+
'type': {'readonly': True},
675+
}
676+
677+
_attribute_map = {
678+
'id': {'key': 'id', 'type': 'str'},
679+
'name': {'key': 'name', 'type': 'str'},
680+
'type': {'key': 'type', 'type': 'str'},
681+
'location': {'key': 'location', 'type': 'str'},
682+
'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'},
683+
'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'},
684+
'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'},
685+
'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'},
686+
'logs': {'key': 'properties.logs', 'type': '[SubscriptionLogSettings]'},
687+
'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
688+
}
689+
690+
def __init__(self, **kwargs):
691+
super(SubscriptionDiagnosticSettingsResource, self).__init__(**kwargs)
692+
self.storage_account_id = kwargs.get('storage_account_id', None)
693+
self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None)
694+
self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None)
695+
self.event_hub_name = kwargs.get('event_hub_name', None)
696+
self.logs = kwargs.get('logs', None)
697+
self.workspace_id = kwargs.get('workspace_id', None)
698+
699+
700+
class SubscriptionDiagnosticSettingsResourceCollection(Model):
701+
"""Represents a collection of subscription diagnostic settings resources.
702+
703+
:param value: The collection of subscription diagnostic settings
704+
resources.
705+
:type value:
706+
list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource]
707+
"""
708+
709+
_attribute_map = {
710+
'value': {'key': 'value', 'type': '[SubscriptionDiagnosticSettingsResource]'},
711+
}
712+
713+
def __init__(self, **kwargs):
714+
super(SubscriptionDiagnosticSettingsResourceCollection, self).__init__(**kwargs)
715+
self.value = kwargs.get('value', None)
716+
717+
718+
class SubscriptionLogSettings(Model):
719+
"""Part of Subscription diagnostic setting. Specifies the settings for a
720+
particular log.
721+
722+
All required parameters must be populated in order to send to Azure.
723+
724+
:param category: Name of a Subscription Diagnostic Log category for a
725+
resource type this setting is applied to.
726+
:type category: str
727+
:param enabled: Required. a value indicating whether this log is enabled.
728+
:type enabled: bool
729+
"""
730+
731+
_validation = {
732+
'enabled': {'required': True},
733+
}
734+
735+
_attribute_map = {
736+
'category': {'key': 'category', 'type': 'str'},
737+
'enabled': {'key': 'enabled', 'type': 'bool'},
738+
}
739+
740+
def __init__(self, **kwargs):
741+
super(SubscriptionLogSettings, self).__init__(**kwargs)
742+
self.category = kwargs.get('category', None)
743+
self.enabled = kwargs.get('enabled', None)
744+
745+
599746
class TimeSeriesElement(Model):
600747
"""A time series result type. The discriminator value is always TimeSeries in
601748
this case.

0 commit comments

Comments
 (0)