Skip to content

Commit 6fd75b3

Browse files
00Kai0SDKAuto
andauthored
T2 storage 2021 02 20 (#16842)
* CodeGen from PR 13073 in Azure/azure-rest-api-specs {Storage} change modelAsString from false to true (#13073) * test,version,CHANGELOG * fix test Co-authored-by: SDKAuto <[email protected]>
1 parent b1f0288 commit 6fd75b3

File tree

293 files changed

+57260
-3244
lines changed

Some content is hidden

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

293 files changed

+57260
-3244
lines changed

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

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

3+
## 17.0.0 (2021-02-20)
4+
5+
**Features**
6+
7+
- Model Encryption has a new parameter encryption_identity
8+
- Model Identity has a new parameter user_assigned_identities
9+
- Model ManagementPolicyBaseBlob has a new parameter enable_auto_tier_to_hot_from_cool
10+
- Model EncryptionScope has a new parameter require_infrastructure_encryption
11+
- Model StorageAccount has a new parameter extended_location
12+
- Model StorageAccount has a new parameter allow_shared_key_access
13+
- Model StorageAccount has a new parameter enable_nfs_v3
14+
- Model EncryptionScopeKeyVaultProperties has a new parameter current_versioned_key_identifier
15+
- Model EncryptionScopeKeyVaultProperties has a new parameter last_key_rotation_timestamp
16+
- Model DateAfterModification has a new parameter days_after_last_access_time_greater_than
17+
- Model StorageAccountUpdateParameters has a new parameter allow_shared_key_access
18+
- Model BlobServiceProperties has a new parameter last_access_time_tracking_policy
19+
- Model ChangeFeed has a new parameter retention_in_days
20+
- Model FileShare has a new parameter snapshot_time
21+
- Model ManagementPolicyAction has a new parameter version
22+
- Model StorageAccountCreateParameters has a new parameter extended_location
23+
- Model StorageAccountCreateParameters has a new parameter allow_shared_key_access
24+
- Model StorageAccountCreateParameters has a new parameter enable_nfs_v3
25+
- Model FileShareItem has a new parameter snapshot_time
26+
- Model FileServiceProperties has a new parameter protocol_settings
27+
- Model ManagementPolicySnapShot has a new parameter tier_to_archive
28+
- Model ManagementPolicySnapShot has a new parameter tier_to_cool
29+
- Model NetworkRuleSet has a new parameter resource_access_rules
30+
- Added operation group BlobInventoryPoliciesOperations
31+
- Added operation group DeletedAccountsOperations
32+
33+
**Breaking changes**
34+
35+
- Operation FileSharesOperations.create has a new signature
36+
- Operation FileSharesOperations.delete has a new signature
37+
- Operation FileSharesOperations.get has a new signature
38+
- Model ErrorResponse has a new signature
39+
340
## 16.0.0 (2020-09-15)
441

542
**Features**

sdk/storage/azure-mgmt-storage/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ For a more complete view of Azure libraries, see the [azure sdk python release](
77

88
# Usage
99

10-
For code examples, see [Storage Management](https://docs.microsoft.com/python/api/overview/azure/storage?view=azure-python-preview)
11-
on docs.microsoft.com.
1210

11+
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
12+
13+
14+
15+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
16+
Code samples for this package can be found at [Storage Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
17+
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
1318

1419
# Provide Feedback
1520

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

Lines changed: 146 additions & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "16.0.0"
8+
VERSION = "17.0.0"

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

Lines changed: 146 additions & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77
from .v2018_02_01.models import *
8-
from .v2019_06_01.models import *
8+
from .v2021_01_01.models import *

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
}

0 commit comments

Comments
 (0)