Share via


CostManagementExtensions.UsageForecastAsync Method

Definition

Lists the forecast charges for scope defined.

  • Request Path: /{scope}/providers/Microsoft.CostManagement/forecast
  • Operation Id: Forecast_Usage
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CostManagement.Models.ForecastResult>> UsageForecastAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.CostManagement.Models.ForecastDefinition forecastDefinition, string filter = default, System.Threading.CancellationToken cancellationToken = default);
static member UsageForecastAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.ForecastDefinition * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CostManagement.Models.ForecastResult>>
<Extension()>
Public Function UsageForecastAsync (client As ArmClient, scope As ResourceIdentifier, forecastDefinition As ForecastDefinition, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ForecastResult))

Parameters

client
ArmClient

The ArmClient instance the method will execute against.

scope
ResourceIdentifier

The scope that the resource will apply against.

forecastDefinition
ForecastDefinition

Parameters supplied to the CreateOrUpdate Forecast Config operation.

filter
String

May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

client or forecastDefinition is null.

Applies to