跳转到主要内容

Microsoft Azure App Configuration Management Client Library for Python

项目描述

Microsoft Azure SDK for Python

这是Microsoft Azure App Configuration Management客户端库。此软件包已测试与Python 3.7+兼容。有关Azure库的更完整视图,请参阅azure sdk python发布

免责声明

Azure SDK Python包对Python 2.7的支持已于2022年1月1日结束。有关更多信息及疑问,请参阅https://github.com/Azure/azure-sdk-for-python/issues/20691

入门指南

先决条件

安装软件包

pip install azure-mgmt-appconfiguration
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.appconfiguration import AppConfigurationManagementClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = AppConfigurationManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

示例

此包的代码示例可在以下位置找到:

故障排除

下一步

提供反馈

如果您遇到任何错误或有建议,请在项目的 问题 部分提交问题。

Impressions

版本历史

3.0.0 (2023-03-27)

重大变更

  • 移除了操作 KeyValuesOperations.list_by_configuration_store

3.0.0b1 (2023-02-15)

重大变更

  • 移除了操作 KeyValuesOperations.list_by_configuration_store

2.2.0 (2022-08-29)

新增功能

  • 添加了操作组 ReplicasOperations

其他变更

2.1.0 (2022-06-08)

功能

  • 添加了操作 ConfigurationStoresOperations.begin_purge_deleted
  • 添加了操作 ConfigurationStoresOperations.get_deleted
  • 添加了操作 ConfigurationStoresOperations.list_deleted
  • 添加了操作 Operations.regional_check_name_availability
  • 模型 ConfigurationStore 有一个新参数 create_mode
  • 模型 ConfigurationStore 有一个新参数 enable_purge_protection
  • 模型 ConfigurationStore 有一个新参数 soft_delete_retention_in_days
  • 模型 ConfigurationStoreUpdateParameters 有一个新参数 enable_purge_protection

2.1.0b2 (2022-02-28)

功能

  • 模型 ConfigurationStoreUpdateParameters 有一个新参数 enable_purge_protection

2.1.0b1 (2022-02-16)

功能

  • 添加了操作 ConfigurationStoresOperations.begin_purge_deleted
  • 添加了操作 ConfigurationStoresOperations.get_deleted
  • 添加了操作 ConfigurationStoresOperations.list_deleted
  • 添加了操作 Operations.regional_check_name_availability
  • 模型 ConfigurationStore 有一个新参数 create_mode
  • 模型 ConfigurationStore 有一个新参数 enable_purge_protection
  • 模型 ConfigurationStore 有一个新参数 soft_delete_retention_in_days

2.0.0 (2021-06-21)

功能

  • 模型 OperationDefinition 有一个新参数 properties
  • 模型 OperationDefinition 有一个新参数 is_data_action
  • 模型 OperationDefinition 有一个新参数 origin
  • 模型 KeyValue 有一个新参数 id
  • 模型 KeyValue 有一个新参数 type
  • 模型 KeyValue 有一个新参数 name
  • 模型 ConfigurationStore 有一个新参数 system_data
  • 模型 ConfigurationStore 有一个新参数 disable_local_auth
  • 模型 ConfigurationStoreUpdateParameters 有一个新参数 disable_local_auth
  • 添加了操作组 KeyValuesOperations

重大变更

  • 模型 Resource 不再具有参数 location
  • 模型 Resource 不再具有参数 tags
  • 移除了操作 ConfigurationStoresOperations.list_key_value

1.0.1 (2020-09-18)

错误修复

  • 在 setup.py 中要求 azure-mgmt-core>=1.2.0

1.0.0 (2020-09-15)

功能

  • 模型 ConfigurationStoreUpdateParameters 有一个新参数 public_network_access

1.0.0b1 (2020-06-17)

这是测试预览版本。

此版本使用下一代代码生成器,引入了重要的重大变更,但也引入了重要的新功能(如统一身份验证和异步编程)。

一般重大变更

  • 凭证系统已被完全重新设计

  • 客户端上的 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 进行类型注解。SDK已准备好使用mypy。
  • 此客户端现在已稳定并官方支持异步操作。检查您的包中的aio命名空间以查找异步客户端。
  • 此客户端现在原生支持OpenCensus或OpenTelemetry等跟踪库。查看此跟踪快速入门以了解概述。

0.4.0 (2020-02-07)

功能

  • 模型 ConfigurationStoreUpdateParameters 新增参数 encryption
  • 模型 ConfigurationStore 新增参数 encryption
  • 添加了操作组 PrivateEndpointConnectionsOperations
  • 添加了操作组 PrivateLinkResourcesOperations

重大变更

  • 模型 ConfigurationStoreUpdateParameters 不再具有参数 properties

0.3.0 (2019-11-08)

功能

  • 模型 ConfigurationStore 新增参数 identity
  • 模型 ConfigurationStoreUpdateParameters 新增参数 identity
  • 模型 ConfigurationStoreUpdateParameters 新增参数 sku

重大变更

  • 操作 ConfigurationStoresOperations.create 具有新的签名
  • 操作 ConfigurationStoresOperations.update 具有新的签名
  • 模型 ConfigurationStore 新增必需参数 sku

0.2.0 (2019-11-04)

功能

  • 添加了操作 ConfigurationStoresOperations.list_key_value

0.1.0 (2019-06-17)

  • 首次发布

支持者