Share via


az storage blob tag

Note

This reference is part of the storage-blob-preview extension for the Azure CLI (version 2.27.0 or higher). The extension will automatically install the first time you run an az storage blob tag command. Learn more about extensions.

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

Manage blob tags.

Commands

Name Description Type Status
az storage blob tag list

Get tags on a blob or specific blob version, or snapshot.

Extension Preview
az storage blob tag set

Set tags on a blob or specific blob version, but not snapshot.

Extension Preview

az storage blob tag list

Preview

Command group 'storage blob tag' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get tags on a blob or specific blob version, or snapshot.

az storage blob tag list [--account-key]
                         [--account-name]
                         [--auth-mode {key, login}]
                         [--blob-endpoint]
                         [--blob-url]
                         [--connection-string]
                         [--container-name]
                         [--name]
                         [--sas-token]
                         [--snapshot]
                         [--tags-condition]
                         [--timeout]
                         [--version-id]

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--blob-url

The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current location_mode.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--container-name -c

The container name.

--name -n

The blob name.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--snapshot

The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.

--tags-condition

Specify a SQL where clause on blob tags to operate only on blobs with a matching value.

--timeout

Request timeout in seconds. Applies to each call to the service.

--version-id

An optional blob version ID. This parameter is only for versioning enabled account.

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 storage blob tag set

Preview

Command group 'storage blob tag' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Set tags on a blob or specific blob version, but not snapshot.

Each call to this operation replaces all existing tags attached to the blob. To remove all tags from the blob, call this operation with no tags set.

az storage blob tag set --tags
                        [--account-key]
                        [--account-name]
                        [--auth-mode {key, login}]
                        [--blob-endpoint]
                        [--blob-url]
                        [--connection-string]
                        [--container-name]
                        [--name]
                        [--sas-token]
                        [--tags-condition]
                        [--timeout]
                        [--version-id]

Required Parameters

--tags
Preview

Space-separated tags: key[=value] [key[=value] ...]. Tags are case-sensitive. The tag set may contain at most 10 tags. Tag keys must be between 1 and 128 characters, and tag values must be between 0 and 256 characters. Valid tag key and value characters include: lowercase and uppercase letters, digits (0-9), space ( ), plus (+), minus (-), period (.), solidus (/), colon (:), equals (=), underscore (_).

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--blob-url

The full endpoint URL to the Blob, including SAS token and snapshot if used. This could be either the primary endpoint, or the secondary endpoint depending on the current location_mode.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--container-name -c

The container name.

--name -n

The blob name.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--tags-condition

Specify a SQL where clause on blob tags to operate only on blobs with a matching value.

--timeout

Request timeout in seconds. Applies to each call to the service.

--version-id

An optional blob version ID. This parameter is only for versioning enabled account.

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.