簡體   English   中英

Azure 數據傳輸 API 在 Python

[英]Azure Data Transfer API in Python

有什么方法可以使用Azure Python SDK獲得數據傳輸費用?

我正在使用此鏈接獲取我的賬單詳細信息,但在此 API 中找不到數據傳輸費用

我走錯路了嗎? 或者是否還有其他Azure Python API提供數據傳輸費用?

If you want to get the Data transfer charges with Azure Consumption Rest API, you can use REST API List Usage Details . 更多詳情,請參考這里在此處輸入圖像描述

關於如何用 python sdk 調用 APi,請參考以下代碼

from azure.identity import ClientSecretCredential
from azure.mgmt.consumption import ConsumptionManagementClient

tenant_id=
client_id=
client_secret=
credential=ClientSecretCredential(tenant_id, client_id, client_secret)

consumption_client = ConsumptionManagementClient(
        credential=credential,
        subscription_id=SUBSCRIPTION_ID
    )

consumption_client.usage_details.list(scope='',expand='meterDetails,additionalInfo')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM