Share via


AutoscaleSettingResource.GetPredictiveMetricAsync Method

Definition

get predictive autoscale metric future data

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics
  • Operation Id: PredictiveMetric_Get
  • Default Api Version: 2022-10-01
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Monitor.Models.AutoscaleSettingPredicativeResult>> GetPredictiveMetricAsync (string timespan, TimeSpan interval, string metricNamespace, string metricName, string aggregation, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPredictiveMetricAsync : string * TimeSpan * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Monitor.Models.AutoscaleSettingPredicativeResult>>
override this.GetPredictiveMetricAsync : string * TimeSpan * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Monitor.Models.AutoscaleSettingPredicativeResult>>
Public Overridable Function GetPredictiveMetricAsync (timespan As String, interval As TimeSpan, metricNamespace As String, metricName As String, aggregation As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AutoscaleSettingPredicativeResult))

Parameters

timespan
String

The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

interval
TimeSpan

The interval (i.e. timegrain) of the query.

metricNamespace
String

Metric namespace to query metric definitions for.

metricName
String

The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be 'Metric%2Name1'.

aggregation
String

The list of aggregation types (comma separated) to retrieve.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

timespan, metricNamespace, metricName or aggregation is null.

Applies to