Savings Plans - List By Billing Account
List savings plans by billing account.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlans?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlans?api-version=2024-04-01&filter={filter}&orderBy={orderBy}&skiptoken={skiptoken}&take={take}&selectedState={selectedState}&refreshSummary={refreshSummary}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$ |
The ID that uniquely identifies a billing account. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. The current version is 2024-04-01. |
filter
|
query |
string |
The filter query option allows clients to filter a collection of resources that are addressed by a request URL. |
|
order
|
query |
string |
The orderby query option allows clients to request resources in a particular order. |
|
refresh
|
query |
string |
To indicate whether to refresh the roll up counts of the savings plans group by provisioning states |
|
selected
|
query |
string |
The selected provisioning state |
|
skiptoken
|
query |
number |
The number of savings plans to skip from the list before returning results |
|
take
|
query |
number |
The number of savings plans to return |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request is completed. |
|
Other Status Codes |
Unexpected error. |
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
SavingsPlansList
Sample request
Sample response
{
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/savingsPlanOrders/20000000-0000-0000-0000-000000000000/savingsPlans/30000000-0000-0000-0000-000000000000",
"name": "30000000-0000-0000-0000-000000000000",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingPlan": "P1M",
"productCode": "20000000-0000-0000-0000-000000000005",
"commitment": {
"grain": "Hourly",
"currencyCode": "USD",
"amount": 10
},
"renew": false,
"appliedScopeType": "Shared",
"displayName": "SP1",
"provisioningState": "Succeeded",
"term": "P1Y",
"displayProvisioningState": "Succeeded",
"userFriendlyAppliedScopeType": "Shared",
"expiryDateTime": "2023-12-16T02:17:03.7396152Z",
"purchaseDateTime": "2022-12-16T02:14:58.2304134Z",
"benefitStartTime": "2022-12-16T02:17:03.7396152Z",
"effectiveDateTime": "2022-12-16T02:17:04.9896661Z",
"utilization": {
"trend": "SAME",
"aggregates": [
{
"grain": 1,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
},
{
"grain": 7,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
},
{
"grain": 30,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
}
]
}
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/savingsPlanOrders/20000000-0000-0000-0000-000000000001/savingsPlans/30000000-0000-0000-0000-000000000001",
"name": "30000000-0000-0000-0000-000000000001",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingPlan": "P1M",
"productCode": "20000000-0000-0000-0000-000000000005",
"appliedScopeProperties": {
"tenantId": "50000000-0000-0000-0000-000000000000",
"managementGroupId": "/providers/Microsoft.Management/managementGroups/TestRg",
"displayName": "TestRg"
},
"commitment": {
"grain": "Hourly",
"currencyCode": "USD",
"amount": 10
},
"renew": false,
"appliedScopeType": "ManagementGroup",
"displayName": "SP2",
"provisioningState": "Succeeded",
"term": "P1Y",
"displayProvisioningState": "Succeeded",
"userFriendlyAppliedScopeType": "ManagementGroup",
"expiryDateTime": "2023-12-16T02:22:22.7254795Z",
"purchaseDateTime": "2022-12-16T02:20:23.4733076Z",
"benefitStartTime": "2022-12-16T02:22:22.7254795Z",
"effectiveDateTime": "2022-12-16T02:22:24.5536191Z",
"utilization": {
"trend": "SAME",
"aggregates": [
{
"grain": 1,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
},
{
"grain": 7,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
},
{
"grain": 30,
"grainUnit": "days",
"value": 0,
"valueUnit": "percentage"
}
]
}
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/savingsPlanOrders/20000000-0000-0000-0000-000000000002/savingsPlans/30000000-0000-0000-0000-000000000002",
"name": "30000000-0000-0000-0000-000000000002",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"billingScopeId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingSubscriptions/10000000-0000-0000-0000-000000000000",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingPlan": "P1M",
"productCode": "20000000-0000-0000-0000-000000000005",
"appliedScopeProperties": {
"subscriptionId": "/subscriptions/10000000-0000-0000-0000-000000000000",
"displayName": "Azure subscription 1"
},
"commitment": {
"grain": "Hourly",
"currencyCode": "USD",
"amount": 0.025
},
"renew": true,
"appliedScopeType": "Single",
"displayName": "SP3",
"provisioningState": "Succeeded",
"term": "P3Y",
"displayProvisioningState": "Succeeded",
"userFriendlyAppliedScopeType": "Single",
"expiryDateTime": "2025-10-14T21:18:55.2960613Z",
"purchaseDateTime": "2022-10-14T21:16:57.2347688Z",
"benefitStartTime": "2022-10-14T21:18:55.2960613Z",
"effectiveDateTime": "2022-11-07T23:54:43.8233243Z",
"utilization": {
"trend": "SAME",
"aggregates": [
{
"grain": 1,
"grainUnit": "days",
"value": 66,
"valueUnit": "percentage"
},
{
"grain": 7,
"grainUnit": "days",
"value": 66,
"valueUnit": "percentage"
},
{
"grain": 30,
"grainUnit": "days",
"value": 65.52,
"valueUnit": "percentage"
}
]
}
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/savingsPlanOrders/20000000-0000-0000-0000-000000000003/savingsPlans/30000000-0000-0000-0000-000000000003",
"name": "30000000-0000-0000-0000-000000000003",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingPlan": "P1M",
"productCode": "20000000-0000-0000-0000-000000000005",
"appliedScopeProperties": {
"resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourcegroups/testRG",
"displayName": "testRG"
},
"commitment": {
"grain": "Hourly",
"currencyCode": "USD",
"amount": 0.001
},
"renew": false,
"appliedScopeType": "Single",
"displayName": "SP4",
"provisioningState": "Succeeded",
"term": "P3Y",
"displayProvisioningState": "Succeeded",
"userFriendlyAppliedScopeType": "ResourceGroup",
"expiryDateTime": "2025-11-08T00:00:06.3636747Z",
"purchaseDateTime": "2022-11-07T23:57:58.2428677Z",
"benefitStartTime": "2022-11-08T00:00:06.3636747Z",
"effectiveDateTime": "2022-11-30T21:18:12.1967323Z",
"utilization": {
"trend": "SAME",
"aggregates": [
{
"grain": 1,
"grainUnit": "days",
"value": 100,
"valueUnit": "percentage"
},
{
"grain": 7,
"grainUnit": "days",
"value": 100,
"valueUnit": "percentage"
},
{
"grain": 30,
"grainUnit": "days",
"value": 100,
"valueUnit": "percentage"
}
]
}
}
}
],
"summary": {
"noBenefitCount": 0,
"warningCount": 0,
"succeededCount": 3,
"failedCount": 0,
"expiringCount": 0,
"expiredCount": 0,
"pendingCount": 0,
"cancelledCount": 0,
"processingCount": 0
}
}
Definitions
Name | Description |
---|---|
Applied |
Properties specific to applied scope type. Not required if not applicable. |
Applied |
Type of the Applied Scope. |
Billing |
Represents the billing plan in ISO 8601 format. Required only for monthly purchases. |
Commitment |
Commitment towards the benefit. |
Commitment |
Commitment grain. |
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Extended |
Extended status information |
Provisioning |
Provisioning state |
Purchase |
Purchase request. |
Renew |
Properties specific to renew. |
Savings |
Savings plan |
Savings |
List of savings plans |
Savings |
The roll up count summary of savings plans in each state |
Savings |
Represents the Savings plan term in ISO 8601 format. |
Sku |
The SKU to be applied for this resource |
system |
Metadata pertaining to creation and last modification of the resource. |
Utilization |
Savings plan utilization |
Utilization |
The aggregate values of savings plan utilization |
AppliedScopeProperties
Properties specific to applied scope type. Not required if not applicable.
Name | Type | Description |
---|---|---|
displayName |
string |
Display name |
managementGroupId |
string |
Fully-qualified identifier of the management group where the benefit is applied. |
resourceGroupId |
string |
Fully-qualified identifier of the resource group where the benefit is applied. |
subscriptionId |
string |
Fully-qualified identifier of the subscription where the benefit is applied. |
tenantId |
string |
Tenant ID where the savings plan where the benefit is applied. |
AppliedScopeType
Type of the Applied Scope.
Value | Description |
---|---|
Single | |
Shared | |
ManagementGroup |
BillingPlan
Represents the billing plan in ISO 8601 format. Required only for monthly purchases.
Value | Description |
---|---|
P1M |
Commitment
Commitment towards the benefit.
Name | Type | Description |
---|---|---|
amount |
number (double) |
|
currencyCode |
string |
The ISO 4217 3-letter currency code for the currency used by this purchase record. |
grain |
Commitment grain. |
CommitmentGrain
Commitment grain.
Value | Description |
---|---|
Hourly |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ExtendedStatusInfo
Extended status information
Name | Type | Description |
---|---|---|
message |
string |
The message giving detailed information about the status code. |
properties.subscriptionId |
string |
The subscription that has failed credit line check. |
statusCode |
string |
Status code providing additional information. |
ProvisioningState
Provisioning state
Value | Description |
---|---|
PendingBilling | |
ConfirmedBilling | |
Creating | |
Failed | |
Created | |
Succeeded | |
Canceled | |
Expired |
PurchaseRequest
Purchase request.
Name | Type | Default value | Description |
---|---|---|---|
properties.appliedScopeProperties |
Properties specific to applied scope type. Not required if not applicable. |
||
properties.appliedScopeType |
Type of the Applied Scope. |
||
properties.billingPlan |
Represents the billing plan in ISO 8601 format. Required only for monthly purchases. |
||
properties.billingScopeId |
string |
Subscription that will be charged for purchasing SavingsPlan |
|
properties.commitment |
Commitment towards the benefit. |
||
properties.displayName |
string |
Friendly name of the savings plan |
|
properties.renew |
boolean |
False |
Setting this to true will automatically purchase a new benefit on the expiration date time. |
properties.term |
Represents the Savings plan term in ISO 8601 format. |
||
sku |
The SKU to be applied for this resource |
RenewProperties
Properties specific to renew.
Name | Type | Description |
---|---|---|
purchaseProperties |
Purchase request. |
SavingsPlanModel
Savings plan
Name | Type | Default value | Description |
---|---|---|---|
id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
|
name |
string |
The name of the resource |
|
properties.appliedScopeProperties |
Properties specific to applied scope type. Not required if not applicable. |
||
properties.appliedScopeType |
Type of the Applied Scope. |
||
properties.benefitStartTime |
string (date-time) |
This is the DateTime when the savings plan benefit starts. |
|
properties.billingAccountId |
string |
Fully-qualified identifier of the billing account where the savings plan is applied. |
|
properties.billingPlan |
Represents the billing plan in ISO 8601 format. Required only for monthly purchases. |
||
properties.billingProfileId |
string |
Fully-qualified identifier of the billing profile where the savings plan is applied. Present only for Field-led or Customer-led customers. |
|
properties.billingScopeId |
string |
Subscription that will be charged for purchasing SavingsPlan |
|
properties.commitment |
Commitment towards the benefit. |
||
properties.customerId |
string |
Fully-qualified identifier of the customer where the savings plan is applied. Present only for Partner-led customers. |
|
properties.displayName |
string |
Display name |
|
properties.displayProvisioningState |
string |
The provisioning state of the savings plan for display, e.g. Succeeded |
|
properties.effectiveDateTime |
string (date-time) |
DateTime of the savings plan starting when this version is effective from. |
|
properties.expiryDateTime |
string (date-time) |
This is the date-time when the savings plan will expire. |
|
properties.extendedStatusInfo |
Extended status information |
||
properties.productCode |
string |
Represents UPN |
|
properties.provisioningState |
Provisioning state |
||
properties.purchaseDateTime |
string (date-time) |
Date time when the savings plan was purchased. |
|
properties.renew |
boolean |
False |
Setting this to true will automatically purchase a new benefit on the expiration date time. |
properties.renewDestination |
string |
SavingsPlan Id of the SavingsPlan which is purchased because of renew. |
|
properties.renewProperties |
Properties specific to renew. |
||
properties.renewSource |
string |
SavingsPlan Id of the SavingsPlan from which this SavingsPlan is renewed. |
|
properties.term |
Represents the Savings plan term in ISO 8601 format. |
||
properties.userFriendlyAppliedScopeType |
string |
The applied scope type of the savings plan for display, e.g. Shared |
|
properties.utilization |
Savings plan utilization |
||
sku |
Savings plan SKU |
||
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
||
tags |
object |
Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
SavingsPlanModelListResult
List of savings plans
Name | Type | Description |
---|---|---|
nextLink |
string |
Url to get the next page. |
summary |
The roll out count summary of the savings plans |
|
value |
Savings plan |
SavingsPlanSummaryCount
The roll up count summary of savings plans in each state
Name | Type | Description |
---|---|---|
cancelledCount |
number |
The number of savings plans in Cancelled state |
expiredCount |
number |
The number of savings plans in Expired state |
expiringCount |
number |
The number of savings plans in Expiring state |
failedCount |
number |
The number of savings plans in Failed state |
noBenefitCount |
number |
The number of savings plans in No Benefit state |
pendingCount |
number |
The number of savings plans in Pending state |
processingCount |
number |
The number of savings plans in Processing state |
succeededCount |
number |
The number of savings plans in Succeeded state |
warningCount |
number |
The number of savings plans in Warning state |
SavingsPlanTerm
Represents the Savings plan term in ISO 8601 format.
Value | Description |
---|---|
P1Y | |
P3Y | |
P5Y |
Sku
The SKU to be applied for this resource
Name | Type | Description |
---|---|---|
name |
string |
Name of the SKU to be applied |
systemData
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 |
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 |
The type of identity that last modified the resource. |
Utilization
Savings plan utilization
Name | Type | Description |
---|---|---|
aggregates |
The array of aggregates of a savings plan's utilization |
|
trend |
string |
The trend for a savings plan's utilization |
UtilizationAggregates
The aggregate values of savings plan utilization
Name | Type | Description |
---|---|---|
grain |
number |
The grain of the aggregate |
grainUnit |
string |
The grain unit of the aggregate |
value |
number |
The aggregate value |
valueUnit |
string |
The aggregate value unit |