IAzureUtilizationCollection.QueryAsync 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.
Asynchronously retrieves utilization records for the Azure subscription.
public System.Threading.Tasks.Task<Microsoft.Store.PartnerCenter.Models.ResourceCollection<Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationRecord>> QueryAsync (DateTimeOffset startTime, DateTimeOffset endTime, Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationGranularity granularity = Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationGranularity.Daily, bool showDetails = true, int? size = default);
abstract member QueryAsync : DateTimeOffset * DateTimeOffset * Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationGranularity * bool * Nullable<int> -> System.Threading.Tasks.Task<Microsoft.Store.PartnerCenter.Models.ResourceCollection<Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationRecord>>
Public Function QueryAsync (startTime As DateTimeOffset, endTime As DateTimeOffset, Optional granularity As AzureUtilizationGranularity = Microsoft.Store.PartnerCenter.Models.Utilizations.AzureUtilizationGranularity.Daily, Optional showDetails As Boolean = true, Optional size As Nullable(Of Integer) = Nothing) As Task(Of ResourceCollection(Of AzureUtilizationRecord))
Parameters
- startTime
- DateTimeOffset
The starting time of when the utilization was metered in the billing system.
- endTime
- DateTimeOffset
The ending time of when the utilization was metered in the billing system.
- granularity
- AzureUtilizationGranularity
The resource usage time granularity. Can either be daily or hourly. Default is daily.
- showDetails
- Boolean
If set to true, the utilization records will be split by the resource instance levels. If set to false, the utilization records will be aggregated on the resource level. Default is true.
An optional maximum number of records to return. The returned resource collection will specify a next link in case there were more utilization records available.
Returns
A task that returns the Azure resource utilization for the subscription.