ConsumptionExtensions.GetConsumptionCharges Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Lists the charges based for the defined scope.
- Request Path: /{scope}/providers/Microsoft.Consumption/charges
- Operation Id: Charges_List
public static Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionChargeSummary> GetConsumptionCharges (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string startDate = default, string endDate = default, string filter = default, string apply = default, System.Threading.CancellationToken cancellationToken = default);
static member GetConsumptionCharges : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionChargeSummary>
<Extension()>
Public Function GetConsumptionCharges (client As ArmClient, scope As ResourceIdentifier, Optional startDate As String = Nothing, Optional endDate As String = Nothing, Optional filter As String = Nothing, Optional apply As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of ConsumptionChargeSummary)
Parameters
- scope
- ResourceIdentifier
The scope that the resource will apply against.
- startDate
- String
Start date.
- endDate
- String
End date.
- filter
- String
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 (:).
- apply
- String
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.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
client
is null.
Applies to
Azure SDK for .NET