LinuxCommandLibrary

az-storage-table

Manage Azure Storage tables and entities

TLDR

Create a new table in the storage account

$ az storage table create --account-name [storage_account_name] [[-n|--name]] [table_name] --fail-on-exist
copy

Generate a shared access signature for the table
$ az storage table generate-sas --account-name [storage_account_name] [[-n|--name]] [table_name] --permissions [sas_permissions] --expiry [expiry_date] --https-only
copy

List tables in a storage account
$ az storage table list --account-name [storage_account_name]
copy

Delete the specified table and any data it contains
$ az storage table delete --account-name [storage_account_name] [[-n|--name]] [table_name] --fail-not-exist
copy

SYNOPSIS

az storage table { check | create | delete | entity | list | show | wait } [options]

PARAMETERS

--account-key
    Storage account access key.

--account-name
    Storage account name.

--auth-mode
    Auth mode: login, key, cli. Default: cli.

--connection-string
    Account connection string.

--sas-token
    Shared access signature (SAS) token.

--debug
    Show all debug logs.

--help -h
    Show help.

--only-show-errors
    Suppress warnings.

--output -o
    json, jsonc, table, tsv. Default: json.

--query
    JMESPath query string.

--subscription
    Subscription name or ID.

--verbose
    Increase logging verbosity.

--yes
    Skip confirmation prompts.

DESCRIPTION

az storage table is a command group in the Azure CLI for managing tables in Azure Table Storage, a NoSQL key-value store for structured data.

Azure Table Storage offers scalable, schemaless storage ideal for applications needing fast access to semi-structured data. This command enables creating, deleting, listing, and inspecting tables, plus entity operations like insert, update, merge, delete, and query via the entity subcommand.

Authentication supports storage account keys, SAS tokens, connection strings, or Azure AD via CLI login. It's designed for automation, scripting, DevOps pipelines, and interactive use. Supports output formats like JSON, table, TSV; JMESPath queries; and verbose/debug logging.

Requires Azure CLI 2.0+ installed. Integrates seamlessly with other az storage commands for blobs, queues, files.

CAVEATS

Requires Azure CLI 2.0+ and valid storage account access. Table names must be 3-63 chars, lowercase letters, numbers, hyphens. Not for production data without backups.

SUBCOMMANDS

check: Verify table exists.
create: Create table.
delete: Delete table.
entity: CRUD on entities.
list: List tables.
show: Table details.
wait: Poll until condition met.

EXAMPLE

az storage table create --name mytable --account-name mystorage --account-key key
az storage table list --account-name mystorage

HISTORY

Part of Azure CLI 2.0 (March 2017), evolved with storage service updates. Supports Table API 2019-07-07+.

SEE ALSO

az storage(1), az storage blob(1), az storage queue(1), az storage file(1)

Copied to clipboard