CostManagementExtensions.UsageForecastAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
Azure SDK for .NET