MockableCostManagementArmClient.UsageForecastAsync Method

Definition

Lists the forecast charges for scope defined.

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

Parameters

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

scope or forecastDefinition is null.

Applies to