MockableConsumptionArmClient.GetConsumptionCharges Method

Definition

Lists the charges based for the defined scope.

  • Request Path: /{scope}/providers/Microsoft.Consumption/charges
  • Operation Id: Charges_List
public virtual Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionChargeSummary> GetConsumptionCharges (Azure.Core.ResourceIdentifier scope, string startDate = default, string endDate = default, string filter = default, string apply = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConsumptionCharges : Azure.Core.ResourceIdentifier * string * string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionChargeSummary>
override this.GetConsumptionCharges : Azure.Core.ResourceIdentifier * string * string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionChargeSummary>
Public Overridable Function GetConsumptionCharges (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

A collection of ConsumptionChargeSummary that may take multiple service requests to iterate over.

Exceptions

scope is null.

Applies to