Share via


ConsumptionExtensions.GetConsumptionUsageDetails Method

Definition

Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.

  • Request Path: /{scope}/providers/Microsoft.Consumption/usageDetails
  • Operation Id: UsageDetails_List
public static Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionUsageDetail> GetConsumptionUsageDetails (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string expand = default, string filter = default, string skipToken = default, int? top = default, Azure.ResourceManager.Consumption.Models.ConsumptionMetricType? metric = default, System.Threading.CancellationToken cancellationToken = default);
static member GetConsumptionUsageDetails : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * string * string * Nullable<int> * Nullable<Azure.ResourceManager.Consumption.Models.ConsumptionMetricType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Consumption.Models.ConsumptionUsageDetail>
<Extension()>
Public Function GetConsumptionUsageDetails (client As ArmClient, scope As ResourceIdentifier, Optional expand As String = Nothing, Optional filter As String = Nothing, Optional skipToken As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional metric As Nullable(Of ConsumptionMetricType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of ConsumptionUsageDetail)

Parameters

client
ArmClient

The ArmClient instance the method will execute against.

scope
ResourceIdentifier

The scope that the resource will apply against.

expand
String

May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.

filter
String

May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. 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 (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.

skipToken
String

Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.

top
Nullable<Int32>

May be used to limit the number of results to the most recent N usageDetails.

metric
Nullable<ConsumptionMetricType>

Allows to select different type of cost/usage records.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

client is null.

Applies to