az billing subscription

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Billing subscription.

Commands

Name Description Type Status
az billing subscription list

List the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.

Core Preview
az billing subscription move

Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

Core Preview
az billing subscription show

Get a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.

Core Preview
az billing subscription update

Update the properties of a billing subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

Core Preview
az billing subscription validate-move

Validate if a subscription's charges can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

Core Preview
az billing subscription wait

Place the CLI in a waiting state until a condition of the billing subscription is met.

Core Preview

az billing subscription list

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.

az billing subscription list --account-name
                             [--customer-name]
                             [--invoice-section-name]
                             [--profile-name]

Examples

List subscriptions for an invoice section

az billing subscription list --account-name "{billingAccountName}" --profile-name "{billingProfileName}" --invoice-section-name "{invoiceSectionName}"

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

Optional Parameters

--customer-name

The ID that uniquely identifies a customer.

--invoice-section-name

The ID that uniquely identifies an invoice section.

--profile-name

The ID that uniquely identifies a billing profile.

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 subscription move

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

az billing subscription move --account-name
                             --destination-invoice-section-id
                             [--no-wait]

Examples

Move a subscription to another invoice section

az billing subscription move --account-name "{billingAccountName}" --destination-invoice-section-id "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

--destination-invoice-section-id

The destination invoice section id.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

default value: False
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 subscription show

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.

az billing subscription show --account-name

Examples

Show the subscription information of a billing account

az billing subscription show --account-name "{billingAccountName}"

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

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 subscription update

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the properties of a billing subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

az billing subscription update --account-name
                               [--cost-center]
                               [--sku-id]
                               [--subscription-billing-status {Abandoned, Active, Deleted, Inactive, Warning}]

Examples

Update properties of a billing account

az billing subscription update --account-name "{billingAccountName}" --cost-center "ABC1234"

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

Optional Parameters

--cost-center

The cost center applied to the subscription.

--sku-id

The sku ID of the Azure plan for the subscription.

--subscription-billing-status

The current billing status of the subscription.

accepted values: Abandoned, Active, Deleted, Inactive, Warning
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 subscription validate-move

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Validate if a subscription's charges can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

az billing subscription validate-move --account-name
                                      --destination-invoice-section-id

Examples

Validate whether a move for subscription to another invoice section is valid or not

az billing subscription validate-move --account-name "{billingAccountName}" --destination-invoice-section-id "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"

Validate whether a move for subscription to another invoice section is valid or not

az billing subscription validate-move --account-name "{billingAccountName}" --destination-invoice-section-id "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

--destination-invoice-section-id

The destination invoice section id.

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 subscription wait

Preview

Command group 'billing subscription' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition of the billing subscription is met.

az billing subscription wait --account-name
                             [--created]
                             [--custom]
                             [--deleted]
                             [--exists]
                             [--interval]
                             [--timeout]
                             [--updated]

Examples

Pause executing next line of CLI script until the billing subscription is successfully created.

az billing subscription wait --account-name "{billingAccountName}" --created

Required Parameters

--account-name

The ID that uniquely identifies a billing account.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
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.