Share via


az billing-benefits savings-plan-order savings-plan

Note

This reference is part of the billing-benefits extension for the Azure CLI (version 2.43.0 or higher). The extension will automatically install the first time you run an az billing-benefits savings-plan-order savings-plan command. Learn more about extensions.

Azure billing benefits savings plan in savings plan order commands.

Commands

Name Description Type Status
az billing-benefits savings-plan-order savings-plan list

List savings plans in an order.

Extension GA
az billing-benefits savings-plan-order savings-plan show

Get savings plan.

Extension GA
az billing-benefits savings-plan-order savings-plan update

Update savings plan.

Extension GA
az billing-benefits savings-plan-order savings-plan validate-update

Validate savings plan patch.

Extension GA

az billing-benefits savings-plan-order savings-plan list

List savings plans in an order.

az billing-benefits savings-plan-order savings-plan list --savings-plan-order-id

Examples

List savings plans in an order

az billing-benefits savings-plan-order savings-plan list --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017

Required Parameters

--savings-plan-order-id

Order ID of the savings plan.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az billing-benefits savings-plan-order savings-plan show

Get savings plan.

az billing-benefits savings-plan-order savings-plan show --savings-plan-id
                                                         --savings-plan-order-id
                                                         [--expand]

Examples

Get savings plan details

az billing-benefits savings-plan-order savings-plan show --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019

Get savings plan details with renew properties

az billing-benefits savings-plan-order savings-plan show --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --expand renewProperties

Required Parameters

--savings-plan-id

ID of the savings plan.

--savings-plan-order-id

Order ID of the savings plan.

Optional Parameters

--expand

May be used to expand the detail information of some properties.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az billing-benefits savings-plan-order savings-plan update

Update savings plan.

az billing-benefits savings-plan-order savings-plan update --savings-plan-id
                                                           --savings-plan-order-id
                                                           [--applied-scope-prop]
                                                           [--applied-scope-type {ManagementGroup, Shared, Single}]
                                                           [--display-name]
                                                           [--renew {0, 1, f, false, n, no, t, true, y, yes}]
                                                           [--renew-properties]

Examples

Update display name

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --display-name "cliTest"

Update savings plan applied scope to "Shared"

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --applied-scope-type Shared

Update savings plan applied scope to "Single"

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --applied-scope-type Single --applied-scope-prop "{subscription-id:/subscriptions/30000000-aaaa-bbbb-cccc-200000000004}"

Update savings plan applied scope to "Single" resource group

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --applied-scope-type Single --applied-scope-prop "{subscription-id:/subscriptions/30000000-aaaa-bbbb-cccc-200000000004/resourceGroups/rgName}"

Update savings plan applied scope to "ManagementGroup"

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --applied-scope-type ManagementGroup --applied-scope-prop "{tenantId:10000000-aaaa-bbbb-cccc-20000000006,managementGroupId:/providers/Microsoft.Management/managementGroups/TestRg}"

Update savings plan renewal setting

az billing-benefits savings-plan-order savings-plan update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000017 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000019 --renew true --renew-properties "{purchase-properties:{applied-scope-type:Shared,billing-plan:P1M,billing-scope-id:/subscriptions/30000000-aaaa-bbbb-cccc-200000000015,commitment:{amount:10.0,currency-code:USD,grain:Hourly},display-name:name1,renew:true,term:P1Y,sku:Compute_Savings_Plan}}"

Required Parameters

--savings-plan-id

ID of the savings plan.

--savings-plan-order-id

Order ID of the savings plan.

Optional Parameters

--applied-scope-prop

Properties specific to applied scope type. Not required if not applicable. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--applied-scope-type

Type of the Applied Scope.

accepted values: ManagementGroup, Shared, Single
--display-name

Display name.

--renew

Setting this to true will automatically purchase a new benefit on the expiration date time.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
default value: False
--renew-properties

Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az billing-benefits savings-plan-order savings-plan validate-update

Validate savings plan patch.

az billing-benefits savings-plan-order savings-plan validate-update --savings-plan-id
                                                                    --savings-plan-order-id
                                                                    [--benefits]

Examples

Validate savings plan update request

az billing-benefits savings-plan-order savings-plan validate-update --savings-plan-order-id 30000000-aaaa-bbbb-cccc-200000000006 --savings-plan-id 30000000-aaaa-bbbb-cccc-200000000004 --benefits "[{applied-scope-type:Shared,display-name:name1}]"

Required Parameters

--savings-plan-id

ID of the savings plan.

--savings-plan-order-id

Order ID of the savings plan.

Optional Parameters

--benefits

Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.