az config

Manage Azure CLI configuration.

Commands

az config get

Get a configuration.

az config param-persist

Manage parameter persistence.

az config param-persist delete

Delete parameter persistence data.

az config param-persist off

Turn off parameter persistence.

az config param-persist on

Turn on parameter persistence.

az config param-persist show

Show parameter persistence data.

az config set

Set a configuration.

az config unset

Unset a configuration.

az config get

Get a configuration.

az config get [--local]
              [<KEY>]

Examples

Get all configurations.

az config get

Get configurations in `core` section.

az config get core

Get the configuration of key `core.no_color`.

az config get core.no_color

Optional Parameters

--local

Include local configuration. Scan from the working directory up to the root drive, then the global configuration and return the first occurrence.

<KEY>

The configuration to get. If not provided, all sections and configurations will be listed. If section is provided, all configurations under the specified section will be listed. If <section>.<key> is provided, only the corresponding configuration is shown.

az config set

Set a configuration.

For available configuration options, see https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration. By default without specifying --local, the configuration will be saved to ~/.azure/config.

az config set [--local]
              [<KEY_VALUE>]

Examples

Disable color with `core.no_color`.

az config set core.no_color=true

Hide warnings and only show errors with `core.only_show_errors`.

az config set core.only_show_errors=true

Turn on client-side telemetry.

az config set core.collect_telemetry=true

Turn on file logging and set its location.

az config set logging.enable_log_file=true
az config set logging.log_dir=~/az-logs

Set the default location to `westus2` and default resource group to `myRG`.

az config set defaults.location=westus2 defaults.group=MyResourceGroup

Set the default resource group to `myRG` on a local scope.

az config set defaults.group=myRG --local

Optional Parameters

--local

Set as a local configuration in the working directory.

<KEY_VALUE>

Space-separated configurations in the form of

.=.

az config unset

Unset a configuration.

az config unset [--local]
                [<KEY>]

Examples

Unset the configuration of key `core.no_color`.

az config unset core.no_color

Optional Parameters

--local

Include local configuration. Scan from the working directory up to the root drive, then the global configuration and unset the first occurrence.

<KEY>

The configuration to unset, in the form of

..