savings_plans
Creates, updates, deletes, gets or lists a savings_plans
resource.
Overview
Name | savings_plans |
Type | Resource |
Id | azure.billing_benefits.savings_plans |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- list_all
The request is completed.
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 |
properties | object | Savings plan properties |
sku | object | The SKU to be applied for this resource |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
The request is completed.
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 |
properties | object | Savings plan properties |
sku | object | The SKU to be applied for this resource |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
The request is completed.
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 |
properties | object | Savings plan properties |
sku | object | The SKU to be applied for this resource |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 | select | savingsPlanOrderId , savingsPlanId | $expand | Get savings plan. |
list | select | savingsPlanOrderId | List savings plans in an order. | |
list_all | select | $filter , $orderby , refreshSummary , $skiptoken , selectedState , take | List savings plans. | |
update | update | savingsPlanOrderId , savingsPlanId | Update savings plan. | |
validate_update | exec | savingsPlanOrderId , savingsPlanId | Validate savings plan patch. |
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 |
---|---|---|
savingsPlanId | string | ID of the savings plan |
savingsPlanOrderId | string | Order ID of the savings plan |
$expand | string | May be used to expand the detail information of some properties. |
$filter | string | May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState} |
$orderby | string | May be used to sort order by reservation properties. |
$skiptoken | number | The number of savings plans to skip from the list before returning results |
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 |
take | number | To number of savings plans to return |
SELECT
examples
- get
- list
- list_all
Get savings plan.
SELECT
id,
name,
properties,
sku,
systemData,
type
FROM azure.billing_benefits.savings_plans
WHERE savingsPlanOrderId = '{{ savingsPlanOrderId }}' -- required
AND savingsPlanId = '{{ savingsPlanId }}' -- required
AND $expand = '{{ $expand }}'
;
List savings plans in an order.
SELECT
id,
name,
properties,
sku,
systemData,
type
FROM azure.billing_benefits.savings_plans
WHERE savingsPlanOrderId = '{{ savingsPlanOrderId }}' -- required
;
List savings plans.
SELECT
id,
name,
properties,
sku,
systemData,
type
FROM azure.billing_benefits.savings_plans
WHERE $filter = '{{ $filter }}'
AND $orderby = '{{ $orderby }}'
AND refreshSummary = '{{ refreshSummary }}'
AND $skiptoken = '{{ $skiptoken }}'
AND selectedState = '{{ selectedState }}'
AND take = '{{ take }}'
;
UPDATE
examples
- update
Update savings plan.
UPDATE azure.billing_benefits.savings_plans
SET
data__properties = '{{ properties }}'
WHERE
savingsPlanOrderId = '{{ savingsPlanOrderId }}' --required
AND savingsPlanId = '{{ savingsPlanId }}' --required
RETURNING
id,
name,
properties,
sku,
systemData,
type;
Lifecycle Methods
- validate_update
Validate savings plan patch.
EXEC azure.billing_benefits.savings_plans.validate_update
@savingsPlanOrderId='{{ savingsPlanOrderId }}' --required,
@savingsPlanId='{{ savingsPlanId }}' --required
@@json=
'{
"benefits": "{{ benefits }}"
}'
;