savings_plans
Creates, updates, deletes, gets or lists a savings_plans
resource.
Overview
Name | savings_plans |
Type | Resource |
Id | azure.billing.savings_plans |
Fields
The following fields are returned by SELECT
queries:
- get_by_billing_account
- list_by_savings_plan_order
- list_by_billing_account
The request is completed.
Name | Datatype | Description |
---|---|---|
properties | object | Savings plan properties |
sku | object | Savings plan SKU |
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 < > % & \ ? / |
The request is completed.
Name | Datatype | Description |
---|---|---|
properties | object | Savings plan properties |
sku | object | Savings plan SKU |
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 < > % & \ ? / |
The request is completed.
Name | Datatype | Description |
---|---|---|
nextLink | string | Url to get the next page. |
summary | object | The roll out count summary of the savings plans |
value | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_billing_account | select | billingAccountName , savingsPlanOrderId , savingsPlanId | expand | Get savings plan by billing account. |
list_by_savings_plan_order | select | billingAccountName , savingsPlanOrderId | List savings plans in an order by billing account. | |
list_by_billing_account | select | billingAccountName | filter , orderBy , skiptoken , take , selectedState , refreshSummary | List savings plans by billing account. |
update_by_billing_account | exec | billingAccountName , savingsPlanOrderId , savingsPlanId | Update savings plan by billing account. | |
validate_update_by_billing_account | exec | billingAccountName , savingsPlanOrderId , savingsPlanId | Validate 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.
Name | Datatype | Description |
---|---|---|
billingAccountName | string | The ID that uniquely identifies a billing account. |
savingsPlanId | string | ID of the savings plan |
savingsPlanOrderId | string | Order ID of the savings plan |
expand | string | May be used to expand the planInformation. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. |
refreshSummary | string | To indicate whether to refresh the roll up counts of the savings plans group by provisioning states |
selectedState | string | The selected provisioning state |
skiptoken | number | The number of savings plans to skip from the list before returning results |
take | number | The number of savings plans to return |
SELECT
examples
- get_by_billing_account
- list_by_savings_plan_order
- list_by_billing_account
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 }}'
;
List savings plans in an order by billing account.
SELECT
properties,
sku,
tags
FROM azure.billing.savings_plans
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND savingsPlanOrderId = '{{ savingsPlanOrderId }}' -- required
;
List savings plans by billing account.
SELECT
nextLink,
summary,
value
FROM azure.billing.savings_plans
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND skiptoken = '{{ skiptoken }}'
AND take = '{{ take }}'
AND selectedState = '{{ selectedState }}'
AND refreshSummary = '{{ refreshSummary }}'
;
Lifecycle Methods
- update_by_billing_account
- validate_update_by_billing_account
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 }}"
}'
;
Validate savings plan patch by billing account.
EXEC azure.billing.savings_plans.validate_update_by_billing_account
@billingAccountName='{{ billingAccountName }}' --required,
@savingsPlanOrderId='{{ savingsPlanOrderId }}' --required,
@savingsPlanId='{{ savingsPlanId }}' --required
@@json=
'{
"benefits": "{{ benefits }}"
}'
;