简体   繁体   中英

Azure Data Transfer API in Python

Is there any way I can get the Data transfer charges using Azure Python SDK ?

I'm using this link to fetch my bill details, but I can't find the data transfer charges in this API

Am I going the wrong way? Or is there any other Azure Python API which gives the data transfer charges?

If you want to get the Data transfer charges with Azure Consumption Rest API, you can use REST API List Usage Details . For more details, please refer to here在此处输入图像描述

Regarding how to call the APi with python sdk, please refer to the following code

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')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM