Applies to: Partner Center | Partner Center for Microsoft Cloud for US Government
You can use the PartnerUsageSummary resource to get a partner usage summary of all customers that purchased a specific Azure service or resource during the current billing period.
The total returned by this API will not return consumption for customers that have an Azure plan. Planned for deprecation in the future.
Prerequisites
Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
C#
To get a usage summary for all customers that purchased a specific Azure service or resource during the current billing period:
Use your IAggregatePartner.
Call the UsageSummary property, followed by the Get() or GetAsync() methods:
If successful, this method returns a PartnerUsageSummary resource in the response body.
Response success and error codes
Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, the error type, and additional parameters. For a full list, see Error Codes.
Możesz użyć zasobu SubscriptionUsageSummary, aby uzyskać podsumowanie użycia subskrypcji określonej usługi lub zasobu platformy Azure w bieżącym okresie rozliczeniowym.
Dowiedz się, jak partnerzy programu CSP mogą używać interfejsów API Centrum partnerskiego do wyświetlania wydatków i użycia platformy Azure dla partnerów i klientów oraz zarządzania nimi w odniesieniu do ich budżetu.
Możesz użyć kolekcji zasobów CustomerMonthlyUsageRecord, aby uzyskać rekordy użycia dla wszystkich klientów, którzy kupili określoną usługę lub zasób platformy Azure.
Możesz użyć kolekcji zasobów SubscriptionMonthlyUsageRecord, aby uzyskać rekordy użycia subskrypcji dla klienta określonej usługi platformy Azure lub zasobu w bieżącym okresie rozliczeniowym.
Za pomocą zasobu ResourceUsageRecord można uzyskać rekordy użycia zasobów klienta dla określonych usług lub zasobów platformy Azure w bieżącym okresie rozliczeniowym.