ConsumptionExtensions.GetConsumptionUsageDetailsAsync 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 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.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionUsageDetail> GetConsumptionUsageDetailsAsync (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 GetConsumptionUsageDetailsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * string * string * Nullable<int> * Nullable<Azure.ResourceManager.Consumption.Models.ConsumptionMetricType> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionUsageDetail>
<Extension()>
Public Function GetConsumptionUsageDetailsAsync (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 AsyncPageable(Of ConsumptionUsageDetail)
Parameters
- 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.
- 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
Azure SDK for .NET