Skip to content

Commit dac7eda

Browse files
author
SDKAuto
committed
CodeGen from PR 11906 in Azure/azure-rest-api-specs
Merge c7a0ed9c64fadb9c869b165486924852a5984c20 into 0b03b72
1 parent b85bb25 commit dac7eda

File tree

227 files changed

+28373
-2271
lines changed

Some content is hidden

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

227 files changed

+28373
-2271
lines changed

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_storage_management_client.py

Lines changed: 81 additions & 0 deletions
Large diffs are not rendered by default.

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/_storage_management_client.py

Lines changed: 81 additions & 0 deletions
Large diffs are not rendered by default.

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/_metadata.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@
88
"base_url": "\u0027https://management.azure.com\u0027",
99
"custom_base_url": null,
1010
"azure_arm": true,
11-
"has_lro_operations": true
11+
"has_lro_operations": true,
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+
"signature": "subscription_id, # type: str",
2324
"description": "Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
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+
"signature": "subscription_id, # type: str",
3738
"description": "Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
3839
"docstring_type": "str",
3940
"required": true

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/_storage_management.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def __init__(
5353

5454
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
5555
self._serialize = Serializer(client_models)
56-
self._serialize.client_side_validation = False
5756
self._deserialize = Deserializer(client_models)
5857

5958
self.storage_accounts = StorageAccountsOperations(

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/aio/_storage_management.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __init__(
5050

5151
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
5252
self._serialize = Serializer(client_models)
53-
self._serialize.client_side_validation = False
5453
self._deserialize = Deserializer(client_models)
5554

5655
self.storage_accounts = StorageAccountsOperations(

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/aio/operations/_storage_accounts_operations.py

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from azure.mgmt.core.exceptions import ARMErrorFormat
1717
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
1818

19-
from ... import models
19+
from ... import models as _models
2020

2121
T = TypeVar('T')
2222
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -35,7 +35,7 @@ class StorageAccountsOperations:
3535
:param deserializer: An object model deserializer.
3636
"""
3737

38-
models = models
38+
models = _models
3939

4040
def __init__(self, client, config, serializer, deserializer) -> None:
4141
self._client = client
@@ -45,9 +45,9 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4545

4646
async def check_name_availability(
4747
self,
48-
account_name: "models.StorageAccountCheckNameAvailabilityParameters",
48+
account_name: "_models.StorageAccountCheckNameAvailabilityParameters",
4949
**kwargs
50-
) -> "models.CheckNameAvailabilityResult":
50+
) -> "_models.CheckNameAvailabilityResult":
5151
"""Checks that the storage account name is valid and is not already in use.
5252
5353
:param account_name: The name of the storage account within the specified resource group.
@@ -59,7 +59,7 @@ async def check_name_availability(
5959
:rtype: ~azure.mgmt.storage.v2015_06_15.models.CheckNameAvailabilityResult
6060
:raises: ~azure.core.exceptions.HttpResponseError
6161
"""
62-
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"]
62+
cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"]
6363
error_map = {
6464
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6565
}
@@ -107,10 +107,10 @@ async def _create_initial(
107107
self,
108108
resource_group_name: str,
109109
account_name: str,
110-
parameters: "models.StorageAccountCreateParameters",
110+
parameters: "_models.StorageAccountCreateParameters",
111111
**kwargs
112-
) -> Optional["models.StorageAccount"]:
113-
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.StorageAccount"]]
112+
) -> Optional["_models.StorageAccount"]:
113+
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.StorageAccount"]]
114114
error_map = {
115115
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
116116
}
@@ -162,9 +162,9 @@ async def begin_create(
162162
self,
163163
resource_group_name: str,
164164
account_name: str,
165-
parameters: "models.StorageAccountCreateParameters",
165+
parameters: "_models.StorageAccountCreateParameters",
166166
**kwargs
167-
) -> AsyncLROPoller["models.StorageAccount"]:
167+
) -> AsyncLROPoller["_models.StorageAccount"]:
168168
"""Asynchronously creates a new storage account with the specified parameters. If an account is
169169
already created and a subsequent create request is issued with different properties, the
170170
account properties will be updated. If an account is already created and a subsequent create or
@@ -190,7 +190,7 @@ async def begin_create(
190190
:raises ~azure.core.exceptions.HttpResponseError:
191191
"""
192192
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
193-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
193+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
194194
lro_delay = kwargs.pop(
195195
'polling_interval',
196196
self._config.polling_interval
@@ -215,7 +215,13 @@ def get_long_running_output(pipeline_response):
215215
return cls(pipeline_response, deserialized, {})
216216
return deserialized
217217

218-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
218+
path_format_arguments = {
219+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
220+
'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3),
221+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
222+
}
223+
224+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
219225
elif polling is False: polling_method = AsyncNoPolling()
220226
else: polling_method = polling
221227
if cont_token:
@@ -290,7 +296,7 @@ async def get_properties(
290296
resource_group_name: str,
291297
account_name: str,
292298
**kwargs
293-
) -> "models.StorageAccount":
299+
) -> "_models.StorageAccount":
294300
"""Returns the properties for the specified storage account including but not limited to name, SKU
295301
name, location, and account status. The ListKeys operation should be used to retrieve storage
296302
keys.
@@ -307,7 +313,7 @@ async def get_properties(
307313
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccount
308314
:raises: ~azure.core.exceptions.HttpResponseError
309315
"""
310-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
316+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
311317
error_map = {
312318
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
313319
}
@@ -352,9 +358,9 @@ async def update(
352358
self,
353359
resource_group_name: str,
354360
account_name: str,
355-
parameters: "models.StorageAccountUpdateParameters",
361+
parameters: "_models.StorageAccountUpdateParameters",
356362
**kwargs
357-
) -> "models.StorageAccount":
363+
) -> "_models.StorageAccount":
358364
"""The update operation can be used to update the SKU, encryption, access tier, or tags for a
359365
storage account. It can also be used to map the account to a custom domain. Only one custom
360366
domain is supported per storage account; the replacement/change of custom domain is not
@@ -378,7 +384,7 @@ async def update(
378384
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccount
379385
:raises: ~azure.core.exceptions.HttpResponseError
380386
"""
381-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
387+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
382388
error_map = {
383389
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
384390
}
@@ -427,7 +433,7 @@ async def update(
427433
def list(
428434
self,
429435
**kwargs
430-
) -> AsyncIterable["models.StorageAccountListResult"]:
436+
) -> AsyncIterable["_models.StorageAccountListResult"]:
431437
"""Lists all the storage accounts available under the subscription. Note that storage keys are not
432438
returned; use the ListKeys operation for this.
433439
@@ -436,7 +442,7 @@ def list(
436442
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.StorageAccountListResult]
437443
:raises: ~azure.core.exceptions.HttpResponseError
438444
"""
439-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountListResult"]
445+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountListResult"]
440446
error_map = {
441447
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
442448
}
@@ -495,7 +501,7 @@ def list_by_resource_group(
495501
self,
496502
resource_group_name: str,
497503
**kwargs
498-
) -> AsyncIterable["models.StorageAccountListResult"]:
504+
) -> AsyncIterable["_models.StorageAccountListResult"]:
499505
"""Lists all the storage accounts available under the given resource group. Note that storage keys
500506
are not returned; use the ListKeys operation for this.
501507
@@ -507,7 +513,7 @@ def list_by_resource_group(
507513
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.StorageAccountListResult]
508514
:raises: ~azure.core.exceptions.HttpResponseError
509515
"""
510-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountListResult"]
516+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountListResult"]
511517
error_map = {
512518
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
513519
}
@@ -568,7 +574,7 @@ async def list_keys(
568574
resource_group_name: str,
569575
account_name: str,
570576
**kwargs
571-
) -> "models.StorageAccountKeys":
577+
) -> "_models.StorageAccountKeys":
572578
"""Lists the access keys for the specified storage account.
573579
574580
:param resource_group_name: The name of the resource group within the user's subscription. The
@@ -583,7 +589,7 @@ async def list_keys(
583589
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccountKeys
584590
:raises: ~azure.core.exceptions.HttpResponseError
585591
"""
586-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountKeys"]
592+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountKeys"]
587593
error_map = {
588594
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
589595
}
@@ -628,9 +634,9 @@ async def regenerate_key(
628634
self,
629635
resource_group_name: str,
630636
account_name: str,
631-
regenerate_key: "models.StorageAccountRegenerateKeyParameters",
637+
regenerate_key: "_models.StorageAccountRegenerateKeyParameters",
632638
**kwargs
633-
) -> "models.StorageAccountKeys":
639+
) -> "_models.StorageAccountKeys":
634640
"""Regenerates one of the access keys for the specified storage account.
635641
636642
:param resource_group_name: The name of the resource group within the user's subscription. The
@@ -647,7 +653,7 @@ async def regenerate_key(
647653
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccountKeys
648654
:raises: ~azure.core.exceptions.HttpResponseError
649655
"""
650-
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountKeys"]
656+
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountKeys"]
651657
error_map = {
652658
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
653659
}

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2015_06_15/aio/operations/_usage_operations.py

Lines changed: 4 additions & 4 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 UsageOperations:
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
@@ -44,15 +44,15 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4444
def list(
4545
self,
4646
**kwargs
47-
) -> AsyncIterable["models.UsageListResult"]:
47+
) -> AsyncIterable["_models.UsageListResult"]:
4848
"""Lists the current usage count and the limit for the resources under the subscription.
4949
5050
:keyword callable cls: A custom type or function that will be passed the direct response
5151
:return: An iterator like instance of either UsageListResult or the result of cls(response)
5252
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.UsageListResult]
5353
:raises: ~azure.core.exceptions.HttpResponseError
5454
"""
55-
cls = kwargs.pop('cls', None) # type: ClsType["models.UsageListResult"]
55+
cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageListResult"]
5656
error_map = {
5757
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5858
}

0 commit comments

Comments
 (0)