Savings Plans - Get By Billing Account
Get savings plan by billing account.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}?api-version=2024-04-01&expand={expand}
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. |
|
savings
|
path | True |
string |
ID of the savings plan |
|
savings
|
path | True |
string |
Order ID of the savings plan |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
expand
|
query |
string |
May be used to expand the planInformation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
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
|
Savings |
|
Savings |
SavingsPlanGet
Sample request
GET https://management.azure.com/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?api-version=2024-04-01
Sample response
{
"name": "30000000-0000-0000-0000-000000000000",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"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",
"properties": {
"appliedScopeProperties": {
"displayName": "TestRg",
"managementGroupId": "/providers/Microsoft.Management/managementGroups/TestRg",
"tenantId": "70000000-0000-0000-0000-000000000000"
},
"appliedScopeType": "ManagementGroup",
"benefitStartTime": "2022-11-16T02:25:11.7183866Z",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingPlan": "P1M",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingScopeId": "/subscriptions/50000000-0000-0000-0000-000000000000",
"commitment": {
"amount": 0.001,
"currencyCode": "USD",
"grain": "Hourly"
},
"displayName": "SP1",
"displayProvisioningState": "NoBenefit",
"effectiveDateTime": "2022-12-16T01:35:36.2909462Z",
"expiryDateTime": "2025-11-16T02:25:11.7183866Z",
"productCode": "20000000-0000-0000-0000-000000000005",
"provisioningState": "Succeeded",
"purchaseDateTime": "2022-11-16T02:23:21.3864783Z",
"renew": false,
"term": "P3Y",
"userFriendlyAppliedScopeType": "ManagementGroup",
"utilization": {
"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"
}
],
"trend": "SAME"
}
},
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
SavingsPlanGetExpandRenewProperties
Sample request
GET https://management.azure.com/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?api-version=2024-04-01
Sample response
{
"name": "30000000-0000-0000-0000-000000000000",
"type": "microsoft.billing/billingAccounts/savingsPlanOrders/savingsPlans",
"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",
"properties": {
"appliedScopeProperties": {
"displayName": "TestRg",
"managementGroupId": "/providers/Microsoft.Management/managementGroups/TestRg",
"tenantId": "70000000-0000-0000-0000-000000000000"
},
"appliedScopeType": "ManagementGroup",
"benefitStartTime": "2022-11-16T02:25:11.7183866Z",
"billingAccountId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31",
"billingPlan": "P1M",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/AAAA-BBBB-CCC-DDD",
"billingScopeId": "/subscriptions/50000000-0000-0000-0000-000000000000",
"commitment": {
"amount": 0.001,
"currencyCode": "USD",
"grain": "Hourly"
},
"displayName": "SP1",
"displayProvisioningState": "NoBenefit",
"effectiveDateTime": "2022-12-16T01:35:36.2909462Z",
"expiryDateTime": "2025-11-16T02:25:11.7183866Z",
"productCode": "20000000-0000-0000-0000-000000000005",
"provisioningState": "Succeeded",
"purchaseDateTime": "2022-11-16T02:23:21.3864783Z",
"renew": false,
"renewProperties": {
"purchaseProperties": {
"properties": {
"appliedScopeProperties": {
"managementGroupId": "/providers/Microsoft.Management/managementGroups/TestRg",
"tenantId": "70000000-0000-0000-0000-000000000000"
},
"appliedScopeType": "ManagementGroup",
"billingPlan": "Monthly",
"billingScopeId": "/subscriptions/50000000-0000-0000-0000-000000000000",
"commitment": {
"amount": 0.001,
"currencyCode": "USD",
"grain": "Hourly"
},
"displayName": "SP1_renewed",
"term": "P3Y"
},
"sku": {
"name": "Compute_Savings_Plan"
}
}
},
"term": "P3Y",
"userFriendlyAppliedScopeType": "ManagementGroup",
"utilization": {
"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"
}
],
"trend": "SAME"
}
},
"sku": {
"name": "Compute_Savings_Plan"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
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 |
The provisioning state of the resource during a long-running operation. |
|
Purchase |
Purchase request. |
|
Renew |
Properties specific to renew. |
|
Savings |
Savings plan |
|
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 |
Single |
| Shared |
Shared |
| ManagementGroup |
ManagementGroup |
BillingPlan
Represents the billing plan in ISO 8601 format. Required only for monthly purchases.
| Value | Description |
|---|---|
| P1M |
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 |
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
The provisioning state of the resource during a long-running operation.
| Value | Description |
|---|---|
| Succeeded |
Succeeded |
| Canceled |
Canceled |
| Failed |
Failed |
| New |
New |
| Pending |
Pending |
| Provisioning |
Provisioning |
| PendingBilling |
PendingBilling |
| ConfirmedBilling |
ConfirmedBilling |
| Creating |
Creating |
| Created |
Created |
| Expired |
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 |
The provisioning state of the resource during a long-running operation. |
||
| 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" |
SavingsPlanTerm
Represents the Savings plan term in ISO 8601 format.
| Value | Description |
|---|---|
| P1Y |
P1Y |
| P3Y |
P3Y |
| P5Y |
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 (float) |
The grain of the aggregate |
| grainUnit |
string |
The grain unit of the aggregate |
| value |
number (float) |
The aggregate value |
| valueUnit |
string |
The aggregate value unit |