Sdílet prostřednictvím


ConsumptionExtensions.GetAggregatedCostAsync Method

Definition

Provides the aggregate cost of a management group and all child management groups by current billing period.

  • Request Path: /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost
  • Operation Id: AggregatedCost_GetByManagementGroup
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionAggregatedCostResult>> GetAggregatedCostAsync (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string filter = default, System.Threading.CancellationToken cancellationToken = default);
static member GetAggregatedCostAsync : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionAggregatedCostResult>>
<Extension()>
Public Function GetAggregatedCostAsync (managementGroupResource As ManagementGroupResource, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConsumptionAggregatedCostResult))

Parameters

managementGroupResource
ManagementGroupResource

The ManagementGroupResource instance the method will execute against.

filter
String

May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (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 (:).

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

managementGroupResource is null.

Applies to