savings_plan_orders
Creates, updates, deletes, gets or lists a savings_plan_orders resource.
Overview
| Name | savings_plan_orders |
| Type | Resource |
| Id | azure.billing.savings_plan_orders |
Fields
The following fields are returned by SELECT queries:
- get_by_billing_account
- list_by_billing_account
| Name | Datatype | Description |
|---|---|---|
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. |
benefitStartTime | string (date-time) | DateTime when the savings plan benefit started. |
billingAccountId | string | Fully-qualified identifier of the billing account where the savings plan is applied. |
billingPlan | string | Represents the billing plan in ISO 8601 format. Required only for monthly purchases. "P1M" (P1M) |
billingProfileId | string | Fully-qualified identifier of the billing profile where the savings plan is applied. Present only for Field-led or Customer-led customers. |
billingScopeId | string | Subscription that will be charged for purchasing SavingsPlan. |
customerId | string | Fully-qualified identifier of the customer where the savings plan is applied. Present only for Partner-led customers. |
displayName | string | Display name. |
expiryDateTime | string (date-time) | DateTime when the savings plan will expire. |
extendedStatusInfo | object | Extended status information. |
planInformation | object | Information describing the type of billing plan for this savings plan. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the savings plan, e.g. Succeeded. |
savingsPlans | array | :vartype savings_plans: list[str] |
sku | object | Savings plan SKU. Required. |
systemData | object | 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 < > % & \ ? /. |
term | string | Represents the Savings plan term in ISO 8601 format. Known values are: "P1Y", "P3Y", and "P5Y". (P1Y, P3Y, P5Y) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
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. |
benefitStartTime | string (date-time) | DateTime when the savings plan benefit started. |
billingAccountId | string | Fully-qualified identifier of the billing account where the savings plan is applied. |
billingPlan | string | Represents the billing plan in ISO 8601 format. Required only for monthly purchases. "P1M" (P1M) |
billingProfileId | string | Fully-qualified identifier of the billing profile where the savings plan is applied. Present only for Field-led or Customer-led customers. |
billingScopeId | string | Subscription that will be charged for purchasing SavingsPlan. |
customerId | string | Fully-qualified identifier of the customer where the savings plan is applied. Present only for Partner-led customers. |
displayName | string | Display name. |
expiryDateTime | string (date-time) | DateTime when the savings plan will expire. |
extendedStatusInfo | object | Extended status information. |
planInformation | object | Information describing the type of billing plan for this savings plan. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the savings plan, e.g. Succeeded. |
savingsPlans | array | :vartype savings_plans: list[str] |
sku | object | Savings plan SKU. Required. |
systemData | object | 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 < > % & \ ? /. |
term | string | Represents the Savings plan term in ISO 8601 format. Known values are: "P1Y", "P3Y", and "P5Y". (P1Y, P3Y, P5Y) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_billing_account | select | billing_account_name, savings_plan_order_id | expand | Get a savings plan order by billing account. |
list_by_billing_account | select | billing_account_name | filter, orderBy, skiptoken | List all Savings plan orders by billing account. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
savings_plan_order_id | string | Order ID of the savings plan. Required. |
expand | string | May be used to expand the planInformation. Default value is None. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. Default value is None. |
skiptoken | number | The number of savings plans to skip from the list before returning results. Default value is None. |
SELECT examples
- get_by_billing_account
- list_by_billing_account
Get a savings plan order by billing account.
SELECT
id,
name,
benefitStartTime,
billingAccountId,
billingPlan,
billingProfileId,
billingScopeId,
customerId,
displayName,
expiryDateTime,
extendedStatusInfo,
planInformation,
productCode,
provisioningState,
savingsPlans,
sku,
systemData,
tags,
term,
type
FROM azure.billing.savings_plan_orders
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND savings_plan_order_id = '{{ savings_plan_order_id }}' -- required
AND expand = '{{ expand }}'
;
List all Savings plan orders by billing account.
SELECT
id,
name,
benefitStartTime,
billingAccountId,
billingPlan,
billingProfileId,
billingScopeId,
customerId,
displayName,
expiryDateTime,
extendedStatusInfo,
planInformation,
productCode,
provisioningState,
savingsPlans,
sku,
systemData,
tags,
term,
type
FROM azure.billing.savings_plan_orders
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND skiptoken = '{{ skiptoken }}'
;