Skip to content

Commit 1d5e31b

Browse files
author
SDKAuto
committed
CodeGen from PR 14716 in Azure/azure-rest-api-specs
Merge fe51374e352dc4520c3628a483851b8b3bbb9176 into e4ef986
1 parent e9bcb44 commit 1d5e31b

File tree

275 files changed

+11712
-2709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+11712
-2709
lines changed

sdk/monitor/azure-mgmt-monitor/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "7a8a8eb6059ccced9124adf3c72e9c15ab6d6bb3",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.2",
10+
"readme": "specification/monitor/resource-manager/readme.md"
11+
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from typing import Any
22+
23+
from azure.core.credentials import TokenCredential
1924

2025
class MonitorManagementClientConfiguration(Configuration):
2126
"""Configuration for MonitorManagementClient.
@@ -25,7 +30,7 @@ class MonitorManagementClientConfiguration(Configuration):
2530
2631
:param credential: Credential needed for the client to connect to Azure.
2732
:type credential: ~azure.core.credentials.TokenCredential
28-
:param subscription_id: The Azure subscription Id.
33+
:param subscription_id: The ID of the target subscription.
2934
:type subscription_id: str
3035
"""
3136

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

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,22 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from azure.mgmt.core import ARMPipelineClient
13-
from msrest import Serializer, Deserializer
12+
from typing import TYPE_CHECKING
1413

14+
from azure.mgmt.core import ARMPipelineClient
1515
from azure.profiles import KnownProfiles, ProfileDefinition
1616
from azure.profiles.multiapiclient import MultiApiClientMixin
17+
from msrest import Deserializer, Serializer
18+
1719
from ._configuration import MonitorManagementClientConfiguration
1820

21+
if TYPE_CHECKING:
22+
# pylint: disable=unused-import,ungrouped-imports
23+
from typing import Any, Optional
24+
25+
from azure.core.credentials import TokenCredential
26+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
27+
1928
class _SDKClient(object):
2029
def __init__(self, *args, **kwargs):
2130
"""This is a fake class to support current implemetation of MultiApiClientMixin."
@@ -36,42 +45,50 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
3645
3746
:param credential: Credential needed for the client to connect to Azure.
3847
:type credential: ~azure.core.credentials.TokenCredential
39-
:param subscription_id: The Azure subscription Id.
48+
:param subscription_id: The ID of the target subscription.
4049
:type subscription_id: str
41-
:param str api_version: API version to use if no profile is provided, or if
42-
missing in profile.
43-
:param str base_url: Service URL
50+
:param api_version: API version to use if no profile is provided, or if missing in profile.
51+
:type api_version: str
52+
:param base_url: Service URL
53+
:type base_url: str
4454
:param profile: A profile definition, from KnownProfiles to dict.
4555
:type profile: azure.profiles.KnownProfiles
4656
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
4757
"""
4858

49-
DEFAULT_API_VERSION = '2019-10-17-preview'
59+
DEFAULT_API_VERSION = '2020-10-01'
5060
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
5161
LATEST_PROFILE = ProfileDefinition({
5262
_PROFILE_TAG: {
5363
None: DEFAULT_API_VERSION,
5464
'action_groups': '2019-06-01',
55-
'activity_log_alerts': '2017-04-01',
5665
'activity_logs': '2015-04-01',
5766
'alert_rule_incidents': '2016-03-01',
5867
'alert_rules': '2016-03-01',
5968
'autoscale_settings': '2015-04-01',
6069
'baseline': '2018-09-01',
6170
'baselines': '2019-03-01',
71+
'data_collection_rule_associations': '2019-11-01-preview',
72+
'data_collection_rules': '2019-11-01-preview',
6273
'diagnostic_settings': '2017-05-01-preview',
6374
'diagnostic_settings_category': '2017-05-01-preview',
6475
'event_categories': '2015-04-01',
6576
'guest_diagnostics_settings': '2018-06-01-preview',
6677
'guest_diagnostics_settings_association': '2018-06-01-preview',
6778
'log_profiles': '2016-03-01',
79+
'management_group_diagnostic_settings': '2020-01-01-preview',
6880
'metric_alerts': '2018-03-01',
6981
'metric_alerts_status': '2018-03-01',
7082
'metric_baseline': '2018-09-01',
7183
'metric_definitions': '2018-01-01',
7284
'metric_namespaces': '2017-12-01-preview',
7385
'metrics': '2018-01-01',
7486
'operations': '2015-04-01',
87+
'private_endpoint_connections': '2019-10-17-preview',
88+
'private_link_resources': '2019-10-17-preview',
89+
'private_link_scope_operation_status': '2019-10-17-preview',
90+
'private_link_scoped_resources': '2019-10-17-preview',
91+
'private_link_scopes': '2019-10-17-preview',
7592
'scheduled_query_rules': '2018-04-16',
7693
'service_diagnostic_settings': '2016-09-01',
7794
'subscription_diagnostic_settings': '2017-05-01-preview',
@@ -85,9 +102,9 @@ def __init__(
85102
self,
86103
credential, # type: "TokenCredential"
87104
subscription_id, # type: str
88-
api_version=None,
89-
base_url=None,
90-
profile=KnownProfiles.default,
105+
api_version=None, # type: Optional[str]
106+
base_url=None, # type: Optional[str]
107+
profile=KnownProfiles.default, # type: KnownProfiles
91108
**kwargs # type: Any
92109
):
93110
if not base_url:
@@ -128,6 +145,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
128145
* 2019-11-01-preview: :mod:`v2019_11_01_preview.models<azure.mgmt.monitor.v2019_11_01_preview.models>`
129146
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.monitor.v2020_01_01_preview.models>`
130147
* 2020-05-01-preview: :mod:`v2020_05_01_preview.models<azure.mgmt.monitor.v2020_05_01_preview.models>`
148+
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.monitor.v2020_10_01.models>`
131149
"""
132150
if api_version == '2015-04-01':
133151
from .v2015_04_01 import models
@@ -192,6 +210,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
192210
elif api_version == '2020-05-01-preview':
193211
from .v2020_05_01_preview import models
194212
return models
213+
elif api_version == '2020-10-01':
214+
from .v2020_10_01 import models
215+
return models
195216
raise ValueError("API version {} is not available".format(api_version))
196217

197218
@property
@@ -225,12 +246,15 @@ def activity_log_alerts(self):
225246
226247
* 2017-03-01-preview: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_03_01_preview.operations.ActivityLogAlertsOperations>`
227248
* 2017-04-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_04_01.operations.ActivityLogAlertsOperations>`
249+
* 2020-10-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2020_10_01.operations.ActivityLogAlertsOperations>`
228250
"""
229251
api_version = self._get_api_version('activity_log_alerts')
230252
if api_version == '2017-03-01-preview':
231253
from .v2017_03_01_preview.operations import ActivityLogAlertsOperations as OperationClass
232254
elif api_version == '2017-04-01':
233255
from .v2017_04_01.operations import ActivityLogAlertsOperations as OperationClass
256+
elif api_version == '2020-10-01':
257+
from .v2020_10_01.operations import ActivityLogAlertsOperations as OperationClass
234258
else:
235259
raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version))
236260
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -265,10 +289,16 @@ def alert_rule_incidents(self):
265289
def alert_rules(self):
266290
"""Instance depends on the API version:
267291
292+
* 2015-04-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_04_01.operations.AlertRulesOperations>`
293+
* 2015-07-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_07_01.operations.AlertRulesOperations>`
268294
* 2016-03-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2016_03_01.operations.AlertRulesOperations>`
269295
"""
270296
api_version = self._get_api_version('alert_rules')
271-
if api_version == '2016-03-01':
297+
if api_version == '2015-04-01':
298+
from .v2015_04_01.operations import AlertRulesOperations as OperationClass
299+
elif api_version == '2015-07-01':
300+
from .v2015_07_01.operations import AlertRulesOperations as OperationClass
301+
elif api_version == '2016-03-01':
272302
from .v2016_03_01.operations import AlertRulesOperations as OperationClass
273303
else:
274304
raise ValueError("API version {} does not have operation group 'alert_rules'".format(api_version))

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from .._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from azure.core.credentials_async import AsyncTokenCredential
1922

2023
class MonitorManagementClientConfiguration(Configuration):
2124
"""Configuration for MonitorManagementClient.
@@ -25,14 +28,14 @@ class MonitorManagementClientConfiguration(Configuration):
2528
2629
:param credential: Credential needed for the client to connect to Azure.
2730
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
28-
:param subscription_id: The Azure subscription Id.
31+
:param subscription_id: The ID of the target subscription.
2932
:type subscription_id: str
3033
"""
3134

3235
def __init__(
3336
self,
34-
credential, # type: "AsyncTokenCredential"
35-
subscription_id, # type: str
37+
credential: "AsyncTokenCredential",
38+
subscription_id: str,
3639
**kwargs # type: Any
3740
) -> None:
3841
if credential is None:

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

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from azure.mgmt.core import AsyncARMPipelineClient
13-
from msrest import Serializer, Deserializer
12+
from typing import Any, Optional, TYPE_CHECKING
1413

14+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
15+
from azure.mgmt.core import AsyncARMPipelineClient
1516
from azure.profiles import KnownProfiles, ProfileDefinition
1617
from azure.profiles.multiapiclient import MultiApiClientMixin
18+
from msrest import Deserializer, Serializer
19+
1720
from ._configuration import MonitorManagementClientConfiguration
1821

22+
if TYPE_CHECKING:
23+
# pylint: disable=unused-import,ungrouped-imports
24+
from azure.core.credentials_async import AsyncTokenCredential
25+
1926
class _SDKClient(object):
2027
def __init__(self, *args, **kwargs):
2128
"""This is a fake class to support current implemetation of MultiApiClientMixin."
@@ -36,42 +43,50 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
3643
3744
:param credential: Credential needed for the client to connect to Azure.
3845
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
39-
:param subscription_id: The Azure subscription Id.
46+
:param subscription_id: The ID of the target subscription.
4047
:type subscription_id: str
41-
:param str api_version: API version to use if no profile is provided, or if
42-
missing in profile.
43-
:param str base_url: Service URL
48+
:param api_version: API version to use if no profile is provided, or if missing in profile.
49+
:type api_version: str
50+
:param base_url: Service URL
51+
:type base_url: str
4452
:param profile: A profile definition, from KnownProfiles to dict.
4553
:type profile: azure.profiles.KnownProfiles
4654
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
4755
"""
4856

49-
DEFAULT_API_VERSION = '2019-10-17-preview'
57+
DEFAULT_API_VERSION = '2020-10-01'
5058
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
5159
LATEST_PROFILE = ProfileDefinition({
5260
_PROFILE_TAG: {
5361
None: DEFAULT_API_VERSION,
5462
'action_groups': '2019-06-01',
55-
'activity_log_alerts': '2017-04-01',
5663
'activity_logs': '2015-04-01',
5764
'alert_rule_incidents': '2016-03-01',
5865
'alert_rules': '2016-03-01',
5966
'autoscale_settings': '2015-04-01',
6067
'baseline': '2018-09-01',
6168
'baselines': '2019-03-01',
69+
'data_collection_rule_associations': '2019-11-01-preview',
70+
'data_collection_rules': '2019-11-01-preview',
6271
'diagnostic_settings': '2017-05-01-preview',
6372
'diagnostic_settings_category': '2017-05-01-preview',
6473
'event_categories': '2015-04-01',
6574
'guest_diagnostics_settings': '2018-06-01-preview',
6675
'guest_diagnostics_settings_association': '2018-06-01-preview',
6776
'log_profiles': '2016-03-01',
77+
'management_group_diagnostic_settings': '2020-01-01-preview',
6878
'metric_alerts': '2018-03-01',
6979
'metric_alerts_status': '2018-03-01',
7080
'metric_baseline': '2018-09-01',
7181
'metric_definitions': '2018-01-01',
7282
'metric_namespaces': '2017-12-01-preview',
7383
'metrics': '2018-01-01',
7484
'operations': '2015-04-01',
85+
'private_endpoint_connections': '2019-10-17-preview',
86+
'private_link_resources': '2019-10-17-preview',
87+
'private_link_scope_operation_status': '2019-10-17-preview',
88+
'private_link_scoped_resources': '2019-10-17-preview',
89+
'private_link_scopes': '2019-10-17-preview',
7590
'scheduled_query_rules': '2018-04-16',
7691
'service_diagnostic_settings': '2016-09-01',
7792
'subscription_diagnostic_settings': '2017-05-01-preview',
@@ -83,11 +98,11 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
8398

8499
def __init__(
85100
self,
86-
credential, # type: "AsyncTokenCredential"
87-
subscription_id, # type: str
88-
api_version=None,
89-
base_url=None,
90-
profile=KnownProfiles.default,
101+
credential: "AsyncTokenCredential",
102+
subscription_id: str,
103+
api_version: Optional[str] = None,
104+
base_url: Optional[str] = None,
105+
profile: KnownProfiles = KnownProfiles.default,
91106
**kwargs # type: Any
92107
) -> None:
93108
if not base_url:
@@ -128,6 +143,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
128143
* 2019-11-01-preview: :mod:`v2019_11_01_preview.models<azure.mgmt.monitor.v2019_11_01_preview.models>`
129144
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.monitor.v2020_01_01_preview.models>`
130145
* 2020-05-01-preview: :mod:`v2020_05_01_preview.models<azure.mgmt.monitor.v2020_05_01_preview.models>`
146+
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.monitor.v2020_10_01.models>`
131147
"""
132148
if api_version == '2015-04-01':
133149
from ..v2015_04_01 import models
@@ -192,6 +208,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
192208
elif api_version == '2020-05-01-preview':
193209
from ..v2020_05_01_preview import models
194210
return models
211+
elif api_version == '2020-10-01':
212+
from ..v2020_10_01 import models
213+
return models
195214
raise ValueError("API version {} is not available".format(api_version))
196215

197216
@property
@@ -225,12 +244,15 @@ def activity_log_alerts(self):
225244
226245
* 2017-03-01-preview: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_03_01_preview.aio.operations.ActivityLogAlertsOperations>`
227246
* 2017-04-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_04_01.aio.operations.ActivityLogAlertsOperations>`
247+
* 2020-10-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2020_10_01.aio.operations.ActivityLogAlertsOperations>`
228248
"""
229249
api_version = self._get_api_version('activity_log_alerts')
230250
if api_version == '2017-03-01-preview':
231251
from ..v2017_03_01_preview.aio.operations import ActivityLogAlertsOperations as OperationClass
232252
elif api_version == '2017-04-01':
233253
from ..v2017_04_01.aio.operations import ActivityLogAlertsOperations as OperationClass
254+
elif api_version == '2020-10-01':
255+
from ..v2020_10_01.aio.operations import ActivityLogAlertsOperations as OperationClass
234256
else:
235257
raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version))
236258
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -265,10 +287,16 @@ def alert_rule_incidents(self):
265287
def alert_rules(self):
266288
"""Instance depends on the API version:
267289
290+
* 2015-04-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_04_01.aio.operations.AlertRulesOperations>`
291+
* 2015-07-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_07_01.aio.operations.AlertRulesOperations>`
268292
* 2016-03-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2016_03_01.aio.operations.AlertRulesOperations>`
269293
"""
270294
api_version = self._get_api_version('alert_rules')
271-
if api_version == '2016-03-01':
295+
if api_version == '2015-04-01':
296+
from ..v2015_04_01.aio.operations import AlertRulesOperations as OperationClass
297+
elif api_version == '2015-07-01':
298+
from ..v2015_07_01.aio.operations import AlertRulesOperations as OperationClass
299+
elif api_version == '2016-03-01':
272300
from ..v2016_03_01.aio.operations import AlertRulesOperations as OperationClass
273301
else:
274302
raise ValueError("API version {} does not have operation group 'alert_rules'".format(api_version))

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from .v2015_04_01.models import *
88
from .v2016_03_01.models import *
99
from .v2016_09_01.models import *
10-
from .v2017_04_01.models import *
1110
from .v2017_05_01_preview.models import *
1211
from .v2017_12_01_preview.models import *
1312
from .v2018_01_01.models import *
@@ -19,3 +18,6 @@
1918
from .v2019_03_01.models import *
2019
from .v2019_06_01.models import *
2120
from .v2019_10_17.models import *
21+
from .v2019_11_01_preview.models import *
22+
from .v2020_01_01_preview.models import *
23+
from .v2020_10_01.models import *

0 commit comments

Comments
 (0)