Microsoft Azure Storage Management Client Library for Python
项目描述
Microsoft Azure SDK for Python
这是Microsoft Azure Storage Management Client Library。此包已在Python 3.8+上进行了测试。有关Azure库的更完整视图,请参阅azure sdk python release。
免责声明
Azure SDK Python包对Python 2.7的支持已于2022年1月1日结束。有关更多信息和建议,请参阅https://github.com/Azure/azure-sdk-for-python/issues/20691
入门
先决条件
- 要使用此包,需要Python 3.8+。
- Azure订阅
安装软件包
pip install azure-mgmt-storage
pip install azure-identity
身份验证
默认情况下,Azure Active Directory令牌身份验证依赖于以下环境变量的正确配置。
AZURE_CLIENT_ID
用于 Azure 客户端 ID。AZURE_TENANT_ID
用于 Azure 租户 ID。AZURE_CLIENT_SECRET
用于 Azure 客户端密钥。
此外,可以通过环境变量 AZURE_SUBSCRIPTION_ID
配置 Azure 订阅 ID。
以上配置完成后,客户端可以通过以下代码进行身份验证
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = StorageManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
示例
此软件包的代码示例可在以下位置找到
故障排除
下一步
提供反馈
如果您遇到任何错误或有一些建议,请在项目的 问题 部分提交问题。
发布历史
21.2.1 (2024-06-27)
已修复的错误
- 修复了 Operation StorageTaskAssignmentInstancesReportOperations.list 中
maxpagesize
的签名类型,从 str 更改为 int - 修复了 Operation StorageTaskAssignmentsInstancesReportOperations.list 中
maxpagesize
的签名类型,从 str 更改为 int - 修复了 Operation StorageTaskAssignmentsOperations.list 中
maxpagesize
的签名类型,从 str 更改为 int
21.2.0 (2024-06-17)
新增功能
- 添加了操作组 NetworkSecurityPerimeterConfigurationsOperations
- 添加了操作组 StorageTaskAssignmentInstancesReportOperations
- 添加了操作组 StorageTaskAssignmentsInstancesReportOperations
- 添加了操作组 StorageTaskAssignmentsOperations
- 模型 LocalUser 新增参数 allow_acl_authorization
- 模型 LocalUser 新增参数 extended_groups
- 模型 LocalUser 新增参数 group_id
- 模型 LocalUser 新增参数 is_nf_sv3_enabled
- 模型 LocalUser 新增参数 user_id
- 模型 LocalUsers 新增参数 next_link
- 模型 StorageAccount 新增参数 enable_extended_groups
- 模型 StorageAccountCreateParameters 新增参数 enable_extended_groups
- 模型 StorageAccountUpdateParameters 新增参数 enable_extended_groups
- 操作 LocalUsersOperations.list 新增可选参数 filter
- 操作 LocalUsersOperations.list 新增可选参数 include
- 操作 LocalUsersOperations.list 新增可选参数 maxpagesize
21.1.0 (2023-08-18)
新增功能
- 添加了操作 StorageAccountsOperations.begin_customer_initiated_migration
- 添加了操作 StorageAccountsOperations.get_customer_initiated_migration
- 模型 BlobInventoryPolicyFilter 新增参数 creation_time
- 模型 GeoReplicationStats 新增参数 can_planned_failover
- 模型 GeoReplicationStats 新增参数 post_failover_redundancy
- 模型 GeoReplicationStats 新增参数 post_planned_failover_redundancy
- 模型 StorageAccount 新增参数 account_migration_in_progress
- 模型 StorageAccount 新增参数 is_sku_conversion_blocked
21.1.0b1 (2023-02-20)
其他更改
- 在 github 仓库中添加了生成的示例
- 停止对 python<3.7.0 的支持
21.0.0 (2022-11-15)
新增功能
- 模型 ManagementPolicyBaseBlob 新增参数 tier_to_cold
- 模型 ManagementPolicyBaseBlob 新增参数 tier_to_hot
- 模型 ManagementPolicySnapShot 新增参数 tier_to_cold
- 模型 ManagementPolicySnapShot 新增参数 tier_to_hot
- 模型 ManagementPolicyVersion 新增参数 tier_to_cold
- 模型 ManagementPolicyVersion 新增参数 tier_to_hot
重大变更
- 操作 EncryptionScopesOperations.list 新增参数 filter
- 操作 EncryptionScopesOperations.list 新增参数 include
- 操作 EncryptionScopesOperations.list 新增参数 maxpagesize
- 操作 StorageAccountsOperations.begin_failover 新增参数 failover_type
20.1.0 (2022-08-09)
功能
- 添加了模型 AllowedMethods
- 添加了模型 LeaseContainerRequestEnum
20.0.0 (2022-04-06)
功能
- 模型 BlobInventoryPolicyFilter 新增参数 exclude_prefix
- 模型 BlobInventoryPolicyFilter 新增参数 include_deleted
- 模型 BlobInventoryPolicySchema 新增参数 destination
- 模型 DateAfterCreation 新增参数 days_after_last_tier_change_greater_than
- 模型 DateAfterModification 新增参数 days_after_creation_greater_than
- 模型 DateAfterModification 新增参数 days_after_last_tier_change_greater_than
- Model DeleteRetentionPolicy 新增参数 allow_permanent_delete
- Model KeyVaultProperties 新增参数 current_versioned_key_expiration_timestamp
- Model StorageAccount 新增参数 dns_endpoint_type
- Model StorageAccount 新增参数 storage_account_sku_conversion_status
- Model StorageAccountCreateParameters 新增参数 dns_endpoint_type
- Model StorageAccountUpdateParameters 新增参数 dns_endpoint_type
- Model Table 新增参数 signed_identifiers
重大变更
- 操作 TableOperations.create 新增签名
- 操作 TableOperations.update 新增签名
19.1.0 (2022-02-15)
功能
- 新增操作组 LocalUsersOperations
- Model ActiveDirectoryProperties 新增参数 account_type
- Model ActiveDirectoryProperties 新增参数 sam_account_name
- Model EncryptionIdentity 新增参数 encryption_federated_identity_client_id
- Model StorageAccount 新增参数 allowed_copy_scope
- Model StorageAccount 新增参数 is_local_user_enabled
- Model StorageAccount 新增参数 is_sftp_enabled
- Model StorageAccountCreateParameters 新增参数 allowed_copy_scope
- Model StorageAccountCreateParameters 新增参数 is_local_user_enabled
- Model StorageAccountCreateParameters 新增参数 is_sftp_enabled
- Model StorageAccountUpdateParameters 新增参数 allowed_copy_scope
- Model StorageAccountUpdateParameters 新增参数 is_local_user_enabled
- Model StorageAccountUpdateParameters 新增参数 is_sftp_enabled
19.0.0 (2021-09-14)
功能
- Model BlobContainer 新增参数 enable_nfs_v3_root_squash
- Model BlobContainer 新增参数 enable_nfs_v3_all_squash
- Model UpdateHistoryProperty 新增参数 allow_protected_append_writes
- Model UpdateHistoryProperty 新增参数 allow_protected_append_writes_all
- Model StorageAccountUpdateParameters 新增参数 default_to_o_auth_authentication
- Model StorageAccountUpdateParameters 新增参数 public_network_access
- Model StorageAccountUpdateParameters 新增参数 immutable_storage_with_versioning
- Model ImmutabilityPolicy 新增参数 allow_protected_append_writes_all
- Model StorageAccountCreateParameters 新增参数 default_to_o_auth_authentication
- Model StorageAccountCreateParameters 新增参数 public_network_access
- Model StorageAccountCreateParameters 新增参数 immutable_storage_with_versioning
- Model ListContainerItem 新增参数 enable_nfs_v3_root_squash
- Model ListContainerItem 新增参数 enable_nfs_v3_all_squash
- Model LegalHoldProperties 新增参数 protected_append_writes_history
- Model ImmutabilityPolicyProperties 新增参数 allow_protected_append_writes_all
- Model StorageAccount 新增参数 default_to_o_auth_authentication
- Model StorageAccount 新增参数 public_network_access
- Model StorageAccount 新增参数 immutable_storage_with_versioning
- Model LegalHold 新增参数 allow_protected_append_writes_all
- 新增操作 StorageAccountsOperations.begin_abort_hierarchical_namespace_migration
- 新增操作 StorageAccountsOperations.begin_hierarchical_namespace_migration
重大变更
- Model AccessPolicy 新增签名
18.0.0 (2021-05-13)
功能
- Model StorageAccountUpdateParameters 新增参数 allow_cross_tenant_replication
- Model BlobContainer 新增参数 immutable_storage_with_versioning
- Model FileShareItem 新增参数 lease_state
- Model FileShareItem 新增参数 lease_duration
- Model FileShareItem 新增参数 lease_status
- Model FileShareItem 新增参数 signed_identifiers
- Model FileShare 新增参数 lease_state
- Model FileShare 新增参数 lease_duration
- Model FileShare 新增参数 lease_status
- Model FileShare 新增参数 signed_identifiers
- Model StorageAccountCreateParameters 新增参数 allow_cross_tenant_replication
- Model AzureFilesIdentityBasedAuthentication 新增参数 default_share_permission
- Model StorageAccount 新增参数 allow_cross_tenant_replication
- Model ListContainerItem 新增参数 immutable_storage_with_versioning
- 新增操作 BlobContainersOperations.begin_object_level_worm
- 新增操作 FileSharesOperations.lease
重大变更
- 操作 FileSharesOperations.delete 新增签名
- Model BlobInventoryPolicySchema 不再包含参数 destination
- Model BlobInventoryPolicyRule 新增必填参数 destination
- Model BlobInventoryPolicyDefinition 新增签名
17.1.0 (2021-04-13)
功能
- 模型 StorageAccountKey 添加了新参数 creation_time。
- 模型 StorageAccountUpdateParameters 添加了新参数 sas_policy。
- 模型 StorageAccountUpdateParameters 添加了新参数 key_policy。
- 模型 StorageAccountCreateParameters 添加了新参数 sas_policy。
- 模型 StorageAccountCreateParameters 添加了新参数 key_policy。
- 模型 StorageAccount 添加了新参数 sas_policy。
- 模型 StorageAccount 添加了新参数 key_policy。
- 模型 StorageAccount 添加了新参数 key_creation_time。
17.0.0 (2021-02-20)
功能
- 模型 Encryption 添加了新参数 encryption_identity。
- 模型 Identity 添加了新参数 user_assigned_identities。
- 模型 ManagementPolicyBaseBlob 添加了新参数 enable_auto_tier_to_hot_from_cool。
- 模型 EncryptionScope 添加了新参数 require_infrastructure_encryption。
- 模型 StorageAccount 添加了新参数 extended_location。
- 模型 StorageAccount 添加了新参数 allow_shared_key_access。
- 模型 StorageAccount 添加了新参数 enable_nfs_v3。
- 模型 EncryptionScopeKeyVaultProperties 添加了新参数 current_versioned_key_identifier。
- 模型 EncryptionScopeKeyVaultProperties 添加了新参数 last_key_rotation_timestamp。
- 模型 DateAfterModification 添加了新参数 days_after_last_access_time_greater_than。
- 模型 StorageAccountUpdateParameters 添加了新参数 allow_shared_key_access。
- 模型 BlobServiceProperties 添加了新参数 last_access_time_tracking_policy。
- 模型 ChangeFeed 添加了新参数 retention_in_days。
- 模型 FileShare 添加了新参数 snapshot_time。
- 模型 ManagementPolicyAction 添加了新参数 version。
- 模型 StorageAccountCreateParameters 添加了新参数 extended_location。
- 模型 StorageAccountCreateParameters 添加了新参数 allow_shared_key_access。
- 模型 StorageAccountCreateParameters 添加了新参数 enable_nfs_v3。
- 模型 FileShareItem 添加了新参数 snapshot_time。
- 模型 FileServiceProperties 添加了新参数 protocol_settings。
- 模型 ManagementPolicySnapShot 添加了新参数 tier_to_archive。
- 模型 ManagementPolicySnapShot 添加了新参数 tier_to_cool。
- 模型 NetworkRuleSet 添加了新参数 resource_access_rules。
- 添加了操作组 BlobInventoryPoliciesOperations。
- 添加了操作组 DeletedAccountsOperations。
重大变更
- 操作 FileSharesOperations.create 添加了新签名。
- 操作 FileSharesOperations.delete 新增签名
- 操作 FileSharesOperations.get 添加了新签名。
- 模型 ErrorResponse 添加了新签名。
16.0.0 (2020-09-15)
功能
- 模型 RestorePolicyProperties 添加了新参数 min_restore_time。
重大变更
- 操作 ManagementPoliciesOperations.create_or_update 添加了新签名。
- 操作 ManagementPoliciesOperations.delete 添加了新签名。
- 操作 ManagementPoliciesOperations.get 添加了新签名。
16.0.0b2 (2020-06-29)
这是 beta 预览版本。有关详细变更日志,请参阅等效稳定版本 11.1.0 (https://pypi.ac.cn/project/azure-mgmt-storage/11.1.0/)
16.0.0b1 (2020-06-17)
这是 beta 预览版本。
本版本使用下一代代码生成器,引入了重要的破坏性更改,但也引入了重要的新功能(如统一身份验证和异步编程)。
一般破坏性更改
-
凭证系统已完全重造。
azure.common.credentials
或msrestazure.azure_active_directory
实例不再受支持,请使用azure-identity
类: https://pypi.ac.cn/project/azure-identity/credentials
参数已重命名为credential
-
客户端上的
config
属性不再存在,配置应作为 kwarg 传递。示例:MyClient(credential, subscription_id, enable_logging=True)
。有关支持的完整选项集,请参阅 azure-core 初始化文档中接受的参数 -
您不能再导入
version
模块,请使用__version__
代替 -
以前返回
msrest.polling.LROPoller
的操作现在返回azure.core.polling.LROPoller
,并以begin_
前缀。 -
异常树已经被简化,大多数异常现在都是
azure.core.exceptions.HttpResponseError
(已移除CloudError
)。 -
大多数操作 kwarg 已更改。其中一些最显著的
- 已移除
raw
。可以通过使用cls
(一个回调,将提供对内部 HTTP 响应的访问,以供高级用户使用)找到等效功能。 - 有关支持的完整选项集,请参阅azure-core 请求文档中的参数接受
- 已移除
一般新功能
- 支持使用
typing
进行类型注解。SDKs 已准备好 mypy。 - 此客户端现在已稳定并官方支持异步。检查您的包中的
aio
命名空间以找到异步客户端。 - 此客户端现在原生支持像 OpenCensus 或 OpenTelemetry 这样的跟踪库。查看此跟踪快速入门以获取概述。
10.0.0 (2020-05-07)
功能
- 模型管理策略过滤器有一个新的参数 blob_index_match
- 模型文件共享项有一个新的参数 access_tier_status
- 模型文件共享项有一个新的参数 share_usage_bytes
- 模型文件共享项有一个新的参数 deleted
- 模型文件共享项有一个新的参数 deleted_time
- 模型文件共享项有一个新的参数 access_tier
- 模型文件共享项有一个新的参数 version
- 模型文件共享项有一个新的参数 root_squash
- 模型文件共享项有一个新的参数 enabled_protocols
- 模型文件共享项有一个新的参数 access_tier_change_time
- 模型文件共享项有一个新的参数 remaining_retention_days
- 模型恢复策略属性有一个新的参数 last_enabled_time
- 模型文件共享有一个新的参数 access_tier_status
- 模型文件共享有一个新的参数 share_usage_bytes
- 模型文件共享有一个新的参数 deleted
- 模型文件共享有一个新的参数 deleted_time
- 模型文件共享有一个新的参数 access_tier
- 模型文件共享有一个新的参数 version
- 模型文件共享有一个新的参数 root_squash
- 模型文件共享有一个新的参数 enabled_protocols
- 模型文件共享有一个新的参数 access_tier_change_time
- 模型文件共享有一个新的参数 remaining_retention_days
- 添加了操作 FileSharesOperations.restore
- 添加了操作 PrivateEndpointConnectionsOperations.list
- 添加了操作组 ObjectReplicationPoliciesOperations
重大变更
- 操作 FileSharesOperations.update 有一个新的签名
- 操作 FileSharesOperations.create 添加了新签名。
- 操作 FileSharesOperations.get 添加了新签名。
- 操作 FileSharesOperations.list 有一个新的签名
- 操作 FileSharesOperations.update 有一个新的签名
- 操作 FileSharesOperations.create 添加了新签名。
9.0.0 (2020-03-27)
功能
- 模型 BlobContainer 有一个新参数 default_encryption_scope
- 模型 BlobContainer 有一个新参数 deny_encryption_scope_override
- 模型 ListContainerItem 有一个新参数 default_encryption_scope
- 模型 ListContainerItem 有一个新参数 deny_encryption_scope_override
- 模型 KeyVaultProperties 有一个新参数 last_key_rotation_timestamp
- 模型 KeyVaultProperties 有一个新参数 current_versioned_key_identifier
重大变更
- 操作 BlobContainersOperations.update 有一个新的签名
- 操作 BlobContainersOperations.create 有一个新的签名
- 操作 BlobContainersOperations.update 有一个新的签名
- 操作 BlobContainersOperations.create 有一个新的签名
8.0.0 (2020-02-27)
功能
- 模型 ImmutabilityPolicyProperties 有一个新参数 allow_protected_append_writes
- 模型 BlobServiceProperties 有一个新参数 container_delete_retention_policy
- 模型 BlobServiceProperties 有一个新参数 is_versioning_enabled
- 模型 ImmutabilityPolicy 有一个新参数 allow_protected_append_writes
- 添加了操作组 EncryptionScopesOperations
重大变更
- 操作 BlobContainersOperations.create_or_update_immutability_policy 有一个新的签名
- 操作 BlobContainersOperations.extend_immutability_policy 有一个新的签名
- 操作 BlobContainersOperations.create_or_update_immutability_policy 有一个新的签名
7.2.0 (2020-02-10)
功能
- 模型 BlobServiceProperties 有一个新参数 restore_policy
- 模型 StorageAccount 有一个新参数 blob_restore_status
- 添加了操作 StorageAccountsOperations.restore_blob_ranges
7.1.0 (2020-01-09)
功能
- 模型 EncryptionService 有一个新参数 key_type
7.0.0 (2019-12-04)
功能
- 模型 StorageAccountCreateParameters 有一个新参数 routing_preference
- 模型 BlobServiceProperties 有一个新参数 sku
- 模型 FileServiceProperties 有一个新参数 share_delete_retention_policy
- 模型 FileServiceProperties 添加了新参数 sku
- 模型 StorageAccount 添加了新参数 routing_preference
- 模型 StorageAccountUpdateParameters 添加了新参数 routing_preference
- 模型 Endpoints 添加了新参数 internet_endpoints
- 模型 Endpoints 添加了新参数 microsoft_endpoints
重大变更
- 操作 FileServicesOperations.set_service_properties 添加了新签名
- 模型 Sku 添加了新签名
6.0.0 (2019-10-25)
功能
- 模型 StorageAccount 添加了新参数 private_endpoint_connections
- 添加了操作组 PrivateEndpointConnectionsOperations
- 添加了操作组 PrivateLinkResourcesOperations
重大变更
- 操作 FileSharesOperations.list 有一个新的签名
- 操作 BlobContainersOperations.list 添加了新签名
5.0.0 (2019-10-21)
功能
- 模型 AzureFilesIdentityBasedAuthentication 添加了新参数 active_directory_properties
重大变更
- 操作 StorageAccountsOperations.list_keys 添加了新签名
4.2.0 (2019-10-07)
功能
- 模型 StorageAccountCreateParameters 添加了新参数 large_file_shares_state
- 模型 StorageAccountUpdateParameters 添加了新参数 large_file_shares_state
- 模型 StorageAccount 添加了新参数 large_file_shares_state
4.1.0 (2019-09-27)
功能
- 模型 BlobServiceProperties 添加了新参数 change_feed
- 添加了操作 BlobServicesOperations.list
- 添加了操作组 FileServicesOperations
- 添加了操作组 FileSharesOperations
4.0.0 (2019-06-12)
功能
- 模型 StorageAccount 添加了新参数 azure_files_identity_based_authentication
- 模型 StorageAccountCreateParameters 添加了新参数 azure_files_identity_based_authentication
- 模型 StorageAccountUpdateParameters 添加了新参数 azure_files_identity_based_authentication
重大变更
- 模型 StorageAccount 不再包含参数 enable_azure_files_aad_integration
- 模型 StorageAccountCreateParameters 不再包含参数 enable_azure_files_aad_integration
- 模型 StorageAccountUpdateParameters 不再包含参数 enable_azure_files_aad_integration
重大变更
一般性重大更改
本版本使用新一代代码生成器,在使用导入时可能会引入重大更改。简而言之,一些模块的可见性/导入方式不正确,并且已被重命名。这解决了由于使用本来不应该使用的类而引起的一些问题。
- 无法从
azure.mgmt.storage.storage_management_client
导入 StorageManagementClient(从azure.mgmt.storage
导入与之前相同) - StorageManagementClientConfiguration 的导入已从
azure.mgmt.storage.network_management_client
移动到azure.mgmt.storage
- 无法从
azure.mgmt.storage.v20xx_yy_zz.network_management_client
导入 StorageManagementClient(从azure.mgmt.storage.v20xx_yy_zz
导入与之前相同) - StorageManagementClientConfiguration 的导入已从
azure.mgmt.storage.v20xx_yy_zz.network_management_client
移动到azure.mgmt.storage.v20xx_yy_zz
- 无法使用
azure.mgmt.storage.v20xx_yy_zz.models.my_class
从 "models" 子模块导入模型MyClass
(从azure.mgmt.storage.v20xx_yy_zz.models
导入与之前相同) - 无法使用
azure.mgmt.storage.v20xx_yy_zz.operations.my_class_operations
从operations
子模块导入操作类MyClassOperations
(从azure.mgmt.storage.v20xx_yy_zz.operations
导入与之前相同)
最后但同样重要的是,HTTP 连接池现在默认启用。您应始终将客户端用作上下文管理器,或调用 close(),或每个进程不超过一个存储管理客户端。
3.3.0 (2019-04-22)
功能
- 模型 BlobServiceProperties 添加了新参数 automatic_snapshot_policy_enabled
- 添加了操作 StorageAccountsOperations.revoke_user_delegation_keys
- 添加了操作 BlobContainerOperations.lease
3.2.0 (2019-04-10)
功能
- 添加了操作 BlobContainersOperations.lease,适用于 API 版本 2018_02_01 及更高版本
3.1.1 (2019-01-02)
错误修复
- 修复 #4013 - "use_sub_domain" 应该是 "use_sub_domain_name"
3.1.0 (2018-11-15)
功能
- 模型 StorageAccount 添加了新参数 geo_replication_stats
- 模型 StorageAccount 添加了新参数 failover_in_progress
- 添加了操作 StorageAccountsOperations.failover
- 添加了操作组 BlobServicesOperations
- 操作 StorageAccountsOperations.get_properties 现在支持 expand 参数
3.0.0 (2018-09-27)
功能
- 模型 StorageAccount 添加了新参数 enable_azure_files_aad_integration
- 模型 StorageAccountCreateParameters 添加了新参数 enable_azure_files_aad_integration
- 模型 StorageAccountUpdateParameters 添加了新参数 enable_azure_files_aad_integration
- 添加了操作组 ManagementPoliciesOperations。这被视为预览版,可能会发生重大更改。
重大变更
- "usage" 已更名为 "usages","list" 操作已被 "list_by_location" 替换。本地发起使用请求的功能不再可用。
注意
- 在 Python 3 上(基于 PEP420 的命名空间包),不再安装 azure-mgmt-nspkg。
2.0.0 (2018-08-01)
错误修复
- 将已签名的资源设置为可选,而不是必需。
2.0.0rc4 (2018-06-26)
功能(2018-02-01/2018-03-01-preview)
支持在账户属性中支持 HDFS 功能和 Web 终端。
- Model StorageAccountCreateParameters 有一个新参数 is_hns_enabled。
- Model Endpoints 有一个新参数 web。
- Model Endpoints 有一个新参数 dfs。
- Model StorageAccount 有一个新参数 is_hns_enabled。
2.0.0rc3 (2018-05-30)
功能
- 添加管理策略的预览版本(仅 API 2018-03-01-preview)。这被视为预览版本,如果您选择该 API 版本,可能会发生破坏性更改。
错误修复
- 纠正 azure-common 依赖。
2.0.0rc2 (2018-05-16)
错误修复
- 修复默认 "models" 导入到 2018-02-01。
2.0.0rc1 (2018-05-11)
功能
- 添加 blob 容器操作、不可变策略。
- 添加 usage.list_by_location。
- 客户端现在支持 Azure 配置文件。
- 客户端类可以用作上下文管理器,以保持底层 HTTP 会话打开以提高性能。
一般性重大更改
此版本使用下一代代码生成器,可能会引入破坏性更改。
- 模型签名现在只使用关键字参数语法。所有位置参数必须重写为关键字参数。为了在大多数情况下保持自动完成,模型现在为 Python 2 和 Python 3 生成。Python 3 使用 "*" 语法用于关键字参数。
- 枚举类型现在使用 "str" 混合(class AzureEnum(str, Enum))来改进遇到未识别的枚举值时的行为。虽然这不是一个破坏性更改,但这些区别很重要,并在此处进行记录:https://docs.pythonlang.cn/3/library/enum.html#others 快速浏览
- 不应该使用 "is"。
- "format" 将返回字符串值,其中 "%s" 字符串格式化将返回
NameOfEnum.stringvalue
。应首选格式化语法。
- 新的长时间运行的操作
- 返回类型从
msrestazure.azure_operation.AzureOperationPoller
更改为msrest.polling.LROPoller
。外部 API 保持不变。 - 返回类型现在始终是
msrest.polling.LROPoller
,无论使用哪些可选参数。 - 当使用
raw=True
时,行为已改变。现在返回 LROPoller,而不是返回不轮询的初始调用结果作为ClientRawResponse
。轮询后,最终资源将作为ClientRawResponse
返回。 - 新的
polling
参数。默认行为是Polling=True
,将使用 ARM 算法进行轮询。当Polling=False
时,将返回初始调用的响应,而不进行轮询。 polling
参数接受msrest.polling.PollingMethod
子类的实例。- 当轮询完成后调用
add_done_callback
时,将不会引发异常,而是立即执行回调。
- 返回类型从
1.5.0 (2017-12-12)
功能
- 添加 StorageV2 作为有效类型。
- 添加对 API 版本 2017-10-01 的官方支持。
1.4.0 (2017-09-26)
错误修复
- 将 SKU 操作组添加到通用客户端。
功能
- 添加对 API 版本 2016-01-01 的官方支持。
1.3.0 (2017-09-08)
功能
- 添加 list_skus 操作(2017-06-01)。
重大变更
- 将预览属性 "network_acls" 重命名为 "network_rule_set"。
1.2.1 (2017-08-14)
错误修复
- 错误地删除了 "tests" 包(#1365)。
1.2.0 (2017-07-19)
功能
- API 版本 2017-06-01 现在是默认版本。
- 此 API 版本添加了网络 ACLs 对象(2017-06-01 为预览)。
1.1.0 (2017-06-28)
- 仅添加对 https 流量的支持(2016-12-01)。
1.0.0 (2017-05-15)
- 将标签 1.0.0rc1 标记为稳定(相同内容)。
1.0.0rc1 (2017-04-11)
功能
为了帮助客户使用主权云(不是一般的 Azure),此版本对 2015-06-15 和 2016-12-01 提供了官方的多 APIVersion 支持。
0.31.0 (2017-01-19)
- 新的
list_account_sas
操作。 - 新的
list_service_sas
操作。 - 名称语法现在在调用RestAPI之前进行校验,而不是服务器(异常已更改)
基于API版本2016-12-01。
0.30.0 (2016-11-14)
- 初始发布。基于API版本2016-01-01 注意,这与0.30.0rc6的内容相同,作为0.30.0提交。
0.20.0 (2015-08-31)
- 初始预览发布。基于API版本2015-05-01-preview。
项目详情
azure-mgmt-storage-21.2.1.tar.gz的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 503a7ff9c31254092b0656445f5728bfdfda2d09d46a82e97019eaa9a1ecec64 |
|
MD5 | f13ee0ffecc5ff5757b7343421f7fcbf |
|
BLAKE2b-256 | b99b0542c8081fe6ff808b04986892861e88775c3900c391657f796d69643f13 |