次の方法で共有


Predictive Metric - Get

予測自動スケーリング メトリックの将来のデータを取得する

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics?timespan={timespan}&interval={interval}&metricNamespace={metricNamespace}&metricName={metricName}&aggregation={aggregation}&api-version=2022-10-01

URI パラメーター

名前 / 必須 説明
autoscaleSettingName
path True

string

自動スケーリング設定の名前。

resourceGroupName
path True

string

リソース グループの名前。 名前の大文字と小文字は区別されます。

subscriptionId
path True

string

ターゲット サブスクリプションの ID。

aggregation
query True

string

取得する集計の種類 (コンマ区切り) の一覧。

api-version
query True

string

この操作に使用する API バージョン。

interval
query True

string

duration

クエリの間隔 (つまり、タイムグレイン)。

metricName
query True

string

取得するメトリックの名前 (コンマ区切り)。 特殊なケース: メトリック名自体にコンマが含まれる場合は、%2 を使用して指定します。 例: 'Metric,Name1' は 'Metric%2Name1' である必要があります

metricNamespace
query True

string

メトリック定義のクエリを実行するメトリック名前空間。

timespan
query True

string

クエリの期間。 "startDateTime_ISO/endDateTime_ISO" という形式の文字列です。

応答

名前 説明
200 OK

PredictiveResponse

メトリック値の一覧を取得する要求が成功しました。

Other Status Codes

AutoscaleErrorResponse

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

Get Metric for data

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myRG/providers/Microsoft.Insights/autoscalesettings/vmss1-Autoscale-775/predictiveMetrics?timespan=2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z&interval=PT1H&metricNamespace=Microsoft.Compute/virtualMachineScaleSets&metricName=PercentageCPU&aggregation=Total&api-version=2022-10-01

Sample Response

{
  "timespan": "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z",
  "interval": "PT1H",
  "metricName": "PercentageCPU",
  "targetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1",
  "data": [
    {
      "timeStamp": "2021-10-14T22:00:00Z",
      "value": 123
    },
    {
      "timeStamp": "2021-10-14T22:02:00Z",
      "value": 120
    },
    {
      "timeStamp": "2021-10-14T22:02:00Z",
      "value": 88
    },
    {
      "timeStamp": "2021-10-14T22:03:00Z",
      "value": 100
    }
  ]
}

定義

名前 説明
AutoscaleErrorResponse

エラー応答の形式について説明します。

createdByType

リソースを作成した ID の種類。

Error

error オブジェクト。

PredictiveResponse

メトリック クエリへの応答。

PredictiveValue

指定されたバケット内の予測メトリック値を表します。

systemData

リソースの作成と最後の変更に関連するメタデータ。

AutoscaleErrorResponse

エラー応答の形式について説明します。

名前 説明
error

Error

error オブジェクト。

systemData

systemData

応答に関連するシステム メタデータ。

createdByType

リソースを作成した ID の種類。

名前 説明
Application

string

Key

string

ManagedIdentity

string

User

string

Error

error オブジェクト。

名前 説明
code

string

サーバー定義のエラー コードのセットの 1 つ。

details

string

エラーの詳細を人間が判読できる表現。

message

string

エラーの人間が判読できる表現。

target

string

特定のエラーのターゲット。

PredictiveResponse

メトリック クエリへの応答。

名前 説明
data

PredictiveValue[]

コレクションの値。

interval

string

メトリック データが返された間隔 (ウィンドウ サイズ)。 これは将来調整され、最初に要求されたものから返される可能性があります。 これは、メタデータ要求が行われた場合には存在しません。

metricName

string

クエリ対象のメトリック

targetResourceId

string

予測メトリックのリソース。

timespan

string

データが取得された期間。 その値は、'/' で区切られた 2 つの datetime で構成されます。 これは将来調整され、最初に要求されたものから返される可能性があります。

PredictiveValue

指定されたバケット内の予測メトリック値を表します。

名前 説明
timeStamp

string

ISO 8601 形式のメトリック値のタイムスタンプ。

value

number

このタイム バケットの予測値。

systemData

リソースの作成と最後の変更に関連するメタデータ。

名前 説明
createdAt

string

リソース作成のタイムスタンプ (UTC)。

createdBy

string

リソースを作成した ID。

createdByType

createdByType

リソースを作成した ID の種類。

lastModifiedAt

string

リソースの最終変更のタイムスタンプ (UTC)

lastModifiedBy

string

リソースを最後に変更した ID。

lastModifiedByType

createdByType

リソースを最後に変更した ID の種類。