az storage entity

Manage table storage entities.

Commands

az storage entity delete

Deletes an existing entity in a table.

az storage entity insert

Insert an entity into a table.

az storage entity merge

Updates an existing entity by merging the entity's properties.

az storage entity query

List entities which satisfy a query.

az storage entity replace

Updates an existing entity in a table.

az storage entity show

Get an entity from the specified table.

az storage entity delete

Deletes an existing entity in a table.

Throws if the entity does not exist. When an entity is successfully deleted, the entity is immediately marked for deletion and is no longer accessible to clients. The entity is later removed from the Table service during garbage collection.

az storage entity delete --partition-key
                         --row-key
                         --table-name
                         [--account-key]
                         [--account-name]
                         [--connection-string]
                         [--if-match]
                         [--sas-token]
                         [--subscription]
                         [--timeout]

Required Parameters

--partition-key

The PartitionKey of the entity.

--row-key

The RowKey of the entity.

--table-name -t

The name of the table containing the entity to delete.

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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--if-match

The client may specify the ETag for the entity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The delete operation will be performed only if the ETag sent by the client matches the value maintained by the server, indicating that the entity has not been modified since it was retrieved by the client. To force an unconditional delete, set If-Match to the wildcard character (*).

--sas-token

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

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

az storage entity insert

Insert an entity into a table.

az storage entity insert --entity
                         --table-name
                         [--account-key]
                         [--account-name]
                         [--connection-string]
                         [--if-exists {fail, merge, replace}]
                         [--sas-token]
                         [--subscription]
                         [--timeout]

Examples

Insert an entity into a table. (autogenerated)

az storage entity insert --connection-string $connectionString --entity PartitionKey=AAA RowKey=BBB Content=ASDF2 --if-exists fail --table-name MyTable

Required Parameters

--entity -e

Space-separated list of key=value pairs. Must contain a PartitionKey and a RowKey.

--table-name -t

The name of the table to insert the entity into.

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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--if-exists

Behavior when an entity already exists for the specified PartitionKey and RowKey.

accepted values: fail, merge, replace
default value: fail
--sas-token

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

The server timeout, expressed in seconds.

az storage entity merge

Updates an existing entity by merging the entity's properties.

Throws if the entity does not exist. This operation does not replace the existing entity as the update_entity operation does. A property cannot be removed with merge_entity. Any properties with null values are ignored. All other properties will be updated or added.

az storage entity merge --entity
                        --table-name
                        [--account-key]
                        [--account-name]
                        [--connection-string]
                        [--if-match]
                        [--sas-token]
                        [--subscription]
                        [--timeout]

Required Parameters

--entity -e

The entity to merge. Could be a dict or an entity object. Must contain a PartitionKey and a RowKey.

--table-name -t

The name of the table containing the entity to merge.

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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--if-match

The client may specify the ETag for the entity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The merge operation will be performed only if the ETag sent by the client matches the value maintained by the server, indicating that the entity has not been modified since it was retrieved by the client. To force an unconditional merge, set If-Match to the wildcard character (*).

--sas-token

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

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

az storage entity query

List entities which satisfy a query.

az storage entity query --table-name
                        [--accept {full, minimal, none}]
                        [--account-key]
                        [--account-name]
                        [--connection-string]
                        [--filter]
                        [--marker]
                        [--num-results]
                        [--sas-token]
                        [--select]
                        [--subscription]
                        [--timeout]

Examples

List entities which satisfy a query. (autogenerated)

az storage entity query --table-name MyTable

Required Parameters

--table-name -t

The name of the table to query.

Optional Parameters

--accept

Specifies how much metadata to include in the response payload.

accepted values: full, minimal, none
default value: minimal
--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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--filter

Returns only entities that satisfy the specified filter. Note that no more than 15 discrete comparisons are permitted within a $filter string. See http://msdn.microsoft.com/en-us/library/windowsazure/dd894031.aspx for more information on constructing filters.

--marker

Space-separated list of key=value pairs. Must contain a nextpartitionkey and a nextrowkey.

--num-results

The maximum number of entities to return.

--sas-token

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

--select

Space-separated list of properties to return for each entity.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

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

az storage entity replace

Updates an existing entity in a table.

Throws if the entity does not exist. The update_entity operation replaces the entire entity and can be used to remove properties.

az storage entity replace --entity
                          --table-name
                          [--account-key]
                          [--account-name]
                          [--connection-string]
                          [--if-match]
                          [--sas-token]
                          [--subscription]
                          [--timeout]

Required Parameters

--entity -e

The entity to update. Could be a dict or an entity object. Must contain a PartitionKey and a RowKey.

--table-name -t

The name of the table containing the entity to update.

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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--if-match

The client may specify the ETag for the entity on the request in order to compare to the ETag maintained by the service for the purpose of optimistic concurrency. The update operation will be performed only if the ETag sent by the client matches the value maintained by the server, indicating that the entity has not been modified since it was retrieved by the client. To force an unconditional update, set If-Match to the wildcard character (*).

--sas-token

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

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

az storage entity show

Get an entity from the specified table.

Throws if the entity does not exist.

az storage entity show --partition-key
                       --row-key
                       --table-name
                       [--accept]
                       [--account-key]
                       [--account-name]
                       [--connection-string]
                       [--query-examples]
                       [--sas-token]
                       [--select]
                       [--subscription]
                       [--timeout]

Required Parameters

--partition-key

The PartitionKey of the entity.

--row-key

The RowKey of the entity.

--table-name -t

The name of the table to get the entity from.

Optional Parameters

--accept

Specifies the accepted content type of the response payload. See TablePayloadFormat for possible values.

default value: application/json;odata=minimalmetadata
--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.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--sas-token

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

--select

Space-separated list of properties to return for each entity.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

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