共用方式為


ConsumptionExtensions.GetAggregatedCost 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 Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionAggregatedCostResult> GetAggregatedCost (this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string filter = default, System.Threading.CancellationToken cancellationToken = default);
static member GetAggregatedCost : Azure.ResourceManager.ManagementGroups.ManagementGroupResource * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionAggregatedCostResult>
<Extension()>
Public Function GetAggregatedCost (managementGroupResource As ManagementGroupResource, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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