Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain={grain}
With optional parameters:
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain={grain}&startDate={startDate}&endDate={endDate}&$filter={$filter}&reservationId={reservationId}&reservationOrderId={reservationOrderId}
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
resourceScope
|
path |
True
|
string
|
The fully qualified Azure Resource manager identifier of the resource.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
|
grain
|
query |
True
|
Datagrain
|
Can be daily or monthly
|
|
$filter
|
query |
|
string
|
Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile
|
|
endDate
|
query |
|
string
|
End date. Only applicable when querying with billing profile
|
|
reservationId
|
query |
|
string
|
Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation
|
|
reservationOrderId
|
query |
|
string
|
Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order
|
|
startDate
|
query |
|
string
|
Start date. Only applicable when querying with billing profile
|
Responses
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name |
Description |
|
user_impersonation
|
impersonate your user account
|
Examples
ReservationSummariesDailyWithBillingAccountId
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=daily&$filter=properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20
from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-consumption
# USAGE
python reservation_summaries_daily_with_billing_account_id.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConsumptionManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.reservations_summaries.list(
resource_scope="providers/Microsoft.Billing/billingAccounts/12345",
grain="daily",
)
for item in response:
print(item)
# x-ms-original-file: 2024-08-01/ReservationSummariesDailyWithBillingAccountId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconsumption_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption/v2"
)
// Generated from example definition: 2024-08-01/ReservationSummariesDailyWithBillingAccountId.json
func ExampleReservationsSummariesClient_NewListPager_reservationSummariesDailyWithBillingAccountId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconsumption.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReservationsSummariesClient().NewListPager("providers/Microsoft.Billing/billingAccounts/12345", armconsumption.DatagrainDailyGrain, &armconsumption.ReservationsSummariesClientListOptions{
Filter: to.Ptr("properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armconsumption.ReservationsSummariesClientListResponse{
// ReservationSummariesListResult: armconsumption.ReservationSummariesListResult{
// Value: []*armconsumption.ReservationSummary{
// {
// Name: to.Ptr("reservationSummaries_Id1"),
// Type: to.Ptr("Microsoft.Consumption/reservationSummaries"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1"),
// Properties: &armconsumption.ReservationSummaryProperties{
// ReservationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ReservationOrderID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// SKUName: to.Ptr("Standard_B1s"),
// UsageDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-01T00:00:00-07:00"); return t}()),
// },
// },
// },
// },
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"value": [
{
"name": "reservationSummaries_Id1",
"type": "Microsoft.Consumption/reservationSummaries",
"id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
"properties": {
"avgUtilizationPercentage": 0,
"maxUtilizationPercentage": 0,
"minUtilizationPercentage": 0,
"reservationId": "00000000-0000-0000-0000-000000000000",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservedHours": 720,
"skuName": "Standard_B1s",
"usageDate": "2018-09-01T00:00:00-07:00",
"usedHours": 0
},
"tags": null
}
]
}
ReservationSummariesDailyWithBillingProfileId
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=daily&startDate=2017-10-01&endDate=2017-11-20
from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-consumption
# USAGE
python reservation_summaries_daily_with_billing_profile_id.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConsumptionManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.reservations_summaries.list(
resource_scope="providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579",
grain="daily",
)
for item in response:
print(item)
# x-ms-original-file: 2024-08-01/ReservationSummariesDailyWithBillingProfileId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconsumption_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption/v2"
)
// Generated from example definition: 2024-08-01/ReservationSummariesDailyWithBillingProfileId.json
func ExampleReservationsSummariesClient_NewListPager_reservationSummariesDailyWithBillingProfileId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconsumption.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReservationsSummariesClient().NewListPager("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", armconsumption.DatagrainDailyGrain, &armconsumption.ReservationsSummariesClientListOptions{
EndDate: to.Ptr("2017-11-20"),
StartDate: to.Ptr("2017-10-01")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armconsumption.ReservationsSummariesClientListResponse{
// ReservationSummariesListResult: armconsumption.ReservationSummariesListResult{
// Value: []*armconsumption.ReservationSummary{
// {
// Name: to.Ptr("reservationSummaries_Id1"),
// Type: to.Ptr("Microsoft.Consumption/reservationSummaries"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1"),
// Properties: &armconsumption.ReservationSummaryProperties{
// ReservationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ReservationOrderID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// SKUName: to.Ptr("Standard_B1s"),
// UsageDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-01T00:00:00-07:00"); return t}()),
// },
// },
// },
// },
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"value": [
{
"name": "reservationSummaries_Id1",
"type": "Microsoft.Consumption/reservationSummaries",
"id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
"properties": {
"avgUtilizationPercentage": 0,
"maxUtilizationPercentage": 0,
"minUtilizationPercentage": 0,
"reservationId": "00000000-0000-0000-0000-000000000000",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservedHours": 720,
"skuName": "Standard_B1s",
"usageDate": "2018-09-01T00:00:00-07:00",
"usedHours": 0
},
"tags": null
}
]
}
ReservationSummariesMonthlyWithBillingAccountId
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly
from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-consumption
# USAGE
python reservation_summaries_monthly_with_billing_account_id.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConsumptionManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.reservations_summaries.list(
resource_scope="providers/Microsoft.Billing/billingAccounts/12345",
grain="monthly",
)
for item in response:
print(item)
# x-ms-original-file: 2024-08-01/ReservationSummariesMonthlyWithBillingAccountId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconsumption_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption/v2"
)
// Generated from example definition: 2024-08-01/ReservationSummariesMonthlyWithBillingAccountId.json
func ExampleReservationsSummariesClient_NewListPager_reservationSummariesMonthlyWithBillingAccountId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconsumption.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReservationsSummariesClient().NewListPager("providers/Microsoft.Billing/billingAccounts/12345", armconsumption.DatagrainMonthlyGrain, nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armconsumption.ReservationsSummariesClientListResponse{
// ReservationSummariesListResult: armconsumption.ReservationSummariesListResult{
// Value: []*armconsumption.ReservationSummary{
// {
// Name: to.Ptr("reservationSummaries_Id1"),
// Type: to.Ptr("Microsoft.Consumption/reservationSummaries"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1"),
// Properties: &armconsumption.ReservationSummaryProperties{
// ReservationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ReservationOrderID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// SKUName: to.Ptr("Standard_B1s"),
// UsageDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-01T00:00:00-07:00"); return t}()),
// },
// },
// },
// },
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"value": [
{
"name": "reservationSummaries_Id1",
"type": "Microsoft.Consumption/reservationSummaries",
"id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
"properties": {
"avgUtilizationPercentage": 0,
"maxUtilizationPercentage": 0,
"minUtilizationPercentage": 0,
"reservationId": "00000000-0000-0000-0000-000000000000",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservedHours": 720,
"skuName": "Standard_B1s",
"usageDate": "2018-09-01T00:00:00-07:00",
"usedHours": 0
},
"tags": null
}
]
}
ReservationSummariesMonthlyWithBillingProfileId
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly
from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-consumption
# USAGE
python reservation_summaries_monthly_with_billing_profile_id.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConsumptionManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.reservations_summaries.list(
resource_scope="providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579",
grain="monthly",
)
for item in response:
print(item)
# x-ms-original-file: 2024-08-01/ReservationSummariesMonthlyWithBillingProfileId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconsumption_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption/v2"
)
// Generated from example definition: 2024-08-01/ReservationSummariesMonthlyWithBillingProfileId.json
func ExampleReservationsSummariesClient_NewListPager_reservationSummariesMonthlyWithBillingProfileId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconsumption.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReservationsSummariesClient().NewListPager("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", armconsumption.DatagrainMonthlyGrain, nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armconsumption.ReservationsSummariesClientListResponse{
// ReservationSummariesListResult: armconsumption.ReservationSummariesListResult{
// Value: []*armconsumption.ReservationSummary{
// {
// Name: to.Ptr("reservationSummaries_Id1"),
// Type: to.Ptr("Microsoft.Consumption/reservationSummaries"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1"),
// Properties: &armconsumption.ReservationSummaryProperties{
// ReservationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ReservationOrderID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// SKUName: to.Ptr("Standard_B1s"),
// UsageDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-01T00:00:00-07:00"); return t}()),
// },
// },
// },
// },
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"value": [
{
"name": "reservationSummaries_Id1",
"type": "Microsoft.Consumption/reservationSummaries",
"id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
"properties": {
"avgUtilizationPercentage": 0,
"maxUtilizationPercentage": 0,
"minUtilizationPercentage": 0,
"reservationId": "00000000-0000-0000-0000-000000000000",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservedHours": 720,
"skuName": "Standard_B1s",
"usageDate": "2018-09-01T00:00:00-07:00",
"usedHours": 0
},
"tags": null
}
]
}
ReservationSummariesMonthlyWithBillingProfileIdReservationId
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly&reservationId=1c6b6358-709f-484c-85f1-72e862a0cf3b&reservationOrderId=9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc
from azure.identity import DefaultAzureCredential
from azure.mgmt.consumption import ConsumptionManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-consumption
# USAGE
python reservation_summaries_monthly_with_billing_profile_id_reservation_id.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ConsumptionManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.reservations_summaries.list(
resource_scope="providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579",
grain="monthly",
)
for item in response:
print(item)
# x-ms-original-file: 2024-08-01/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armconsumption_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption/v2"
)
// Generated from example definition: 2024-08-01/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
func ExampleReservationsSummariesClient_NewListPager_reservationSummariesMonthlyWithBillingProfileIdReservationId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armconsumption.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReservationsSummariesClient().NewListPager("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", armconsumption.DatagrainMonthlyGrain, &armconsumption.ReservationsSummariesClientListOptions{
ReservationID: to.Ptr("1c6b6358-709f-484c-85f1-72e862a0cf3b"),
ReservationOrderID: to.Ptr("9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc")})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armconsumption.ReservationsSummariesClientListResponse{
// ReservationSummariesListResult: armconsumption.ReservationSummariesListResult{
// Value: []*armconsumption.ReservationSummary{
// {
// Name: to.Ptr("reservationSummaries_Id1"),
// Type: to.Ptr("Microsoft.Consumption/reservationSummaries"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1"),
// Properties: &armconsumption.ReservationSummaryProperties{
// ReservationID: to.Ptr("1c6b6358-709f-484c-85f1-72e862a0cf3b"),
// ReservationOrderID: to.Ptr("9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc"),
// SKUName: to.Ptr("Standard_B1s"),
// UsageDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-01T00:00:00-07:00"); return t}()),
// },
// },
// },
// },
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"value": [
{
"name": "reservationSummaries_Id1",
"type": "Microsoft.Consumption/reservationSummaries",
"id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
"properties": {
"avgUtilizationPercentage": 0,
"maxUtilizationPercentage": 0,
"minUtilizationPercentage": 0,
"reservationId": "1c6b6358-709f-484c-85f1-72e862a0cf3b",
"reservationOrderId": "9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc",
"reservedHours": 720,
"skuName": "Standard_B1s",
"usageDate": "2018-09-01T00:00:00-07:00",
"usedHours": 0
},
"tags": null
}
]
}
Definitions
createdByType
Enumeration
The type of identity that created the resource.
| Value |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
Datagrain
Enumeration
| Value |
Description |
|
daily
|
Daily grain of data
|
|
monthly
|
Monthly grain of data
|
ErrorAdditionalInfo
Object
The resource management error additional info.
| Name |
Type |
Description |
|
info
|
object
|
The additional info.
|
|
type
|
string
|
The additional info type.
|
ErrorDetail
Object
The error detail.
| Name |
Type |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
code
|
string
|
The error code.
|
|
details
|
ErrorDetail[]
|
The error details.
|
|
message
|
string
|
The error message.
|
|
target
|
string
|
The error target.
|
ErrorResponse
Object
Error response
| Name |
Type |
Description |
|
error
|
ErrorDetail
|
The error object.
|
ReservationSummariesListResult
Object
Result of listing reservation summaries.
| Name |
Type |
Description |
|
nextLink
|
string
|
The link (url) to the next page of results.
|
|
value
|
ReservationSummary[]
|
The list of reservation summaries.
|
ReservationSummary
Object
reservation summary resource.
| Name |
Type |
Description |
|
etag
|
string
|
The etag for the resource.
|
|
id
|
string
|
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
name
|
string
|
The name of the resource
|
|
properties.avgUtilizationPercentage
|
number
(decimal)
|
This is average utilization for the entire time range. (day or month depending on the grain)
|
|
properties.kind
|
string
|
The reservation kind.
|
|
properties.maxUtilizationPercentage
|
number
(decimal)
|
This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.
|
|
properties.minUtilizationPercentage
|
number
(decimal)
|
This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day
|
|
properties.purchasedQuantity
|
number
(decimal)
|
This is the purchased quantity for the reservationId.
|
|
properties.remainingQuantity
|
number
(decimal)
|
This is the remaining quantity for the reservationId.
|
|
properties.reservationId
|
string
|
The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.
|
|
properties.reservationOrderId
|
string
|
The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
|
|
properties.reservedHours
|
number
(decimal)
|
This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days
|
|
properties.skuName
|
string
|
This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
|
|
properties.totalReservedQuantity
|
number
(decimal)
|
This is the total count of instances that are reserved for the reservationId.
|
|
properties.usageDate
|
string
(date-time)
|
Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
|
|
properties.usedHours
|
number
(decimal)
|
Total used hours by the reservation
|
|
properties.usedQuantity
|
number
(decimal)
|
This is the used quantity for the reservationId.
|
|
properties.utilizedPercentage
|
number
(decimal)
|
This is the utilized percentage for the reservation Id.
|
|
systemData
|
systemData
|
Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
|
tags
|
object
|
Resource tags.
|
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
systemData
Object
Metadata pertaining to creation and last modification of the resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
The timestamp of resource creation (UTC).
|
|
createdBy
|
string
|
The identity that created the resource.
|
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
|
lastModifiedAt
|
string
(date-time)
|
The timestamp of resource last modification (UTC)
|
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|