ChargesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:charges> attribute.
- Inheritance
-
builtins.objectChargesOperations
Constructor
ChargesOperations(*args, **kwargs)
Methods
list |
Lists the charges based for the defined scope. |
list
Lists the charges based for the defined scope.
list(scope: str, start_date: str | None = None, end_date: str | None = None, filter: str | None = None, apply: str | None = None, **kwargs: Any) -> ChargesListResult
Parameters
Name | Description |
---|---|
scope
Required
|
The scope associated with charges operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. |
start_date
Required
|
Start date. Default value is None. |
end_date
Required
|
End date. Default value is None. |
filter
Required
|
May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). Default value is None. |
apply
Required
|
May be used to group charges for billingAccount scope by properties/billingProfileId, properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by properties/invoiceSectionId. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
ChargesListResult, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.consumption.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\consumption\\models\\__init__.py'>
Azure SDK for Python