CostManagementExtensions.UsageForecast Method

Definition

Lists the forecast charges for scope defined.

  • Request Path: /{scope}/providers/Microsoft.CostManagement/forecast
  • Operation Id: Forecast_Usage
public static Azure.Response<Azure.ResourceManager.CostManagement.Models.ForecastResult> UsageForecast (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 UsageForecast : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.CostManagement.Models.ForecastDefinition * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.CostManagement.Models.ForecastResult>
<Extension()>
Public Function UsageForecast (client As ArmClient, scope As ResourceIdentifier, forecastDefinition As ForecastDefinition, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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