在GitHub 上与我们协作 可以在 GitHub 上找到此内容的源,还可以在其中创建和查看问题和拉取请求。 有关详细信息,请参阅参与者指南。 Azure SDK for Python 反馈 Azure SDK for Python 是一个开放源代码项目。 选择一个链接以提供反馈: 提出文档问题 提供产品反馈 ...
用于Python 的 Azure SDK 由许多可在标准 Python 或conda 环境中安装的单个库组成。 标准Python 环境的库列在 包索引中。 conda 环境的包在 anaconda.org 上的Microsoft 通道中列出。Azure 包的名称以 azure-开头。 使用这些 Azure 库,可以在 Azure 服务上创建和管理资源(使用管理库(其包名称以 azure-mgmt开头)...
SDK 的管理(或“管理平面”)库,其名称全部以它开头azure-mgmt-,可帮助你从 Python 脚本创建、配置和管理 Azure 资源。 所有 Azure 服务都有相应的管理库。 有关详细信息,请参阅Azure 控制平面和数据平面。 借助管理库,可以编写配置和部署脚本,以执行可通过Azure 门户或Azure CLI执行的相同任务。 (如前文所述,...
有关详细信息和问题,请参阅 https://github.com/Azure/azure-sdk-for-python/issues/20691 入门 先决条件 使用此包需要 Python 3.7+ 。 Azure 订阅 安装包 Bash 复制 pip install azure-mgmt-appconfiguration pip install azure-identity Authentication 默认情况下, Azure Active Directory 令牌身份验证依赖于...
下面将演示如何使用Python SDK管理中国区Azure Load balancer。关于Azure负载均衡器的详细功能介绍,请参考官方文档。 Code Sample importosfromazure.common.credentialsimportServicePrincipalCredentialsfromazure.mgmt.resourceimportResourceManagementClientfromazure.mgmt.storageimportStorageManagementClientfromazure.mgmt.networkimpo...
在使用Python SDK时候,登录到China Azure (Mooncake)并访问AlertsManagement资源时候,时常遇见 EnvironmentCredential: Authentication failed 的错误消息。 Python 代码: from azure.identity import DefaultAzureCredential from azure.mgmt.alertsmanagement import AlertsManagementClient # Acquire a credential object using CLI...
使用Python SDK来获取Azure上的各种资源的Metrics的名称以及Metrics Data的示例 问题解答 通过azure-monitor-query ,可以创建一个 metrics client,调用 client.list_metric_definitions 来获取Metrics 定义,然后通过 client.query_resource 获取Metrics data。 关键函数为: ...
Python Go JavaScript dotnet PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version=2024-11-01 { "location": "westus", "properties": { "hardwareProfile": { "vmSize": "Standard_D1_v2...
$buildPath = $args[0] $packagename = $args[1] $serviceconfig = $args[2] $servicename = $args[3] $mgmtcertthumbprint = $args[4] $cert = Get-Item cert:\CurrentUser\My\$mgmtcertthumbprint $sub = $args[5] $slot = $args[6] $storage = $args[7] $package = join-path $buildPath...
要调用 API,先需要获取一个 token 来证明我们的身份,获取 token 的方法有很多种,我这里使用的是一个 Python 的 sdk。 调用API 安装依赖库 pip install adal==0.4.7 pip install azure-mgmt-datalake-analytics==0.2.0 导入必要的模块 ## AADTokenCredentials for multi-factor authenticationfrommsrestazure.azur...