你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az cosmosdb table

注意

此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 详细了解扩展。

管理 Azure Cosmos DB 帐户的表资源。

命令

名称 说明 类型 状态
az cosmosdb table create

在 Azure Cosmos DB 帐户下创建表。

核心 GA
az cosmosdb table delete

删除 Azure Cosmos DB 帐户下的表。

核心 GA
az cosmosdb table exists

检查 Azure Cosmos DB 表是否存在。

核心 GA
az cosmosdb table list

列出 Azure Cosmos DB 帐户下的表。

核心 GA
az cosmosdb table restorable-resource

在给定时间戳和区域中管理可在给定帐户中还原的表。

核心和扩展 GA
az cosmosdb table restorable-resource list

列出可在给定时间戳和区域中的给定帐户中还原的所有表。

核心 GA
az cosmosdb table restorable-resource list (cosmosdb-preview 扩展)

列出可在给定时间戳和区域中的给定帐户中还原的所有表。

扩展 预览
az cosmosdb table restorable-table

管理 Azure Cosmos DB 帐户中可还原的不同版本的表。

核心和扩展 GA
az cosmosdb table restorable-table list

列出在给定的可还原帐户中创建/修改/删除的所有表的所有版本。

核心 GA
az cosmosdb table restorable-table list (cosmosdb-preview 扩展)

列出在给定的可还原帐户中创建/修改/删除的所有表的所有版本。

扩展 预览
az cosmosdb table restore

在同一帐户中还原已删除的表。

核心 GA
az cosmosdb table restore (cosmosdb-preview 扩展)

在同一帐户中还原已删除的表。

扩展 预览
az cosmosdb table retrieve-latest-backup-time

检索给定区域中给定表的最新可还原时间戳。

核心 GA
az cosmosdb table retrieve-latest-backup-time (cosmosdb-preview 扩展)

检索给定区域中给定表的最新可还原时间戳。

扩展 预览
az cosmosdb table show

显示 Azure Cosmos DB 帐户下表的详细信息。

核心 GA
az cosmosdb table throughput

在 Azure Cosmos DB 帐户下管理表的吞吐量。

核心 GA
az cosmosdb table throughput migrate

在自动缩放和手动预配之间迁移表的吞吐量。

核心 GA
az cosmosdb table throughput show

获取 Azure Cosmos DB 帐户下表的吞吐量。

核心 GA
az cosmosdb table throughput update

更新 Azure Cosmos DB 帐户下表的吞吐量。

核心 GA

az cosmosdb table create

在 Azure Cosmos DB 帐户下创建表。

az cosmosdb table create --account-name
                         --name
                         --resource-group
                         [--max-throughput]
                         [--throughput]

必需参数

--account-name -a

Cosmosdb 帐户名称。

--name -n

表名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

--max-throughput

最大吞吐量资源可以扩展到 (RU/秒)。 在启用资源自动缩放时提供。 最小值可以为 4000 (RU/秒)。

--throughput

表(RU/秒)的吞吐量。 默认值为 400。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table delete

删除 Azure Cosmos DB 帐户下的表。

az cosmosdb table delete --account-name
                         --name
                         --resource-group
                         [--yes]

必需参数

--account-name -a

Cosmosdb 帐户名称。

--name -n

表名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

可选参数

--yes -y

不提示确认。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table exists

检查 Azure Cosmos DB 表是否存在。

az cosmosdb table exists --account-name
                         --name
                         --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--name -n

表名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table list

列出 Azure Cosmos DB 帐户下的表。

az cosmosdb table list --account-name
                       --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table restore

在同一帐户中还原已删除的表。

az cosmosdb table restore --account-name
                          --resource-group
                          --table-name
                          [--restore-timestamp]

示例

在同一帐户中还原已删除的表。

az cosmosdb table restore --resource-group resource_group --account-name database_account_name --table-name name_of_table_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--table-name -n

CosmosDB 表名称的名称。

可选参数

--restore-timestamp -t

表需要还原到的时间戳。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table restore (cosmosdb-preview 扩展)

预览

此命令处于预览阶段,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

在同一帐户中还原已删除的表。

az cosmosdb table restore --account-name
                          --resource-group
                          --table-name
                          [--disable-ttl {false, true}]
                          [--restore-timestamp]

示例

在同一帐户中还原已删除的表。

az cosmosdb table restore --resource-group resource_group --account-name database_account_name --table-name name_of_table_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--table-name -n

CosmosDB 表名称的名称。

可选参数

--disable-ttl
预览

禁用或禁用 ttl 还原。

接受的值: false, true
--restore-timestamp -t

表需要还原到的时间戳。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table retrieve-latest-backup-time

检索给定区域中给定表的最新可还原时间戳。

az cosmosdb table retrieve-latest-backup-time --account-name
                                              --location
                                              --resource-group
                                              --table-name

必需参数

--account-name -a

CosmosDB 数据库帐户的名称。

--location -l

帐户的位置。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--table-name -n

CosmosDB 表名称的名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table retrieve-latest-backup-time (cosmosdb-preview 扩展)

预览

此命令处于预览阶段,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

检索给定区域中给定表的最新可还原时间戳。

az cosmosdb table retrieve-latest-backup-time --account-name
                                              --location
                                              --resource-group
                                              --table-name

必需参数

--account-name -a

CosmosDB 数据库帐户的名称。

--location -l

帐户的位置。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--table-name -n

CosmosDB 表名称的名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az cosmosdb table show

显示 Azure Cosmos DB 帐户下表的详细信息。

az cosmosdb table show --account-name
                       --name
                       --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--name -n

表名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。