az pipelines variable

Note

This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). The extension will automatically install the first time you run an az pipelines variable command. Learn more about extensions.

Manage pipeline variables.

Commands

Name Description Type Status
az pipelines variable create

Add a variable to a pipeline.

Extension GA
az pipelines variable delete

Delete a variable from pipeline.

Extension GA
az pipelines variable list

List the variables in a pipeline.

Extension GA
az pipelines variable update

Update a variable in a pipeline.

Extension GA

az pipelines variable create

Add a variable to a pipeline.

az pipelines variable create --name
                             [--allow-override {false, true}]
                             [--detect {false, true}]
                             [--org]
                             [--pipeline-id]
                             [--pipeline-name]
                             [--project]
                             [--secret {false, true}]
                             [--value]

Required Parameters

--name

Name of the variable.

Optional Parameters

--allow-override

Indicates whether the value can be set at queue time.

Accepted values: false, true
--detect

Automatically detect organization.

Accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--pipeline-id

Id of the pipeline.

--pipeline-name

Name of the pipeline. Ignored if --pipeline-id parameter is supplied.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--secret

Indicates whether the variable's value is a secret.

Accepted values: false, true
--value

Value of the variable. For secret variables, if --value parameter is not given, it will be picked from environment variable prefixed with AZURE_DEVOPS_EXT_PIPELINE_VAR_ or user will be prompted to enter it via standard input. e.g. A variable named MySecret can be input using environment variable AZURE_DEVOPS_EXT_PIPELINE_VAR_MySecret.

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 pipelines variable delete

Delete a variable from pipeline.

az pipelines variable delete --name
                             [--detect {false, true}]
                             [--org]
                             [--pipeline-id]
                             [--pipeline-name]
                             [--project]
                             [--yes]

Required Parameters

--name

Name of the variable to delete.

Optional Parameters

--detect

Automatically detect organization.

Accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--pipeline-id

Id of the pipeline.

--pipeline-name

Name of the pipeline.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--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 pipelines variable list

List the variables in a pipeline.

az pipelines variable list [--detect {false, true}]
                           [--org]
                           [--pipeline-id]
                           [--pipeline-name]
                           [--project]

Optional Parameters

--detect

Automatically detect organization.

Accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--pipeline-id

Id of the pipeline.

--pipeline-name

Name of the pipeline. Ignored if --pipeline-id parameter is supplied.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

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 pipelines variable update

Update a variable in a pipeline.

az pipelines variable update --name
                             [--allow-override {false, true}]
                             [--detect {false, true}]
                             [--new-name]
                             [--org]
                             [--pipeline-id]
                             [--pipeline-name]
                             [--project]
                             [--prompt-value {false, true}]
                             [--secret {false, true}]
                             [--value]

Required Parameters

--name

Name of the variable.

Optional Parameters

--allow-override

Indicates whether the value can be set at queue time.

Accepted values: false, true
--detect

Automatically detect organization.

Accepted values: false, true
--new-name

New name of the variable.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--pipeline-id

Id of the pipeline.

--pipeline-name

Name of the pipeline. Ignored if --pipeline-id parameter is supplied.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--prompt-value

Set it to True to update the value of a secret variable using environment variable or prompt via standard input.

Accepted values: false, true
--secret

If the value of the variable is a secret.

Accepted values: false, true
--value

New value of the variable. For secret variables, use --prompt-value parameter, to be prompted to enter it via standard input. For non-interactive consoles it can be picked from environment variable prefixed with AZURE_DEVOPS_EXT_PIPELINE_VAR_ e.g. A variable nameed MySecret can be input using environment variable AZURE_DEVOPS_EXT_PIPELINE_VAR_MySecret.

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.