Skip to content

Commit 82c815d

Browse files
author
SDKAuto
committed
CodeGen from PR 13418 in Azure/azure-rest-api-specs
Merge bbcc64611511a2bbad81c53fc284984e7037b1ec into 8bfa3fb
1 parent f766181 commit 82c815d

File tree

215 files changed

+8541
-1518
lines changed

Some content is hidden

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

215 files changed

+8541
-1518
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MonitorManagementClientConfiguration(Configuration):
2525
2626
:param credential: Credential needed for the client to connect to Azure.
2727
:type credential: ~azure.core.credentials.TokenCredential
28-
:param subscription_id: The Azure subscription Id.
28+
:param subscription_id: The ID of the target subscription.
2929
:type subscription_id: str
3030
"""
3131

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
3636
3737
:param credential: Credential needed for the client to connect to Azure.
3838
:type credential: ~azure.core.credentials.TokenCredential
39-
:param subscription_id: The Azure subscription Id.
39+
:param subscription_id: The ID of the target subscription.
4040
:type subscription_id: str
4141
:param str api_version: API version to use if no profile is provided, or if
4242
missing in profile.
@@ -46,32 +46,39 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
4646
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
4747
"""
4848

49-
DEFAULT_API_VERSION = '2019-10-17-preview'
49+
DEFAULT_API_VERSION = '2020-10-01'
5050
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
5151
LATEST_PROFILE = ProfileDefinition({
5252
_PROFILE_TAG: {
5353
None: DEFAULT_API_VERSION,
5454
'action_groups': '2019-06-01',
55-
'activity_log_alerts': '2017-04-01',
5655
'activity_logs': '2015-04-01',
5756
'alert_rule_incidents': '2016-03-01',
5857
'alert_rules': '2016-03-01',
5958
'autoscale_settings': '2015-04-01',
6059
'baseline': '2018-09-01',
6160
'baselines': '2019-03-01',
61+
'data_collection_rule_associations': '2019-11-01-preview',
62+
'data_collection_rules': '2019-11-01-preview',
6263
'diagnostic_settings': '2017-05-01-preview',
6364
'diagnostic_settings_category': '2017-05-01-preview',
6465
'event_categories': '2015-04-01',
6566
'guest_diagnostics_settings': '2018-06-01-preview',
6667
'guest_diagnostics_settings_association': '2018-06-01-preview',
6768
'log_profiles': '2016-03-01',
69+
'management_group_diagnostic_settings': '2020-01-01-preview',
6870
'metric_alerts': '2018-03-01',
6971
'metric_alerts_status': '2018-03-01',
7072
'metric_baseline': '2018-09-01',
7173
'metric_definitions': '2018-01-01',
7274
'metric_namespaces': '2017-12-01-preview',
7375
'metrics': '2018-01-01',
7476
'operations': '2015-04-01',
77+
'private_endpoint_connections': '2019-10-17-preview',
78+
'private_link_resources': '2019-10-17-preview',
79+
'private_link_scope_operation_status': '2019-10-17-preview',
80+
'private_link_scoped_resources': '2019-10-17-preview',
81+
'private_link_scopes': '2019-10-17-preview',
7582
'scheduled_query_rules': '2018-04-16',
7683
'service_diagnostic_settings': '2016-09-01',
7784
'subscription_diagnostic_settings': '2017-05-01-preview',
@@ -128,6 +135,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
128135
* 2019-11-01-preview: :mod:`v2019_11_01_preview.models<azure.mgmt.monitor.v2019_11_01_preview.models>`
129136
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.monitor.v2020_01_01_preview.models>`
130137
* 2020-05-01-preview: :mod:`v2020_05_01_preview.models<azure.mgmt.monitor.v2020_05_01_preview.models>`
138+
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.monitor.v2020_10_01.models>`
131139
"""
132140
if api_version == '2015-04-01':
133141
from .v2015_04_01 import models
@@ -192,6 +200,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
192200
elif api_version == '2020-05-01-preview':
193201
from .v2020_05_01_preview import models
194202
return models
203+
elif api_version == '2020-10-01':
204+
from .v2020_10_01 import models
205+
return models
195206
raise ValueError("API version {} is not available".format(api_version))
196207

197208
@property
@@ -225,12 +236,15 @@ def activity_log_alerts(self):
225236
226237
* 2017-03-01-preview: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_03_01_preview.operations.ActivityLogAlertsOperations>`
227238
* 2017-04-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_04_01.operations.ActivityLogAlertsOperations>`
239+
* 2020-10-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2020_10_01.operations.ActivityLogAlertsOperations>`
228240
"""
229241
api_version = self._get_api_version('activity_log_alerts')
230242
if api_version == '2017-03-01-preview':
231243
from .v2017_03_01_preview.operations import ActivityLogAlertsOperations as OperationClass
232244
elif api_version == '2017-04-01':
233245
from .v2017_04_01.operations import ActivityLogAlertsOperations as OperationClass
246+
elif api_version == '2020-10-01':
247+
from .v2020_10_01.operations import ActivityLogAlertsOperations as OperationClass
234248
else:
235249
raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version))
236250
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -265,10 +279,16 @@ def alert_rule_incidents(self):
265279
def alert_rules(self):
266280
"""Instance depends on the API version:
267281
282+
* 2015-04-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_04_01.operations.AlertRulesOperations>`
283+
* 2015-07-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_07_01.operations.AlertRulesOperations>`
268284
* 2016-03-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2016_03_01.operations.AlertRulesOperations>`
269285
"""
270286
api_version = self._get_api_version('alert_rules')
271-
if api_version == '2016-03-01':
287+
if api_version == '2015-04-01':
288+
from .v2015_04_01.operations import AlertRulesOperations as OperationClass
289+
elif api_version == '2015-07-01':
290+
from .v2015_07_01.operations import AlertRulesOperations as OperationClass
291+
elif api_version == '2016-03-01':
272292
from .v2016_03_01.operations import AlertRulesOperations as OperationClass
273293
else:
274294
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MonitorManagementClientConfiguration(Configuration):
2525
2626
:param credential: Credential needed for the client to connect to Azure.
2727
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
28-
:param subscription_id: The Azure subscription Id.
28+
:param subscription_id: The ID of the target subscription.
2929
:type subscription_id: str
3030
"""
3131

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
3636
3737
:param credential: Credential needed for the client to connect to Azure.
3838
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
39-
:param subscription_id: The Azure subscription Id.
39+
:param subscription_id: The ID of the target subscription.
4040
:type subscription_id: str
4141
:param str api_version: API version to use if no profile is provided, or if
4242
missing in profile.
@@ -46,32 +46,39 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
4646
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
4747
"""
4848

49-
DEFAULT_API_VERSION = '2019-10-17-preview'
49+
DEFAULT_API_VERSION = '2020-10-01'
5050
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
5151
LATEST_PROFILE = ProfileDefinition({
5252
_PROFILE_TAG: {
5353
None: DEFAULT_API_VERSION,
5454
'action_groups': '2019-06-01',
55-
'activity_log_alerts': '2017-04-01',
5655
'activity_logs': '2015-04-01',
5756
'alert_rule_incidents': '2016-03-01',
5857
'alert_rules': '2016-03-01',
5958
'autoscale_settings': '2015-04-01',
6059
'baseline': '2018-09-01',
6160
'baselines': '2019-03-01',
61+
'data_collection_rule_associations': '2019-11-01-preview',
62+
'data_collection_rules': '2019-11-01-preview',
6263
'diagnostic_settings': '2017-05-01-preview',
6364
'diagnostic_settings_category': '2017-05-01-preview',
6465
'event_categories': '2015-04-01',
6566
'guest_diagnostics_settings': '2018-06-01-preview',
6667
'guest_diagnostics_settings_association': '2018-06-01-preview',
6768
'log_profiles': '2016-03-01',
69+
'management_group_diagnostic_settings': '2020-01-01-preview',
6870
'metric_alerts': '2018-03-01',
6971
'metric_alerts_status': '2018-03-01',
7072
'metric_baseline': '2018-09-01',
7173
'metric_definitions': '2018-01-01',
7274
'metric_namespaces': '2017-12-01-preview',
7375
'metrics': '2018-01-01',
7476
'operations': '2015-04-01',
77+
'private_endpoint_connections': '2019-10-17-preview',
78+
'private_link_resources': '2019-10-17-preview',
79+
'private_link_scope_operation_status': '2019-10-17-preview',
80+
'private_link_scoped_resources': '2019-10-17-preview',
81+
'private_link_scopes': '2019-10-17-preview',
7582
'scheduled_query_rules': '2018-04-16',
7683
'service_diagnostic_settings': '2016-09-01',
7784
'subscription_diagnostic_settings': '2017-05-01-preview',
@@ -128,6 +135,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
128135
* 2019-11-01-preview: :mod:`v2019_11_01_preview.models<azure.mgmt.monitor.v2019_11_01_preview.models>`
129136
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.monitor.v2020_01_01_preview.models>`
130137
* 2020-05-01-preview: :mod:`v2020_05_01_preview.models<azure.mgmt.monitor.v2020_05_01_preview.models>`
138+
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.monitor.v2020_10_01.models>`
131139
"""
132140
if api_version == '2015-04-01':
133141
from ..v2015_04_01 import models
@@ -192,6 +200,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
192200
elif api_version == '2020-05-01-preview':
193201
from ..v2020_05_01_preview import models
194202
return models
203+
elif api_version == '2020-10-01':
204+
from ..v2020_10_01 import models
205+
return models
195206
raise ValueError("API version {} is not available".format(api_version))
196207

197208
@property
@@ -225,12 +236,15 @@ def activity_log_alerts(self):
225236
226237
* 2017-03-01-preview: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_03_01_preview.aio.operations.ActivityLogAlertsOperations>`
227238
* 2017-04-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_04_01.aio.operations.ActivityLogAlertsOperations>`
239+
* 2020-10-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2020_10_01.aio.operations.ActivityLogAlertsOperations>`
228240
"""
229241
api_version = self._get_api_version('activity_log_alerts')
230242
if api_version == '2017-03-01-preview':
231243
from ..v2017_03_01_preview.aio.operations import ActivityLogAlertsOperations as OperationClass
232244
elif api_version == '2017-04-01':
233245
from ..v2017_04_01.aio.operations import ActivityLogAlertsOperations as OperationClass
246+
elif api_version == '2020-10-01':
247+
from ..v2020_10_01.aio.operations import ActivityLogAlertsOperations as OperationClass
234248
else:
235249
raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version))
236250
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -265,10 +279,16 @@ def alert_rule_incidents(self):
265279
def alert_rules(self):
266280
"""Instance depends on the API version:
267281
282+
* 2015-04-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_04_01.aio.operations.AlertRulesOperations>`
283+
* 2015-07-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2015_07_01.aio.operations.AlertRulesOperations>`
268284
* 2016-03-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2016_03_01.aio.operations.AlertRulesOperations>`
269285
"""
270286
api_version = self._get_api_version('alert_rules')
271-
if api_version == '2016-03-01':
287+
if api_version == '2015-04-01':
288+
from ..v2015_04_01.aio.operations import AlertRulesOperations as OperationClass
289+
elif api_version == '2015-07-01':
290+
from ..v2015_07_01.aio.operations import AlertRulesOperations as OperationClass
291+
elif api_version == '2016-03-01':
272292
from ..v2016_03_01.aio.operations import AlertRulesOperations as OperationClass
273293
else:
274294
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 *

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MonitorManagementClientConfiguration(Configuration):
2828
2929
:param credential: Credential needed for the client to connect to Azure.
3030
:type credential: ~azure.core.credentials.TokenCredential
31-
:param subscription_id: The Azure subscription Id.
31+
:param subscription_id: The ID of the target subscription.
3232
:type subscription_id: str
3333
"""
3434

@@ -47,7 +47,6 @@ def __init__(
4747

4848
self.credential = credential
4949
self.subscription_id = subscription_id
50-
self.api_version = "2015-04-01"
5150
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5251
kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION))
5352
self._configure(**kwargs)

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"chosen_version": "2015-04-01",
3-
"total_api_version_list": ["2015-04-01"],
3+
"total_api_version_list": ["2014-04-01", "2015-04-01"],
44
"client": {
55
"name": "MonitorManagementClient",
66
"filename": "_monitor_management_client",
@@ -9,7 +9,7 @@
99
"custom_base_url": null,
1010
"azure_arm": true,
1111
"has_lro_operations": false,
12-
"client_side_validation": false
12+
"client_side_validation": true
1313
},
1414
"global_parameters": {
1515
"sync": {
@@ -21,7 +21,7 @@
2121
},
2222
"subscription_id": {
2323
"signature": "subscription_id, # type: str",
24-
"description": "The Azure subscription Id.",
24+
"description": "The ID of the target subscription.",
2525
"docstring_type": "str",
2626
"required": true
2727
}
@@ -35,7 +35,7 @@
3535
},
3636
"subscription_id": {
3737
"signature": "subscription_id, # type: str",
38-
"description": "The Azure subscription Id.",
38+
"description": "The ID of the target subscription.",
3939
"docstring_type": "str",
4040
"required": true
4141
}
@@ -56,7 +56,8 @@
5656
"autoscale_settings": "AutoscaleSettingsOperations",
5757
"event_categories": "EventCategoriesOperations",
5858
"operations": "Operations",
59-
"tenant_activity_logs": "TenantActivityLogsOperations"
59+
"tenant_activity_logs": "TenantActivityLogsOperations",
60+
"alert_rules": "AlertRulesOperations"
6061
},
6162
"operation_mixins": {
6263
},

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .operations import EventCategoriesOperations
2424
from .operations import Operations
2525
from .operations import TenantActivityLogsOperations
26+
from .operations import AlertRulesOperations
2627
from . import models
2728

2829

@@ -39,9 +40,11 @@ class MonitorManagementClient(object):
3940
:vartype operations: $(python-base-namespace).v2015_04_01.operations.Operations
4041
:ivar tenant_activity_logs: TenantActivityLogsOperations operations
4142
:vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations
43+
:ivar alert_rules: AlertRulesOperations operations
44+
:vartype alert_rules: $(python-base-namespace).v2015_04_01.operations.AlertRulesOperations
4245
:param credential: Credential needed for the client to connect to Azure.
4346
:type credential: ~azure.core.credentials.TokenCredential
44-
:param subscription_id: The Azure subscription Id.
47+
:param subscription_id: The ID of the target subscription.
4548
:type subscription_id: str
4649
:param str base_url: Service URL
4750
"""
@@ -61,7 +64,6 @@ def __init__(
6164

6265
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6366
self._serialize = Serializer(client_models)
64-
self._serialize.client_side_validation = False
6567
self._deserialize = Deserializer(client_models)
6668

6769
self.activity_logs = ActivityLogsOperations(
@@ -74,6 +76,8 @@ def __init__(
7476
self._client, self._config, self._serialize, self._deserialize)
7577
self.tenant_activity_logs = TenantActivityLogsOperations(
7678
self._client, self._config, self._serialize, self._deserialize)
79+
self.alert_rules = AlertRulesOperations(
80+
self._client, self._config, self._serialize, self._deserialize)
7781

7882
def close(self):
7983
# type: () -> None

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MonitorManagementClientConfiguration(Configuration):
2626
2727
:param credential: Credential needed for the client to connect to Azure.
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
29-
:param subscription_id: The Azure subscription Id.
29+
:param subscription_id: The ID of the target subscription.
3030
:type subscription_id: str
3131
"""
3232

@@ -44,7 +44,6 @@ def __init__(
4444

4545
self.credential = credential
4646
self.subscription_id = subscription_id
47-
self.api_version = "2015-04-01"
4847
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4948
kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION))
5049
self._configure(**kwargs)

0 commit comments

Comments
 (0)