你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AutoscaleSettingResource.GetPredictiveMetricAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取预测性自动缩放指标的未来数据
- 请求路径/订阅/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics
- 操作IdPredictiveMetric_Get
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))
参数
- timespan
- String
查询的时间跨度。 它是格式为“startDateTime_ISO/endDateTime_ISO”的字符串。
- interval
- TimeSpan
间隔 (即查询的 timegrain) 。
- metricNamespace
- String
要查询其指标定义的指标命名空间。
- metricName
- String
要检索的指标名称 (逗号分隔) 。 特殊情况:如果指标名称本身包含逗号,则使用 %2 来指示它。 例如:“Metric,Name1”应为“Metric%2Name1”。
- aggregation
- String
要检索的聚合类型列表 (逗号分隔) 。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
timespan
、metricNamespace
、metricName
或 aggregation
为 null。