Κοινή χρήση μέσω


az config

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

Manage Azure CLI configuration.

Available since Azure CLI 2.10.0.

Commands

Name Description Type Status
az config get

Get a configuration.

Core Experimental
az config param-persist

Manage parameter persistence.

Core Experimental
az config param-persist delete

Delete parameter persistence data.

Core Experimental
az config param-persist off

Turn off parameter persistence.

Core Experimental
az config param-persist on

Turn on parameter persistence.

Core Experimental
az config param-persist show

Show parameter persistence data.

Core Experimental
az config set

Set a configuration.

Core Experimental
az config unset

Unset a configuration.

Core Experimental

az config get

Experimental

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

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.

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

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 config set

Experimental

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

Set a configuration.

For available configuration options, see https://docs.microsoft.com/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.

Default value: False
<KEY_VALUE>

Space-separated configurations in the form of

.=.

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 config unset

Experimental

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

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.

Default value: False
<KEY>

The configuration to unset, in the form of

..

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.