שתף באמצעות


az account subscription

Note

This reference is part of the account extension for the Azure CLI (version 2.38.0 or higher). The extension will automatically install the first time you run an az account subscription command. Learn more about extensions.

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

Manage subscriptions.

Commands

Name Description Type Status
az account subscription cancel

Cancel subscription.

Extension Experimental
az account subscription enable

Enable subscription.

Extension Experimental
az account subscription list

Get all subscriptions for a tenant.

Extension Experimental
az account subscription list-location

This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.

Extension Experimental
az account subscription rename

Rename subscription.

Extension Experimental
az account subscription show

Get details about a specified subscription.

Extension Experimental

az account subscription cancel

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Cancel subscription.

az account subscription cancel --id
                               [--yes]

Examples

Cancel subscription

az account subscription cancel --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Required Parameters

--id --subscription-id

Subscription Id.

Optional Parameters

--yes -y

Do not prompt for confirmation.

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 account subscription enable

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Enable subscription.

az account subscription enable --id

Examples

Enable subscription

az account subscription enable --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Required Parameters

--id --subscription-id

Subscription 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 account subscription list

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get all subscriptions for a tenant.

az account subscription list

Examples

listSubscriptions

az account subscription list
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 account subscription list-location

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.

az account subscription list-location --id

Examples

listLocations

az account subscription list-location --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Required Parameters

--id --subscription-id

The ID of the target subscription.

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 account subscription rename

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Rename subscription.

az account subscription rename --id
                               [--name]

Examples

Rename subscription

az account subscription rename --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Required Parameters

--id --subscription-id

Subscription Id.

Optional Parameters

--name --subscription-name -n

New subscription name.

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 account subscription show

Experimental

Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get details about a specified subscription.

az account subscription show --id

Examples

getSubscription

az account subscription show --subscription-id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Required Parameters

--id --subscription-id

The ID of the target subscription.

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.