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

az cosmosdb sql container

注意

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

管理 Azure Cosmos DB SQL 容器。

命令

名称 说明 类型 状态
az cosmosdb sql container create

在 Azure Cosmos DB SQL 数据库下创建 SQL 容器。

核心 GA
az cosmosdb sql container create (cosmosdb-preview 扩展)

在 Azure Cosmos DB SQL 数据库下创建 SQL 容器。

扩展 GA
az cosmosdb sql container delete

删除 Azure Cosmos DB SQL 数据库下的 SQL 容器。

核心 GA
az cosmosdb sql container exists

检查 Azure Cosmos DB SQL 容器是否存在。

核心 GA
az cosmosdb sql container list

列出 Azure Cosmos DB SQL 数据库下的 SQL 容器。

核心 GA
az cosmosdb sql container merge

合并 sql 容器的分区。

扩展 预览
az cosmosdb sql container redistribute-partition-throughput

重新分发 sql 容器的分区吞吐量。

扩展 预览
az cosmosdb sql container restore

在同一帐户中还原已删除的 sql 容器。

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

在同一帐户中还原已删除的 sql 容器。

扩展 预览
az cosmosdb sql container retrieve-partition-throughput

检索 sql 容器的分区吞吐量。

扩展 预览
az cosmosdb sql container show

显示 Azure Cosmos DB SQL 数据库下 SQL 容器的详细信息。

核心 GA
az cosmosdb sql container throughput

在 Azure Cosmos DB 帐户下管理 SQL 容器的吞吐量。

核心 GA
az cosmosdb sql container throughput migrate

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

核心 GA
az cosmosdb sql container throughput show

获取 Azure Cosmos DB SQL 数据库下的 SQL 容器的吞吐量。

核心 GA
az cosmosdb sql container throughput update

更新 Azure Cosmos DB SQL 数据库下的 SQL 容器的吞吐量。

核心 GA
az cosmosdb sql container update

更新 Azure Cosmos DB SQL 数据库下的 SQL 容器。

核心 GA
az cosmosdb sql container update (cosmosdb-preview 扩展)

更新 Azure Cosmos DB SQL 数据库下的 SQL 容器。

扩展 GA

az cosmosdb sql container create

在 Azure Cosmos DB SQL 数据库下创建 SQL 容器。

az cosmosdb sql container create --account-name
                                 --database-name
                                 --name
                                 --partition-key-path
                                 --resource-group
                                 [--analytical-storage-ttl]
                                 [--cep]
                                 [--conflict-resolution-policy]
                                 [--idx]
                                 [--max-throughput]
                                 [--partition-key-version]
                                 [--throughput]
                                 [--ttl]
                                 [--unique-key-policy]

示例

创建 Azure Cosmos DB SQL 容器。

az cosmosdb sql container create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyContainer --partition-key-path "/my/path" --idx @policy-file.json --ttl 1000 --throughput "700"

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--partition-key-path -p

分区键路径,例如“/address/zipcode”。

--resource-group -g

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

可选参数

--analytical-storage-ttl -t

启用分析存储时的分析 TTL。

--cep

客户端加密策略,可以将其输入为字符串或文件,例如 --cep 或 --cep @policy-file.json “{”includedPaths“: [{”path“: ”/path1“,”clientEncryptionKeyId“: ”key1“,”encryptionAlgorithm“: ”AEAD_AES_256_CBC_HMAC_SHA256“,”encryptionType“: ”Deterministic“}],”policyFormatVersion“: 2}”。

--conflict-resolution-policy -c

冲突解决策略可以输入为字符串或文件,例如 --conflict-resolution-policy 或 --conflict-resolution-policy @policy-file.json “{”mode“: ”lastWriterWins“, ”conflictResolutionPath“: ”/path“}”。

--idx

索引策略,可以将其输入为字符串或文件, 例如,--idx 或 --idx @policy-file.json “{”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}]}”。

默认值: { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] }
--max-throughput

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

--partition-key-version

分区键的版本。

--throughput

SQL 容器(RU/s)的吞吐量。 默认值为 400。 如果数据库具有共享吞吐量,则省略此参数,除非容器应具有专用吞吐量。

--ttl

默认 TTL。 如果值缺失或设置为“-1”,则项目不会过期。 如果该值设置为“n”,则项目将在上次修改时间后过期“n”秒。

--unique-key-policy -u

唯一密钥策略,可以将其输入为字符串或文件,例如 --unique-key-policy 或 --unique-key-policy @policy-file.json “{”uniqueKeys“: [{”path“: [”/path/to/key1“]}, {”path“: [”/path/to/key2“]}”。

全局参数
--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 sql container create (cosmosdb-preview 扩展)

在 Azure Cosmos DB SQL 数据库下创建 SQL 容器。

az cosmosdb sql container create --account-name
                                 --database-name
                                 --name
                                 --partition-key-path
                                 --resource-group
                                 [--analytical-storage-ttl]
                                 [--cep]
                                 [--conflict-resolution-policy]
                                 [--idx]
                                 [--materialized-view-definition]
                                 [--max-throughput]
                                 [--partition-key-version]
                                 [--throughput]
                                 [--ttl]
                                 [--unique-key-policy]

示例

创建 Azure Cosmos DB SQL 容器。

az cosmosdb sql container create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyContainer --partition-key-path "/my/path" --idx @policy-file.json --ttl 1000 --throughput "700"

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--partition-key-path -p

分区键路径,例如“/address/zipcode”。

--resource-group -g

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

可选参数

--analytical-storage-ttl -t

启用分析存储时的分析 TTL。

--cep

客户端加密策略,可以将其输入为字符串或文件,例如 --cep 或 --cep @policy-file.json “{ ”includedPaths“: [{”path“: ”/path1“,”clientEncryptionKeyId“: ”key1“,”encryptionAlgorithm“: ”AEAD_AES_256_CBC_HMAC_SHA256“,”encryptionType“: ”Deterministic“}], ”policyFormatVersion“: 2}”。

--conflict-resolution-policy -c

冲突解决策略可以输入为字符串或文件,例如 --conflict-resolution-policy 或 --conflict-resolution-policy @policy-file.json “{ ”mode“: ”lastWriterWins“, ”conflictResolutionPath“: ”/path“ }”。

--idx

索引策略,可以将其输入为字符串或文件, 例如,--idx 或 --idx @policy-file.json “{ ”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}] }”。

默认值: { "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] }
--materialized-view-definition -m

具体化视图定义,可以将其输入为字符串或文件,例如 --materialized-view-definition 或 --materialized-view-definition @materializedview-definition-file.json -m '{ “sourceCollectionId”: “MySourceCollectionName”, “definition”: “标准版LECT * FROM root r”}”。

--max-throughput

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

--partition-key-version

分区键的版本。

--throughput

SQL 容器(RU/s)的吞吐量。 默认值为 400。 如果数据库具有共享吞吐量,则省略此参数,除非容器应具有专用吞吐量。

--ttl

默认 TTL。 如果值缺失或设置为“-1”,则项目不会过期。 如果该值设置为“n”,则项目将在上次修改时间后过期“n”秒。

--unique-key-policy -u

唯一密钥策略,可以将其输入为字符串或文件,例如 --unique-key-policy 或 --unique-key-policy @policy-file.json “{ ”uniqueKeys“: [{”path“: [”/path/to/key1“]}, {”path“: [”/path/to/key2“]}] }”。

全局参数
--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 sql container delete

删除 Azure Cosmos DB SQL 数据库下的 SQL 容器。

az cosmosdb sql container delete --account-name
                                 --database-name
                                 --name
                                 --resource-group
                                 [--yes]

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--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 sql container exists

检查 Azure Cosmos DB SQL 容器是否存在。

az cosmosdb sql container exists --account-name
                                 --database-name
                                 --name
                                 --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--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 sql container list

列出 Azure Cosmos DB SQL 数据库下的 SQL 容器。

az cosmosdb sql container list --account-name
                               --database-name
                               --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--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 sql container merge

预览

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

合并 sql 容器的分区。

az cosmosdb sql container merge --account-name
                                --database-name
                                --name
                                --resource-group

示例

容器 my-container 的合并分区

az cosmosdb sql container merge -g my-resource-group -a my-account -d my-db --name my-container

必需参数

--account-name -a

CosmosDB 数据库帐户的名称。

--database-name -d

CosmosDB 数据库名称的名称。

--name -n

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 sql container redistribute-partition-throughput

预览

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

重新分发 sql 容器的分区吞吐量。

az cosmosdb sql container redistribute-partition-throughput --account-name
                                                            --database-name
                                                            --name
                                                            --resource-group
                                                            [--evenly-distribute {false, true}]
                                                            [--source-partition-info]
                                                            [--target-partition-info]

示例

在所有物理分区之间均匀分配 sql 容器的分区吞吐量

az cosmosdb sql container redistribute-partition-throughput --account-name account_name --database-name db_name --name container_name  --resource-group rg_name --evenly-distribute

将 sql 容器的分区吞吐量从源分区重新分发到目标分区

az cosmosdb sql container redistribute-partition-throughput --account-name account_name --database-name db_name --name container_name  --resource-group rg_name --target-partition-info 8=1200 6=1200]' --source-partition-info 9]'

必需参数

--account-name -a

CosmosDB 数据库帐户的名称。

--database-name -d

CosmosDB 数据库名称的名称。

--name -n

CosmosDB 集合的名称。

--resource-group -g

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

可选参数

--evenly-distribute

切换为在所有物理分区之间平均分配吞吐量。

接受的值: false, true
默认值: False
--source-partition-info

空格分隔的源物理分区 ID,例如:1 2。

默认值: []
--target-partition-info

有关所需目标物理分区吞吐量的信息,例如:0=1200 1=1200。

默认值: []
全局参数
--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 sql container restore

在同一帐户中还原已删除的 sql 容器。

az cosmosdb sql container restore --account-name
                                  --database-name
                                  --name
                                  --resource-group
                                  [--restore-timestamp]

示例

在同一帐户中还原已删除的 sql 容器。

az cosmosdb sql container restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_container_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--resource-group -g

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

可选参数

--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 sql container restore (cosmosdb-preview 扩展)

预览

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

在同一帐户中还原已删除的 sql 容器。

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

示例

在同一帐户中还原已删除的 sql 容器。

az cosmosdb sql container restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_container_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--resource-group -g

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

可选参数

--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 sql container retrieve-partition-throughput

预览

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

检索 sql 容器的分区吞吐量。

az cosmosdb sql container retrieve-partition-throughput --account-name
                                                        --database-name
                                                        --name
                                                        --resource-group
                                                        [--all-partitions {false, true}]
                                                        [--physical-partition-ids]

示例

检索特定物理分区的容器container_name吞吐量

az cosmosdb sql container retrieve-partition-throughput --account-name account_name --database-name db_name --name container_name  --resource-group rg_name --physical-partition-ids 8 9

检索所有物理分区的容器container_name吞吐量

az cosmosdb sql container retrieve-partition-throughput --account-name account_name --database-name db_name --name container_name  --resource-group rg_name --all-partitions

必需参数

--account-name -a

CosmosDB 数据库帐户的名称。

--database-name -d

CosmosDB 数据库名称的名称。

--name -n

CosmosDB 容器的名称。

--resource-group -g

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

可选参数

--all-partitions

切换到检索所有物理分区的吞吐量。

接受的值: false, true
默认值: False
--physical-partition-ids -p

物理分区 ID 的空间分隔列表。

默认值: []
全局参数
--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 sql container show

显示 Azure Cosmos DB SQL 数据库下 SQL 容器的详细信息。

az cosmosdb sql container show --account-name
                               --database-name
                               --name
                               --resource-group

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--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 sql container update

更新 Azure Cosmos DB SQL 数据库下的 SQL 容器。

az cosmosdb sql container update --account-name
                                 --database-name
                                 --name
                                 --resource-group
                                 [--analytical-storage-ttl]
                                 [--idx]
                                 [--ttl]

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--resource-group -g

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

可选参数

--analytical-storage-ttl -t

启用分析存储时的分析 TTL。

--idx

索引策略,可以将其输入为字符串或文件, 例如,--idx 或 --idx @policy-file.json “{”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}]}”。

--ttl

默认 TTL。 如果值缺失或设置为“-1”,则项目不会过期。 如果该值设置为“n”,则项目将在上次修改时间后过期“n”秒。

全局参数
--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 sql container update (cosmosdb-preview 扩展)

更新 Azure Cosmos DB SQL 数据库下的 SQL 容器。

az cosmosdb sql container update --account-name
                                 --database-name
                                 --name
                                 --resource-group
                                 [--analytical-storage-ttl]
                                 [--idx]
                                 [--materialized-view-definition]
                                 [--ttl]

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

数据库名称。

--name -n

容器名称。

--resource-group -g

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

可选参数

--analytical-storage-ttl -t

启用分析存储时的分析 TTL。

--idx

索引策略,可以将其输入为字符串或文件, 例如,--idx 或 --idx @policy-file.json “{ ”indexingMode“: ”consistent“, ”automatic“: true, ”includedPaths“: [{”path“: ”/*“}], ”excludedPaths“: [{ ”path“: ”/headquarters/employees/?“}, { ”path“: ”/\“_etag\”/?“}] }”。

--materialized-view-definition -m

具体化视图定义,可以将其输入为字符串或文件,例如 --materialized-view-definition 或 --materialized-view-definition @materializedview-definition-file.json -m '{ “sourceCollectionId”: “MySourceCollectionName”, “definition”: “标准版LECT * FROM root r”}”。

--ttl

默认 TTL。 如果值缺失或设置为“-1”,则项目不会过期。 如果该值设置为“n”,则项目将在上次修改时间后过期“n”秒。

全局参数
--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 获取完整的调试日志。