Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2 storage 2021 02 19 #16822

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions sdk/storage/azure-mgmt-storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Release History

## 17.0.0 (2021-02-19)

**Features**

- Model StorageAccountUpdateParameters has a new parameter allow_shared_key_access
- Model FileServiceProperties has a new parameter protocol_settings
- Model Identity has a new parameter user_assigned_identities
- Model BlobServiceProperties has a new parameter last_access_time_tracking_policy
- Model EncryptionScopeKeyVaultProperties has a new parameter current_versioned_key_identifier
- Model EncryptionScopeKeyVaultProperties has a new parameter last_key_rotation_timestamp
- Model EncryptionScope has a new parameter require_infrastructure_encryption
- Model StorageAccountCreateParameters has a new parameter enable_nfs_v3
- Model StorageAccountCreateParameters has a new parameter extended_location
- Model StorageAccountCreateParameters has a new parameter allow_shared_key_access
- Model ManagementPolicyAction has a new parameter version
- Model Encryption has a new parameter encryption_identity
- Model StorageAccount has a new parameter enable_nfs_v3
- Model StorageAccount has a new parameter extended_location
- Model StorageAccount has a new parameter allow_shared_key_access
- Model ChangeFeed has a new parameter retention_in_days
- Model ManagementPolicySnapShot has a new parameter tier_to_archive
- Model ManagementPolicySnapShot has a new parameter tier_to_cool
- Model DateAfterModification has a new parameter days_after_last_access_time_greater_than
- Model FileShareItem has a new parameter snapshot_time
- Model FileShare has a new parameter snapshot_time
- Model NetworkRuleSet has a new parameter resource_access_rules
- Model ManagementPolicyBaseBlob has a new parameter enable_auto_tier_to_hot_from_cool
- Added operation group DeletedAccountsOperations
- Added operation group BlobInventoryPoliciesOperations

**Breaking changes**

- Operation FileSharesOperations.create has a new signature
- Operation FileSharesOperations.delete has a new signature
- Operation FileSharesOperations.get has a new signature
- Model ErrorResponse has a new signature

## 16.0.0 (2020-09-15)

**Features**
Expand Down
9 changes: 7 additions & 2 deletions sdk/storage/azure-mgmt-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ For a more complete view of Azure libraries, see the [azure sdk python release](

# Usage

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

To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
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.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)

# Provide Feedback

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "16.0.0"
VERSION = "17.0.0"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------
from .v2018_02_01.models import *
from .v2019_06_01.models import *
from .v2021_01_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true
"has_lro_operations": true,
"client_side_validation": true
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def __init__(

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

self.storage_accounts = StorageAccountsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __init__(

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

self.storage_accounts = StorageAccountsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling

from ... import models
from ... import models as _models

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

models = models
models = _models

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

async def check_name_availability(
self,
account_name: "models.StorageAccountCheckNameAvailabilityParameters",
account_name: "_models.StorageAccountCheckNameAvailabilityParameters",
**kwargs
) -> "models.CheckNameAvailabilityResult":
) -> "_models.CheckNameAvailabilityResult":
"""Checks that the storage account name is valid and is not already in use.

:param account_name: The name of the storage account within the specified resource group.
Expand All @@ -59,7 +59,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.storage.v2015_06_15.models.CheckNameAvailabilityResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -107,10 +107,10 @@ async def _create_initial(
self,
resource_group_name: str,
account_name: str,
parameters: "models.StorageAccountCreateParameters",
parameters: "_models.StorageAccountCreateParameters",
**kwargs
) -> Optional["models.StorageAccount"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.StorageAccount"]]
) -> Optional["_models.StorageAccount"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.StorageAccount"]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -162,9 +162,9 @@ async def begin_create(
self,
resource_group_name: str,
account_name: str,
parameters: "models.StorageAccountCreateParameters",
parameters: "_models.StorageAccountCreateParameters",
**kwargs
) -> AsyncLROPoller["models.StorageAccount"]:
) -> AsyncLROPoller["_models.StorageAccount"]:
"""Asynchronously creates a new storage account with the specified parameters. If an account is
already created and a subsequent create request is issued with different properties, the
account properties will be updated. If an account is already created and a subsequent create or
Expand All @@ -190,7 +190,7 @@ async def begin_create(
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
Expand All @@ -215,7 +215,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized

if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -290,7 +296,7 @@ async def get_properties(
resource_group_name: str,
account_name: str,
**kwargs
) -> "models.StorageAccount":
) -> "_models.StorageAccount":
"""Returns the properties for the specified storage account including but not limited to name, SKU
name, location, and account status. The ListKeys operation should be used to retrieve storage
keys.
Expand All @@ -307,7 +313,7 @@ async def get_properties(
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccount
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -352,9 +358,9 @@ async def update(
self,
resource_group_name: str,
account_name: str,
parameters: "models.StorageAccountUpdateParameters",
parameters: "_models.StorageAccountUpdateParameters",
**kwargs
) -> "models.StorageAccount":
) -> "_models.StorageAccount":
"""The update operation can be used to update the SKU, encryption, access tier, or tags for a
storage account. It can also be used to map the account to a custom domain. Only one custom
domain is supported per storage account; the replacement/change of custom domain is not
Expand All @@ -378,7 +384,7 @@ async def update(
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccount
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -427,7 +433,7 @@ async def update(
def list(
self,
**kwargs
) -> AsyncIterable["models.StorageAccountListResult"]:
) -> AsyncIterable["_models.StorageAccountListResult"]:
"""Lists all the storage accounts available under the subscription. Note that storage keys are not
returned; use the ListKeys operation for this.

Expand All @@ -436,7 +442,7 @@ def list(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.StorageAccountListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -495,7 +501,7 @@ def list_by_resource_group(
self,
resource_group_name: str,
**kwargs
) -> AsyncIterable["models.StorageAccountListResult"]:
) -> AsyncIterable["_models.StorageAccountListResult"]:
"""Lists all the storage accounts available under the given resource group. Note that storage keys
are not returned; use the ListKeys operation for this.

Expand All @@ -507,7 +513,7 @@ def list_by_resource_group(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.StorageAccountListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -568,7 +574,7 @@ async def list_keys(
resource_group_name: str,
account_name: str,
**kwargs
) -> "models.StorageAccountKeys":
) -> "_models.StorageAccountKeys":
"""Lists the access keys for the specified storage account.

:param resource_group_name: The name of the resource group within the user's subscription. The
Expand All @@ -583,7 +589,7 @@ async def list_keys(
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccountKeys
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountKeys"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountKeys"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -628,9 +634,9 @@ async def regenerate_key(
self,
resource_group_name: str,
account_name: str,
regenerate_key: "models.StorageAccountRegenerateKeyParameters",
regenerate_key: "_models.StorageAccountRegenerateKeyParameters",
**kwargs
) -> "models.StorageAccountKeys":
) -> "_models.StorageAccountKeys":
"""Regenerates one of the access keys for the specified storage account.

:param resource_group_name: The name of the resource group within the user's subscription. The
Expand All @@ -647,7 +653,7 @@ async def regenerate_key(
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccountKeys
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccountKeys"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageAccountKeys"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class UsageOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -44,15 +44,15 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
**kwargs
) -> AsyncIterable["models.UsageListResult"]:
) -> AsyncIterable["_models.UsageListResult"]:
"""Lists the current usage count and the limit for the resources under the subscription.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either UsageListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2015_06_15.models.UsageListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.UsageListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Loading