Reservation Recommendations - List
予約インスタンスを購入するための推奨事項の一覧。
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendations?$filter={$filter}&api-version=2024-08-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
resource
|
path | True |
string |
予約の推奨事項の操作に関連付けられているスコープ。 これには、サブスクリプション スコープの場合は '/subscriptions/{subscriptionId}/'、リソース グループ スコープの場合は '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'、BillingAccount スコープの場合は '/providers/Microsoft.Billing/billingAccountId}'、billingProfile スコープの場合は '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/{billingProfileId}' が含まれます。 |
api-version
|
query | True |
string |
クライアント要求で使用する API のバージョン。 現在のバージョンは 2023-03-01 です。 |
$filter
|
query |
string |
reservationRecommendations をフィルター処理するために使用できます。許可される値 ['Single'、'Shared']、既定値 'Single' を持つプロパティ/スコープ。properties/resourceType に使用できる値 ['VirtualMachines'、'SQLDatabases'、'PostgreSQL'、'ManagedDisk'、'MySQL'、'RedHat'、'MariaDB'、'RedisCache'、'CosmosDB'、'SqlDataWarehouse'、'SUSELinux'、'AppService'、'BlockBlob'、'AzureDataExplorer'、'VMwareCloudSimple']、既定値 'VirtualMachines';and properties/lookBackPeriod with allowed value ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last7Days'. |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
わかりました。 要求は成功しました。 |
|
204 No Content |
推奨事項がない場合は、空の応答が送信されます。 |
|
Other Status Codes |
操作が失敗した理由を説明するエラー応答。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントを偽装する |
例
ReservationRecommendationsByBillingAccount-Legacy
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01
応答のサンプル
{
"value": [
{
"id": "billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000",
"name": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Consumption/reservationRecommendations",
"location": "westus",
"sku": "Standard_DS1_v2",
"kind": "legacy",
"properties": {
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P1Y",
"costWithNoReservedInstances": 12.0785105,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 11.4899644807748,
"netSavings": 0.588546019225182,
"firstUsageDate": "2019-07-07T00:00:00-07:00",
"scope": "Shared",
"lookBackPeriod": "Last7Days",
"instanceFlexibilityRatio": 1,
"instanceFlexibilityGroup": "DSv2 Series",
"normalizedSize": "Standard_DS1_v2",
"recommendedQuantityNormalized": 1,
"skuProperties": [
{
"name": "Cores",
"value": "1"
},
{
"name": "Ram",
"value": "1"
}
],
"totalHours": 701,
"lastUsageDate": "2019-08-07T00:00:00-07:00"
}
},
{
"id": "billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000",
"name": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Consumption/reservationRecommendations",
"location": "westus",
"sku": "Standard_DS1_v2",
"kind": "legacy",
"properties": {
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P1Y",
"costWithNoReservedInstances": 10.0785105,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 13.48,
"netSavings": 0.68,
"firstUsageDate": "2019-07-07T00:00:00-07:00",
"scope": "Shared",
"lookBackPeriod": "Last7Days",
"instanceFlexibilityRatio": 1,
"instanceFlexibilityGroup": "DSv2 Series",
"normalizedSize": "Standard_DS1",
"recommendedQuantityNormalized": 1.2,
"skuProperties": [
{
"name": "SkuDisplayName",
"value": "B"
},
{
"name": "CPU",
"value": "1"
}
],
"totalHours": 805,
"lastUsageDate": "2019-08-09T00:00:00-07:00"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01&$skiptoken=AQAAAA%3D%3D&"
}
ReservationRecommendationsByBillingAccountFilterForScope
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationRecommendations?$filter=properties/scope eq 'Single'&api-version=2024-08-01
応答のサンプル
{
"value": [
{
"kind": "legacy",
"id": "billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/71fd91a7-13b9-4ade-bb11-85cfd6422d9d",
"name": "71fd91a7-13b9-4ade-bb11-85cfd6422d9d",
"type": "Microsoft.Consumption/reservationRecommendations",
"location": "westus3",
"sku": "Standard_B4ms",
"properties": {
"meterId": "9a3781ce-d0dc-5f76-99d7-29eb5aec447f",
"term": "P1Y",
"costWithNoReservedInstances": 0.332,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0.19474885844748857,
"netSavings": 0.13725114155251145,
"firstUsageDate": "2024-04-30T07:00:00Z",
"scope": "Single",
"lookBackPeriod": "Last7Days",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceType": "virtualmachines",
"instanceFlexibilityRatio": 8,
"instanceFlexibilityGroup": "BS Series High Memory",
"normalizedSize": "Standard_B1ms",
"recommendedQuantityNormalized": 8,
"skuProperties": []
}
},
{
"kind": "legacy",
"id": "billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/904b99c2-baf3-4bff-98ff-a96238ccbc96",
"name": "904b99c2-baf3-4bff-98ff-a96238ccbc96",
"type": "Microsoft.Consumption/reservationRecommendations",
"location": "westus3",
"sku": "Standard_B4ms",
"properties": {
"meterId": "9a3781ce-d0dc-5f76-99d7-29eb5aec447f",
"term": "P3Y",
"costWithNoReservedInstances": 0.332,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0.12511415525114156,
"netSavings": 0.20688584474885846,
"firstUsageDate": "2024-04-30T07:00:00Z",
"scope": "Single",
"lookBackPeriod": "Last7Days",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceType": "virtualmachines",
"instanceFlexibilityRatio": 8,
"instanceFlexibilityGroup": "BS Series High Memory",
"normalizedSize": "Standard_B1ms",
"recommendedQuantityNormalized": 8,
"skuProperties": []
}
}
]
}
ReservationRecommendationsByBillingProfile-Modern
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/billingProfiles/6420/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01
応答のサンプル
{
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/123456/billingProfiles/6420/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000",
"name": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Consumption/reservationRecommendations",
"kind": "modern",
"properties": {
"costWithNoReservedInstances": {
"currency": "USD",
"value": 279881.9457795231
},
"firstUsageDate": "2022-08-22T00:00:00Z",
"instanceFlexibilityGroup": "NA",
"instanceFlexibilityRatio": 1,
"location": "westus2",
"lookBackPeriod": 60,
"meterId": "30f7049a-b092-42f4-9173-9ec31ab945ad",
"netSavings": {
"currency": "USD",
"value": 153766.87728637524
},
"normalizedSize": "SQLDB_BC_Compute_Gen5",
"recommendedQuantity": 35,
"recommendedQuantityNormalized": 35,
"resourceType": "sqldatabases",
"scope": "Single",
"skuName": "SQLDB_BC_Compute_Gen5",
"skuProperties": null,
"subscriptionId": "c6aa8a01-a744-44a7-a4f1-caad17512f27",
"term": "P3Y",
"totalCostWithReservedInstances": {
"currency": "USD",
"value": 126115.06849314792
},
"totalHours": 717,
"lastUsageDate": "2022-09-22T00:00:00Z"
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/123456/billingProfiles/6420/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000",
"name": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Consumption/reservationRecommendations",
"kind": "modern",
"properties": {
"costWithNoReservedInstances": {
"currency": "USD",
"value": 93208.8596802244
},
"firstUsageDate": "2022-08-22T00:00:00Z",
"instanceFlexibilityGroup": "NA",
"instanceFlexibilityRatio": 1,
"location": "westus2",
"lookBackPeriod": 60,
"meterId": "30f7049a-b092-42f4-9173-9ec31ab945ad",
"netSavings": {
"currency": "USD",
"value": 32553.85968022456
},
"normalizedSize": "SQLDB_BC_Compute_Gen5",
"recommendedQuantity": 35,
"recommendedQuantityNormalized": 35,
"resourceType": "sqldatabases",
"scope": "Single",
"skuName": "SQLDB_BC_Compute_Gen5",
"skuProperties": null,
"subscriptionId": "c6aa8a01-a744-44a7-a4f1-caad17512f27",
"term": "P1Y",
"totalCostWithReservedInstances": {
"currency": "USD",
"value": 60654.99999999984
},
"totalHours": 527,
"lastUsageDate": "2022-08-27T00:00:00Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01&$skiptoken=AQAAAA%3D%3D&"
}
ReservationRecommendationsByResourceGroup-Legacy
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01
応答のサンプル
{
"value": [
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGrouups/testGroup/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations1",
"name": "reservationRecommendations1",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P1Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 4.634521202630137,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 427,
"lastUsageDate": "2018-03-08T00:00:00Z"
}
},
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations2",
"name": "reservationRecommendations2",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P3Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 7.289315723178081,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 327,
"lastUsageDate": "2018-03-09T00:00:00Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01&$skiptoken=AQAAAA%3D%3D&"
}
ReservationRecommendationsBySubscription-Legacy
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01
応答のサンプル
{
"value": [
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations1",
"name": "reservationRecommendations1",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P1Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 4.634521202630137,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 827,
"lastUsageDate": "2018-03-10T00:00:00Z"
}
},
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations2",
"name": "reservationRecommendations2",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P3Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 7.289315723178081,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 927,
"lastUsageDate": "2018-03-15T00:00:00Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01&$skiptoken=AQAAAA%3D%3D&"
}
ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod-Legacy
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?$filter=properties/scope eq 'Single' AND properties/lookBackPeriod eq 'Last7Days'&api-version=2024-08-01
応答のサンプル
{
"value": [
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations1",
"name": "reservationRecommendations1",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P1Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 4.634521202630137,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"skuProperties": [
{
"name": "Cores",
"value": "1"
},
{
"name": "Ram",
"value": "1"
}
],
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 527,
"lastUsageDate": "2018-03-15T00:00:00Z"
}
},
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations2",
"name": "reservationRecommendations2",
"type": "Microsoft.Consumption/reservationRecommendations",
"sku": "Standard_DS1_v2",
"location": "northeurope",
"kind": "legacy",
"properties": {
"lookBackPeriod": "Last7Days",
"meterId": "00000000-0000-0000-0000-000000000000",
"term": "P3Y",
"costWithNoReservedInstances": 0,
"recommendedQuantity": 1,
"totalCostWithReservedInstances": 0,
"netSavings": 7.289315723178081,
"firstUsageDate": "2018-03-06T00:00:00Z",
"scope": "Single",
"skuProperties": [
{
"name": "SkuDisplayName",
"value": "B"
},
{
"name": "CPU",
"value": "1"
}
],
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"totalHours": 427,
"lastUsageDate": "2018-03-08T00:00:00Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2024-08-01&$filter=properties/scope+eq+'Single'+AND+properties/lookBackPeriod+eq+'Last7Days'&$skiptoken=AQAAAA%3D%3D&"
}
定義
名前 | 説明 |
---|---|
amount |
金額に通貨を加算します。 |
Error |
エラーの詳細。 |
Error |
エラー応答は、サービスが受信要求を処理できないことを示します。 エラー メッセージに理由が示されます。 いくつかのエラー応答:
|
Legacy |
従来の予約に関する推奨事項。 |
Modern |
最新の予約に関する推奨事項。 |
Reservation |
予約に関する推奨事項を一覧表示した結果。 |
Sku |
Sku プロパティ |
amount
金額に通貨を加算します。
名前 | 型 | 説明 |
---|---|---|
currency |
string |
金額の通貨。 |
value |
number (decimal) |
量。 |
ErrorDetails
エラーの詳細。
名前 | 型 | 説明 |
---|---|---|
code |
string |
エラー コード。 |
message |
string |
操作が失敗した理由を示すエラー メッセージ。 |
ErrorResponse
エラー応答は、サービスが受信要求を処理できないことを示します。 エラー メッセージに理由が示されます。
いくつかのエラー応答:
429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時刻を待機した後に再試行します。
503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻を待機した後に再試行します。
504 ゲートウェイ タイムアウト - 要求の処理中にサービスがタイムアウトしました。 可能であれば、要求の日付範囲を減らします。
名前 | 型 | 説明 |
---|---|---|
error |
エラーの詳細。 |
LegacyReservationRecommendation
従来の予約に関する推奨事項。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
リソースの etag。 |
id |
string |
イベントの完全修飾 ARM ID。 |
kind |
string:
legacy |
予約の推奨事項の種類を指定します。 |
location |
string |
リソースの場所 |
name |
string |
イベントを一意に識別する ID。 |
properties.costWithNoReservedInstances |
number (decimal) |
予約インスタンスのないコストの合計量。 |
properties.firstUsageDate |
string (date-time) |
振り返る使用日。 |
properties.instanceFlexibilityGroup |
string |
インスタンスの柔軟性グループ。 |
properties.instanceFlexibilityRatio |
number |
インスタンスの柔軟性比。 |
properties.lastUsageDate |
string (date-time) |
推奨事項の計算を振り返る際に使用した最後の使用日。 |
properties.lookBackPeriod |
string |
推奨事項を確認する使用量の日数。 |
properties.meterId |
string (uuid) |
メーター ID (GUID) |
properties.netSavings |
number (decimal) |
予約インスタンスによる推定節約額の合計。 |
properties.normalizedSize |
string |
正規化されたサイズ。 |
properties.recommendedQuantity |
number (decimal) |
予約インスタンスの推奨品質。 |
properties.recommendedQuantityNormalized |
number |
推奨される正規化された数量。 |
properties.resourceType |
string |
Azure リソースの種類。 |
properties.scope |
string |
共有または単一の推奨事項。 |
properties.skuProperties |
SKU プロパティの一覧 |
|
properties.term |
string |
予約の期間。 例: P1M、P1Y、または P3Y。 |
properties.totalCostWithReservedInstances |
number (decimal) |
予約インスタンスの合計コスト。 |
properties.totalHours |
integer (int32) |
コストの対象となる合計時間。 |
sku |
string |
リソース SKU |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
ModernReservationRecommendation
最新の予約に関する推奨事項。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
リソースの etag。 |
id |
string |
イベントの完全修飾 ARM ID。 |
kind |
string:
modern |
予約の推奨事項の種類を指定します。 |
location |
string |
リソースの場所 |
name |
string |
イベントを一意に識別する ID。 |
properties.costWithNoReservedInstances |
予約インスタンスのないコストの合計量。 |
|
properties.firstUsageDate |
string (date-time) |
振り返る使用日。 |
properties.instanceFlexibilityGroup |
string |
インスタンスの柔軟性グループ。 |
properties.instanceFlexibilityRatio |
number |
インスタンスの柔軟性比。 |
properties.lastUsageDate |
string (date-time) |
推奨事項の計算を振り返る際に使用した最後の使用日。 |
properties.location |
string |
リソースの場所。 |
properties.lookBackPeriod |
integer (int32) |
推奨事項を確認する使用量の日数。 |
properties.meterId |
string (uuid) |
メーター ID (GUID) |
properties.netSavings |
予約インスタンスによる推定節約額の合計。 |
|
properties.normalizedSize |
string |
正規化されたサイズ。 |
properties.recommendedQuantity |
number (decimal) |
予約インスタンスの推奨品質。 |
properties.recommendedQuantityNormalized |
number |
推奨される正規化された数量。 |
properties.resourceType |
string |
リソースの種類。 |
properties.scope |
string |
共有または単一の推奨事項。 |
properties.skuName |
string |
これは ARM SKU 名です。 |
properties.skuProperties |
SKU プロパティの一覧 |
|
properties.term |
string |
予約の期間。 例: P1M、P1Y、または P3Y。 |
properties.totalCostWithReservedInstances |
予約インスタンスの合計コスト。 |
|
properties.totalHours |
integer (int32) |
コストの対象となる合計時間。 |
sku |
string |
リソース SKU |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
ReservationRecommendationsListResult
予約に関する推奨事項を一覧表示した結果。
名前 | 型 | 説明 |
---|---|---|
nextLink |
string |
結果の次のページへのリンク (URL)。 |
previousLink |
string |
結果の前のページへのリンク (URL)。 |
value | ReservationRecommendation[]: |
予約に関する推奨事項の一覧。 |
SkuProperty
Sku プロパティ
名前 | 型 | 説明 |
---|---|---|
name |
string |
sku プロパティの名前。 |
value |
string |
sku プロパティの値。 |