次の方法で共有


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

minLength: 1
maxLength: 90

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

subscriptionId
path True

string

minLength: 1

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

aggregation
query True

string

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

api-version
query True

string

minLength: 1

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

interval
query True

string (duration)

クエリの間隔 (つまり timegrain)。

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 フロー

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントを偽装する

Get Metric for data

要求のサンプル

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

応答のサンプル

{
  "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

エラー オブジェクト。

PredictiveResponse

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

PredictiveValue

特定のバケット内の予測メトリック値を表します。

systemData

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

AutoscaleErrorResponse

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

名前 説明
error

Error

エラー オブジェクト。

systemData

systemData

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

createdByType

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

説明
Application
Key
ManagedIdentity
User

Error

エラー オブジェクト。

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

details

string

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

message

string

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

target

string

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

PredictiveResponse

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

名前 説明
data

PredictiveValue[]

コレクションの値。

interval

string (duration)

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

metricName

string

クエリ対象のメトリック

targetResourceId

string

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

timespan

string

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

PredictiveValue

特定のバケット内の予測メトリック値を表します。

名前 説明
timeStamp

string (date-time)

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

value

number (double)

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

systemData

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

名前 説明
createdAt

string (date-time)

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

createdBy

string

リソースを作成した ID。

createdByType

createdByType

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

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

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

lastModifiedByType

createdByType

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