Skip to main content

savings_plans

Creates, updates, deletes, gets or lists a savings_plans resource.

Overview

Namesavings_plans
TypeResource
Idazure.billing.savings_plans

Fields

The following fields are returned by SELECT queries:

The request is completed.

NameDatatypeDescription
propertiesobjectSavings plan properties
skuobjectSavings plan SKU
tagsobjectDictionary 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 < > % & \ ? /

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_billing_accountselectbillingAccountName, savingsPlanOrderId, savingsPlanIdexpandGet savings plan by billing account.
list_by_savings_plan_orderselectbillingAccountName, savingsPlanOrderIdList savings plans in an order by billing account.
list_by_billing_accountselectbillingAccountNamefilter, orderBy, skiptoken, take, selectedState, refreshSummaryList savings plans by billing account.
update_by_billing_accountexecbillingAccountName, savingsPlanOrderId, savingsPlanIdUpdate savings plan by billing account.
validate_update_by_billing_accountexecbillingAccountName, savingsPlanOrderId, savingsPlanIdValidate savings plan patch 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.

NameDatatypeDescription
billingAccountNamestringThe ID that uniquely identifies a billing account.
savingsPlanIdstringID of the savings plan
savingsPlanOrderIdstringOrder ID of the savings plan
expandstringMay be used to expand the planInformation.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL.
orderBystringThe orderby query option allows clients to request resources in a particular order.
refreshSummarystringTo indicate whether to refresh the roll up counts of the savings plans group by provisioning states
selectedStatestringThe selected provisioning state
skiptokennumberThe number of savings plans to skip from the list before returning results
takenumberThe number of savings plans to return

SELECT examples

Get savings plan by billing account.

SELECT
properties,
sku,
tags
FROM azure.billing.savings_plans
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND savingsPlanOrderId = '{{ savingsPlanOrderId }}' -- required
AND savingsPlanId = '{{ savingsPlanId }}' -- required
AND expand = '{{ expand }}'
;

Lifecycle Methods

Update savings plan by billing account.

EXEC azure.billing.savings_plans.update_by_billing_account 
@billingAccountName='{{ billingAccountName }}' --required,
@savingsPlanOrderId='{{ savingsPlanOrderId }}' --required,
@savingsPlanId='{{ savingsPlanId }}' --required
@@json=
'{
"properties": "{{ properties }}",
"sku": "{{ sku }}",
"tags": "{{ tags }}"
}'
;