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.

Manage subscriptions.

Commands

az account subscription cancel

Cancel subscription.

az account subscription enable

Enable subscription.

az account subscription list

Get all subscriptions for a tenant.

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.

az account subscription rename

Rename subscription.

az account subscription show

Get details about a specified subscription.

az account subscription cancel

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

az account subscription enable

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.

az account subscription list

Get all subscriptions for a tenant.

az account subscription list

Examples

listSubscriptions

az account subscription list

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.

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.

az account subscription rename

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.

az account subscription show

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.