Skip to content

Commit a7832ec

Browse files
author
SDKAuto
committed
CodeGen from PR 11643 in Azure/azure-rest-api-specs
Merge 470e49146dade7cbeb5ef8707ec177396fb0143e into 718ed16
1 parent 0d70f57 commit a7832ec

File tree

224 files changed

+9020
-1662
lines changed

Some content is hidden

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

224 files changed

+9020
-1662
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MonitorClientConfiguration(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

@@ -45,7 +45,7 @@ def __init__(
4545
self.credential = credential
4646
self.subscription_id = subscription_id
4747
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
48-
kwargs.setdefault('sdk_moniker', 'azure-mgmt-eventhub/{}'.format(VERSION))
48+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-monitor/{}'.format(VERSION))
4949
self._configure(**kwargs)
5050

5151
def _configure(

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

Lines changed: 101 additions & 64 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MonitorClientConfiguration(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

@@ -44,7 +44,7 @@ def __init__(
4444
self.credential = credential
4545
self.subscription_id = subscription_id
4646
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
47-
kwargs.setdefault('sdk_moniker', 'azure-mgmt-eventhub/{}'.format(VERSION))
47+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-monitor/{}'.format(VERSION))
4848
self._configure(**kwargs)
4949

5050
def _configure(

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

Lines changed: 101 additions & 64 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MonitorClientConfiguration(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

@@ -49,7 +49,7 @@ def __init__(
4949
self.subscription_id = subscription_id
5050
self.api_version = "2015-04-01"
5151
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
52-
kwargs.setdefault('sdk_moniker', 'mgmt-eventhub/{}'.format(VERSION))
52+
kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION))
5353
self._configure(**kwargs)
5454

5555
def _configure(

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,34 @@
88
"base_url": "\u0027https://management.azure.com\u0027",
99
"custom_base_url": null,
1010
"azure_arm": true,
11-
"has_lro_operations": false
11+
"has_lro_operations": false,
12+
"client_side_validation": true
1213
},
1314
"global_parameters": {
14-
"sync_method": {
15+
"sync": {
1516
"credential": {
16-
"method_signature": "credential, # type: \"TokenCredential\"",
17+
"signature": "credential, # type: \"TokenCredential\"",
1718
"description": "Credential needed for the client to connect to Azure.",
1819
"docstring_type": "~azure.core.credentials.TokenCredential",
1920
"required": true
2021
},
2122
"subscription_id": {
22-
"method_signature": "subscription_id, # type: str",
23-
"description": "The Azure subscription Id.",
23+
"signature": "subscription_id, # type: str",
24+
"description": "The ID of the target subscription.",
2425
"docstring_type": "str",
2526
"required": true
2627
}
2728
},
28-
"async_method": {
29+
"async": {
2930
"credential": {
30-
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
31+
"signature": "credential, # type: \"AsyncTokenCredential\"",
3132
"description": "Credential needed for the client to connect to Azure.",
3233
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3334
"required": true
3435
},
3536
"subscription_id": {
36-
"method_signature": "subscription_id, # type: str",
37-
"description": "The Azure subscription Id.",
37+
"signature": "subscription_id, # type: str",
38+
"description": "The ID of the target subscription.",
3839
"docstring_type": "str",
3940
"required": true
4041
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MonitorClient(object):
4141
:vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations
4242
:param credential: Credential needed for the client to connect to Azure.
4343
:type credential: ~azure.core.credentials.TokenCredential
44-
:param subscription_id: The Azure subscription Id.
44+
:param subscription_id: The ID of the target subscription.
4545
:type subscription_id: str
4646
:param str base_url: Service URL
4747
"""
@@ -61,7 +61,6 @@ def __init__(
6161

6262
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6363
self._serialize = Serializer(client_models)
64-
self._serialize.client_side_validation = False
6564
self._deserialize = Deserializer(client_models)
6665

6766
self.activity_logs = ActivityLogsOperations(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MonitorClientConfiguration(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

@@ -46,7 +46,7 @@ def __init__(
4646
self.subscription_id = subscription_id
4747
self.api_version = "2015-04-01"
4848
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
49-
kwargs.setdefault('sdk_moniker', 'mgmt-eventhub/{}'.format(VERSION))
49+
kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION))
5050
self._configure(**kwargs)
5151

5252
def _configure(

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class MonitorClient(object):
3939
:vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.aio.operations.TenantActivityLogsOperations
4040
:param credential: Credential needed for the client to connect to Azure.
4141
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
42-
:param subscription_id: The Azure subscription Id.
42+
:param subscription_id: The ID of the target subscription.
4343
:type subscription_id: str
4444
:param str base_url: Service URL
4545
"""
@@ -58,7 +58,6 @@ def __init__(
5858

5959
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6060
self._serialize = Serializer(client_models)
61-
self._serialize.client_side_validation = False
6261
self._deserialize = Deserializer(client_models)
6362

6463
self.activity_logs = ActivityLogsOperations(

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1515
from azure.mgmt.core.exceptions import ARMErrorFormat
1616

17-
from ... import models
17+
from ... import models as _models
1818

1919
T = TypeVar('T')
2020
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -33,7 +33,7 @@ class ActivityLogsOperations:
3333
:param deserializer: An object model deserializer.
3434
"""
3535

36-
models = models
36+
models = _models
3737

3838
def __init__(self, client, config, serializer, deserializer) -> None:
3939
self._client = client
@@ -46,7 +46,7 @@ def list(
4646
filter: str,
4747
select: Optional[str] = None,
4848
**kwargs
49-
) -> AsyncIterable["models.EventDataCollection"]:
49+
) -> AsyncIterable["_models.EventDataCollection"]:
5050
"""Provides the list of records from the activity logs.
5151
5252
:param filter: Reduces the set of data collected.:code:`<br>`This argument is required and it
@@ -77,7 +77,7 @@ def list(
7777
:rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.EventDataCollection]
7878
:raises: ~azure.core.exceptions.HttpResponseError
7979
"""
80-
cls = kwargs.pop('cls', None) # type: ClsType["models.EventDataCollection"]
80+
cls = kwargs.pop('cls', None) # type: ClsType["_models.EventDataCollection"]
8181
error_map = {
8282
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
8383
}
@@ -94,7 +94,7 @@ def prepare_request(next_link=None):
9494
# Construct URL
9595
url = self.list.metadata['url'] # type: ignore
9696
path_format_arguments = {
97-
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
97+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
9898
}
9999
url = self._client.format_url(url, **path_format_arguments)
100100
# Construct parameters
@@ -125,7 +125,7 @@ async def get_next(next_link=None):
125125
response = pipeline_response.http_response
126126

127127
if response.status_code not in [200]:
128-
error = self._deserialize(models.ErrorResponse, response)
128+
error = self._deserialize(_models.ErrorResponse, response)
129129
map_error(status_code=response.status_code, response=response, error_map=error_map)
130130
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
131131

0 commit comments

Comments
 (0)