Package: azure-mgmt-storage
Microsoft Azure SDK for PythonThis is the Microsoft Azure Storage Management Client Library.
This package has been tested with Python 3.7+.
For a more complete view of Azure libraries, see theazure sdk python release.DisclaimerAzure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer tohttps://github.com/Azure/azure-sdk-for-python/issues/20691Getting startedPrerequisitesPython 3.7+ is required to use this package.Azure subscriptionInstall the packagepipinstallazure-mgmt-storage
pipinstallazure-identityAuthenticationBy default,Azure Active Directorytoken authentication depends on correct configure of following environment variables.AZURE_CLIENT_IDfor Azure client ID.AZURE_TENANT_IDfor Azure tenant ID.AZURE_CLIENT_SECRETfor Azure client secret.In addition, Azure subscription ID can be configured via environment variableAZURE_SUBSCRIPTION_ID.With above configuration, client can be authenticated by following code:fromazure.identityimportDefaultAzureCredentialfromazure.mgmt.storageimportStorageManagementClientimportossub_id=os.getenv("AZURE_SUBSCRIPTION_ID")client=StorageManagementClient(credential=DefaultAzureCredential(),subscription_id=sub_id)ExamplesCode samples for this package can be found at:Search Storage Managementon docs.microsoft.comAzure Python Mgmt SDK Samples RepoTroubleshootingNext stepsProvide FeedbackIf you encounter any bugs or have suggestions, please file an issue in theIssuessection of the project.Release History21.1.0 (2023-08-18)Features AddedAdded operation StorageAccountsOperations.begin_customer_initiated_migrationAdded operation StorageAccountsOperations.get_customer_initiated_migrationModel BlobInventoryPolicyFilter has a new parameter creation_timeModel GeoReplicationStats has a new parameter can_planned_failoverModel GeoReplicationStats has a new parameter post_failover_redundancyModel GeoReplicationStats has a new parameter post_planned_failover_redundancyModel StorageAccount has a new parameter account_migration_in_progressModel StorageAccount has a new parameter is_sku_conversion_blocked21.1.0b1 (2023-02-20)Other ChangesAdded generated samples in github repoDrop support for python<3.7.021.0.0 (2022-11-15)Features AddedModel ManagementPolicyBaseBlob has a new parameter tier_to_coldModel ManagementPolicyBaseBlob has a new parameter tier_to_hotModel ManagementPolicySnapShot has a new parameter tier_to_coldModel ManagementPolicySnapShot has a new parameter tier_to_hotModel ManagementPolicyVersion has a new parameter tier_to_coldModel ManagementPolicyVersion has a new parameter tier_to_hotBreaking ChangesOperation EncryptionScopesOperations.list has a new parameter filterOperation EncryptionScopesOperations.list has a new parameter includeOperation EncryptionScopesOperations.list has a new parameter maxpagesizeOperation StorageAccountsOperations.begin_failover has a new parameter failover_type20.1.0 (2022-08-09)FeaturesAdded model AllowedMethodsAdded model LeaseContainerRequestEnum20.0.0 (2022-04-06)FeaturesModel BlobInventoryPolicyFilter has a new parameter exclude_prefixModel BlobInventoryPolicyFilter has a new parameter include_deletedModel BlobInventoryPolicySchema has a new parameter destinationModel DateAfterCreation has a new parameter days_after_last_tier_change_greater_thanModel DateAfterModification has a new parameter days_after_creation_greater_thanModel DateAfterModification has a new parameter days_after_last_tier_change_greater_thanModel DeleteRetentionPolicy has a new parameter allow_permanent_deleteModel KeyVaultProperties has a new parameter current_versioned_key_expiration_timestampModel StorageAccount has a new parameter dns_endpoint_typeModel StorageAccount has a new parameter storage_account_sku_conversion_statusModel StorageAccountCreateParameters has a new parameter dns_endpoint_typeModel StorageAccountUpdateParameters has a new parameter dns_endpoint_typeModel Table has a new parameter signed_identifiersBreaking changesOperation TableOperations.create has a new signatureOperation TableOperations.update has a new signature19.1.0 (2022-02-15)FeaturesAdded operation group LocalUsersOperationsModel ActiveDirectoryProperties has a new parameter account_typeModel ActiveDirectoryProperties has a new parameter sam_account_nameModel EncryptionIdentity has a new parameter encryption_federated_identity_client_idModel StorageAccount has a new parameter allowed_copy_scopeModel StorageAccount has a new parameter is_local_user_enabledModel StorageAccount has a new parameter is_sftp_enabledModel StorageAccountCreateParameters has a new parameter allowed_copy_scopeModel StorageAccountCreateParameters has a new parameter is_local_user_enabledModel StorageAccountCreateParameters has a new parameter is_sftp_enabledModel StorageAccountUpdateParameters has a new parameter allowed_copy_scopeModel StorageAccountUpdateParameters has a new parameter is_local_user_enabledModel StorageAccountUpdateParameters has a new parameter is_sftp_enabled19.0.0 (2021-09-14)FeaturesModel BlobContainer has a new parameter enable_nfs_v3_root_squashModel BlobContainer has a new parameter enable_nfs_v3_all_squashModel UpdateHistoryProperty has a new parameter allow_protected_append_writesModel UpdateHistoryProperty has a new parameter allow_protected_append_writes_allModel StorageAccountUpdateParameters has a new parameter default_to_o_auth_authenticationModel StorageAccountUpdateParameters has a new parameter public_network_accessModel StorageAccountUpdateParameters has a new parameter immutable_storage_with_versioningModel ImmutabilityPolicy has a new parameter allow_protected_append_writes_allModel StorageAccountCreateParameters has a new parameter default_to_o_auth_authenticationModel StorageAccountCreateParameters has a new parameter public_network_accessModel StorageAccountCreateParameters has a new parameter immutable_storage_with_versioningModel ListContainerItem has a new parameter enable_nfs_v3_root_squashModel ListContainerItem has a new parameter enable_nfs_v3_all_squashModel LegalHoldProperties has a new parameter protected_append_writes_historyModel ImmutabilityPolicyProperties has a new parameter allow_protected_append_writes_allModel StorageAccount has a new parameter default_to_o_auth_authenticationModel StorageAccount has a new parameter public_network_accessModel StorageAccount has a new parameter immutable_storage_with_versioningModel LegalHold has a new parameter allow_protected_append_writes_allAdded operation StorageAccountsOperations.begin_abort_hierarchical_namespace_migrationAdded operation StorageAccountsOperations.begin_hierarchical_namespace_migrationBreaking changesModel AccessPolicy has a new signature18.0.0 (2021-05-13)FeaturesModel StorageAccountUpdateParameters has a new parameter allow_cross_tenant_replicationModel BlobContainer has a new parameter immutable_storage_with_versioningModel FileShareItem has a new parameter lease_stateModel FileShareItem has a new parameter lease_durationModel FileShareItem has a new parameter lease_statusModel FileShareItem has a new parameter signed_identifiersModel FileShare has a new parameter lease_stateModel FileShare has a new parameter lease_durationModel FileShare has a new parameter lease_statusModel FileShare has a new parameter signed_identifiersModel StorageAccountCreateParameters has a new parameter allow_cross_tenant_replicationModel AzureFilesIdentityBasedAuthentication has a new parameter default_share_permissionModel StorageAccount has a new parameter allow_cross_tenant_replicationModel ListContainerItem has a new parameter immutable_storage_with_versioningAdded operation BlobContainersOperations.begin_object_level_wormAdded operation FileSharesOperations.leaseBreaking changesOperation FileSharesOperations.delete has a new signatureModel BlobInventoryPolicySchema no longer has parameter destinationModel BlobInventoryPolicyRule has a new required parameter destinationModel BlobInventoryPolicyDefinition has a new signature17.1.0 (2021-04-13)FeaturesModel StorageAccountKey has a new parameter creation_timeModel StorageAccountUpdateParameters has a new parameter sas_policyModel StorageAccountUpdateParameters has a new parameter key_policyModel StorageAccountCreateParameters has a new parameter sas_policyModel StorageAccountCreateParameters has a new parameter key_policyModel StorageAccount has a new parameter sas_policyModel StorageAccount has a new parameter key_policyModel StorageAccount has a new parameter key_creation_time17.0.0 (2021-02-20)FeaturesModel Encryption has a new parameter encryption_identityModel Identity has a new parameter user_assigned_identitiesModel ManagementPolicyBaseBlob has a new parameter enable_auto_tier_to_hot_from_coolModel EncryptionScope has a new parameter require_infrastructure_encryptionModel StorageAccount has a new parameter extended_locationModel StorageAccount has a new parameter allow_shared_key_accessModel StorageAccount has a new parameter enable_nfs_v3Model EncryptionScopeKeyVaultProperties has a new parameter current_versioned_key_identifierModel EncryptionScopeKeyVaultProperties has a new parameter last_key_rotation_timestampModel DateAfterModification has a new parameter days_after_last_access_time_greater_thanModel StorageAccountUpdateParameters has a new parameter allow_shared_key_accessModel BlobServiceProperties has a new parameter last_access_time_tracking_policyModel ChangeFeed has a new parameter retention_in_daysModel FileShare has a new parameter snapshot_timeModel ManagementPolicyAction has a new parameter versionModel StorageAccountCreateParameters has a new parameter extended_locationModel StorageAccountCreateParameters has a new parameter allow_shared_key_accessModel StorageAccountCreateParameters has a new parameter enable_nfs_v3Model FileShareItem has a new parameter snapshot_timeModel FileServiceProperties has a new parameter protocol_settingsModel ManagementPolicySnapShot has a new parameter tier_to_archiveModel ManagementPolicySnapShot has a new parameter tier_to_coolModel NetworkRuleSet has a new parameter resource_access_rulesAdded operation group BlobInventoryPoliciesOperationsAdded operation group DeletedAccountsOperationsBreaking changesOperation FileSharesOperations.create has a new signatureOperation FileSharesOperations.delete has a new signatureOperation FileSharesOperations.get has a new signatureModel ErrorResponse has a new signature16.0.0 (2020-09-15)FeaturesModel RestorePolicyProperties has a new parameter min_restore_timeBreaking changesOperation ManagementPoliciesOperations.create_or_update has a new signatureOperation ManagementPoliciesOperations.delete has a new signatureOperation ManagementPoliciesOperations.get has a new signature16.0.0b2 (2020-06-29)This is beta preview version.
For detailed changelog please refer to equivalent stable version 11.1.0 (https://pypi.org/project/azure-mgmt-storage/11.1.0/)16.0.0b1 (2020-06-17)This is beta preview version.This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).General breaking changesCredential system has been completly revamped:azure.common.credentialsormsrestazure.azure_active_directoryinstances are no longer supported, use theazure-identityclasses instead:https://pypi.org/project/azure-identity/credentialsparameter has been renamedcredentialTheconfigattribute no longer exists on a client, configuration should be passed as kwarg. Example:MyClient(credential, subscription_id, enable_logging=True). For a complete set of
supported options, see theparameters accept in init documentation of azure-coreYou can't import aversionmodule anymore, use__version__insteadOperations that used to return amsrest.polling.LROPollernow returns aazure.core.polling.LROPollerand are prefixed withbegin_.Exceptions tree have been simplified and most exceptions are nowazure.core.exceptions.HttpResponseError(CloudErrorhas been removed).Most of the operation kwarg have changed. Some of the most noticeable:rawhas been removed. Equivalent feature can be found usingcls, a callback that will give access to internal HTTP response for advanced userFor a complete set of
supported options, see theparameters accept in Request documentation of azure-coreGeneral new featuresType annotations support usingtyping. SDKs are mypy ready.This client has now stable and official support for async. Check theaionamespace of your package to find the async client.This client now support natively tracing library like OpenCensus or OpenTelemetry. See thistracing quickstartfor an overview.10.0.0 (2020-05-07)FeaturesModel ManagementPolicyFilter has a new parameter blob_index_matchModel FileShareItem has a new parameter access_tier_statusModel FileShareItem has a new parameter share_usage_bytesModel FileShareItem has a new parameter deletedModel FileShareItem has a new parameter deleted_timeModel FileShareItem has a new parameter access_tierModel FileShareItem has a new parameter versionModel FileShareItem has a new parameter root_squashModel FileShareItem has a new parameter enabled_protocolsModel FileShareItem has a new parameter access_tier_change_timeModel FileShareItem has a new parameter remaining_retention_daysModel RestorePolicyProperties has a new parameter last_enabled_timeModel FileShare has a new parameter access_tier_statusModel FileShare has a new parameter share_usage_bytesModel FileShare has a new parameter deletedModel FileShare has a new parameter deleted_timeModel FileShare has a new parameter access_tierModel FileShare has a new parameter versionModel FileShare has a new parameter root_squashModel FileShare has a new parameter enabled_protocolsModel FileShare has a new parameter access_tier_change_timeModel FileShare has a new parameter remaining_retention_daysAdded operation FileSharesOperations.restoreAdded operation PrivateEndpointConnectionsOperations.listAdded operation group ObjectReplicationPoliciesOperationsBreaking changesOperation FileSharesOperations.update has a new signatureOperation FileSharesOperations.create has a new signatureOperation FileSharesOperations.get has a new signatureOperation FileSharesOperations.list has a new signatureOperation FileSharesOperations.update has a new signatureOperation FileSharesOperations.create has a new signature9.0.0 (2020-03-27)FeaturesModel BlobContainer has a new parameter default_encryption_scopeModel BlobContainer has a new parameter deny_encryption_scope_overrideModel ListContainerItem has a new parameter default_encryption_scopeModel ListContainerItem has a new parameter deny_encryption_scope_overrideModel KeyVaultProperties has a new parameter last_key_rotation_timestampModel KeyVaultProperties has a new parameter current_versioned_key_identifierBreaking changesOperation BlobContainersOperations.update has a new signatureOperation BlobContainersOperations.create has a new signatureOperation BlobContainersOperations.update has a new signatureOperation BlobContainersOperations.create has a new signature8.0.0 (2020-02-27)FeaturesModel ImmutabilityPolicyProperties has a new parameter allow_protected_append_writesModel BlobServiceProperties has a new parameter container_delete_retention_policyModel BlobServiceProperties has a new parameter is_versioning_enabledModel ImmutabilityPolicy has a new parameter allow_protected_append_writesAdded operation group EncryptionScopesOperationsBreaking changesOperation BlobContainersOperations.create_or_update_immutability_policy has a new signatureOperation BlobContainersOperations.extend_immutability_policy has a new signatureOperation BlobContainersOperations.create_or_update_immutability_policy has a new signature7.2.0 (2020-02-10)FeaturesModel BlobServiceProperties has a new parameter restore_policyModel StorageAccount has a new parameter blob_restore_statusAdded operation StorageAccountsOperations.restore_blob_ranges7.1.0 (2020-01-09)FeaturesModel EncryptionService has a new parameter key_type7.0.0 (2019-12-04)FeaturesModel StorageAccountCreateParameters has a new parameter
routing_preferenceModel BlobServiceProperties has a new parameter skuModel FileServiceProperties has a new parameter
share_delete_retention_policyModel FileServiceProperties has a new parameter skuModel StorageAccount has a new parameter routing_preferenceModel StorageAccountUpdateParameters has a new parameter
routing_preferenceModel Endpoints has a new parameter internet_endpointsModel Endpoints has a new parameter microsoft_endpointsBreaking changesOperation FileServicesOperations.set_service_properties has a new
signatureModel Sku has a new signature6.0.0 (2019-10-25)FeaturesModel StorageAccount has a new parameter
private_endpoint_connectionsAdded operation group PrivateEndpointConnectionsOperationsAdded operation group PrivateLinkResourcesOperationsBreaking changesOperation FileSharesOperations.list has a new signatureOperation BlobContainersOperations.list has a new signature5.0.0 (2019-10-21)FeaturesModel AzureFilesIdentityBasedAuthentication has a new parameter
active_directory_propertiesBreaking changesOperation StorageAccountsOperations.list_keys has a new signature4.2.0 (2019-10-07)FeaturesModel StorageAccountCreateParameters has a new parameter
large_file_shares_stateModel StorageAccountUpdateParameters has a new parameter
large_file_shares_stateModel StorageAccount has a new parameter large_file_shares_state4.1.0 (2019-09-27)FeaturesModel BlobServiceProperties has a new parameter change_feedAdded operation BlobServicesOperations.listAdded operation group FileServicesOperationsAdded operation group FileSharesOperations4.0.0 (2019-06-12)FeaturesModel StorageAccount has a new parameter
azure_files_identity_based_authenticationModel StorageAccountCreateParameters has a new parameter
azure_files_identity_based_authenticationModel StorageAccountUpdateParameters has a new parameter
azure_files_identity_based_authenticationBreaking changesModel StorageAccount no longer has parameter
enable_azure_files_aad_integrationModel StorageAccountCreateParameters no longer has parameter
enable_azure_files_aad_integrationModel StorageAccountUpdateParameters no longer has parameter
enable_azure_files_aad_integrationBreaking changesGeneral Breaking changesThis version uses a next-generation code generator thatmightintroduce breaking changes while using imports. In summary, some modules
were incorrectly visible/importable and have been renamed. This fixed
several issues caused by usage of classes that were not supposed to be
used in the first place.StorageManagementClient cannot be imported fromazure.mgmt.storage.storage_management_clientanymore (import
fromazure.mgmt.storageworks like before)StorageManagementClientConfiguration import has been moved fromazure.mgmt.storage.network_management_clienttoazure.mgmt.storageStorageManagementClient cannot be imported fromazure.mgmt.storage.v20xx_yy_zz.network_management_clientanymore (import fromazure.mgmt.storage.v20xx_yy_zzworks like
before)StorageManagementClientConfiguration import has been moved fromazure.mgmt.storage.v20xx_yy_zz.network_management_clienttoazure.mgmt.storage.v20xx_yy_zzA modelMyClassfrom a "models" sub-module cannot be imported
anymore usingazure.mgmt.storage.v20xx_yy_zz.models.my_class(import fromazure.mgmt.storage.v20xx_yy_zz.modelsworks like
before)An operation classMyClassOperationsfrom anoperationssub-module cannot be imported anymore usingazure.mgmt.storage.v20xx_yy_zz.operations.my_class_operations(import fromazure.mgmt.storage.v20xx_yy_zz.operationsworks
like before)Last but not least, HTTP connection pooling is now enabled by default.
You should always use a client as a context manager, or call close(), or
use no more than one storage mgmt client per process.3.3.0 (2019-04-22)FeaturesModel BlobServiceProperties has a new parameter
automatic_snapshot_policy_enabledAdded operation
StorageAccountsOperations.revoke_user_delegation_keysAdded operation BlobContainerOperations.lease3.2.0 (2019-04-10)FeaturesAdded operation BlobContainersOperations.lease for API versions
2018_02_01 and later3.1.1 (2019-01-02)BugfixesFix #4013 - "use_sub_domain" should be "use_sub_domain_name"3.1.0 (2018-11-15)FeaturesModel StorageAccount has a new parameter geo_replication_statsModel StorageAccount has a new parameter failover_in_progressAdded operation StorageAccountsOperations.failoverAdded operation group BlobServicesOperationsOperation StorageAccountsOperations.get_properties now support
expand parameter3.0.0 (2018-09-27)FeaturesModel StorageAccount has a new parameter
enable_azure_files_aad_integrationModel StorageAccountCreateParameters has a new parameter
enable_azure_files_aad_integrationModel StorageAccountUpdateParameters has a new parameter
enable_azure_files_aad_integrationAdded operation group ManagementPoliciesOperations. This is
considered preview and breaking changes might happen.Breaking changes"usage" has been renamed "usages", and the "list" operation has been
replaced by "list_by_location". Ability to make usage requests
locally is not available anymore.Noteazure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based
namespace package)2.0.0 (2018-08-01)BugfixesSet the signed resource as optional instead of required2.0.0rc4 (2018-06-26)Features (2018-02-01/2018-03-01-preview)Support HDFS feature and web endpoint in Account propertiesModel StorageAccountCreateParameters has a new parameter
is_hns_enabledModel Endpoints has a new parameter webModel Endpoints has a new parameter dfsModel StorageAccount has a new parameter is_hns_enabled2.0.0rc3 (2018-05-30)FeaturesAdd preview version of management policy (API 2018-03-01-preview
only). This is considered preview and breaking changes might happen
if you opt in for that Api Version.BugfixesCorrect azure-common dependency2.0.0rc2 (2018-05-16)BugfixesFix default "models" import to 2018-02-012.0.0rc1 (2018-05-11)FeaturesAdd blob containers operations, immutability policyAdd usage.list_by_locationClient now supports Azure profiles.Client class can be used as a context manager to keep the underlying
HTTP session open for performanceGeneral Breaking changesThis version uses a next-generation code generator thatmightintroduce breaking changes.Model signatures now use only keyword-argument syntax. All
positional arguments must be re-written as keyword-arguments. To
keep auto-completion in most cases, models are now generated for
Python 2 and Python 3. Python 3 uses the "*" syntax for
keyword-only arguments.Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to
improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important,
and are documented here:https://docs.python.org/3/library/enum.html#othersAt a glance:"is" should not be used at all."format" will return the string value, where "%s" string
formatting will returnNameOfEnum.stringvalue. Format syntax
should be prefered.New Long Running Operation:Return type changes frommsrestazure.azure_operation.AzureOperationPollertomsrest.polling.LROPoller. External API is the same.Return type is nowalwaysamsrest.polling.LROPoller,
regardless of the optional parameters used.The behavior has changed when usingraw=True. Instead of
returning the initial call result asClientRawResponse,
without polling, now this returns an LROPoller. After polling,
the final resource will be returned as aClientRawResponse.Newpollingparameter. The default behavior isPolling=Truewhich will poll using ARM algorithm. WhenPolling=False, the response of the initial call will be
returned without polling.pollingparameter accepts instances of subclasses ofmsrest.polling.PollingMethod.add_done_callbackwill no longer raise if called after
polling is finished, but will instead execute the callback right
away.1.5.0 (2017-12-12)FeaturesAdd StorageV2 as valid kindAdd official support for API version 2017-10-011.4.0 (2017-09-26)Bug fixesAdd skus operations group to the generic clientFeaturesAdd official support for API version 2016-01-011.3.0 (2017-09-08)FeaturesAdds list_skus operation (2017-06-01)Breaking changesRename the preview attribute "network_acls" to "network_rule_set"1.2.1 (2017-08-14)BugfixesRemove "tests" packaged by mistake (#1365)1.2.0 (2017-07-19)FeaturesApi version 2017-06-01 is now the defaultThis API version adds Network ACLs objects (2017-06-01 as preview)1.1.0 (2017-06-28)Added support for https traffic only (2016-12-01)1.0.0 (2017-05-15)Tag 1.0.0rc1 as stable (same content)1.0.0rc1 (2017-04-11)FeaturesTo help customers with sovereign clouds (not general Azure), this
version has official multi ApiVersion support for 2015-06-15 and
2016-12-010.31.0 (2017-01-19)Newlist_account_sasoperationNewlist_service_sasoperationName syntax are now checked before RestAPI call, not the server
(exception changed)Based on API version 2016-12-01.0.30.0 (2016-11-14)Initial release. Based on API version 2016-01-01 Note that this is
the same content as 0.30.0rc6, committed as 0.30.0.0.20.0 (2015-08-31)Initial preview release. Based on API version 2015-05-01-preview.