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

az cosmosdb gremlin graph

注意

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

管理 Azure Cosmos DB Gremlin 图。

命令

名称 说明 类型 状态
az cosmosdb gremlin graph create

在 Azure Cosmos DB Gremlin 数据库下创建 Gremlin 图形。

核心 GA
az cosmosdb gremlin graph delete

删除 Azure Cosmos DB Gremlin 数据库下的 Gremlin 图形。

核心 GA
az cosmosdb gremlin graph exists

检查 Azure Cosmos DB Gremlin 图形是否存在。

核心 GA
az cosmosdb gremlin graph list

列出 Azure Cosmos DB Gremlin 数据库下的 Gremlin 图形。

核心 GA
az cosmosdb gremlin graph restore

在同一帐户中还原已删除的 gremlin 图形。

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

在同一帐户中还原已删除的 gremlin 图形。

扩展 预览
az cosmosdb gremlin graph show

显示 Azure Cosmos DB Gremlin 数据库下 Gremlin 图形的详细信息。

核心 GA
az cosmosdb gremlin graph throughput

在 Azure Cosmos DB 帐户下管理 Gremlin 图形的吞吐量。

核心 GA
az cosmosdb gremlin graph throughput migrate

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

核心 GA
az cosmosdb gremlin graph throughput show

获取 Azure Cosmos DB Gremlin 数据库下 Gremlin 图形的吞吐量。

核心 GA
az cosmosdb gremlin graph throughput update

更新 Azure Cosmos DB Gremlin 数据库下的 Gremlin 图形的吞吐量。

核心 GA
az cosmosdb gremlin graph update

在 Azure Cosmos DB Gremlin 数据库下更新 Gremlin 图形。

核心 GA

az cosmosdb gremlin graph create

在 Azure Cosmos DB Gremlin 数据库下创建 Gremlin 图形。

az cosmosdb gremlin graph create --account-name
                                 --database-name
                                 --name
                                 --partition-key-path
                                 --resource-group
                                 [--analytical-storage-ttl]
                                 [--conflict-resolution-policy]
                                 [--idx]
                                 [--max-throughput]
                                 [--throughput]
                                 [--ttl]

示例

创建 Azure Cosmos DB Gremlin 图形。

az cosmosdb gremlin graph create -g MyResourceGroup -a MyAccount -d MyDatabase -n MyGraph --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

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

--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/秒)。

--throughput

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

--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 gremlin graph delete

删除 Azure Cosmos DB Gremlin 数据库下的 Gremlin 图形。

az cosmosdb gremlin graph 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 gremlin graph exists

检查 Azure Cosmos DB Gremlin 图形是否存在。

az cosmosdb gremlin graph 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 gremlin graph list

列出 Azure Cosmos DB Gremlin 数据库下的 Gremlin 图形。

az cosmosdb gremlin graph 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 gremlin graph restore

在同一帐户中还原已删除的 gremlin 图形。

az cosmosdb gremlin graph restore --account-name
                                  --database-name
                                  --name
                                  --resource-group
                                  [--restore-timestamp]

示例

在同一帐户中还原已删除的 gremlin 图形。

az cosmosdb gremlin graph restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_graph_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

CosmosDB Gremlin 数据库名称的名称。

--name -n

CosmosDB Gremlin 图形名称的名称。

--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 gremlin graph restore (cosmosdb-preview 扩展)

预览

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

在同一帐户中还原已删除的 gremlin 图形。

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

示例

在同一帐户中还原已删除的 gremlin 图形。

az cosmosdb gremlin graph restore --resource-group resource_group --account-name database_account_name --database-name parent_database_name --name name_of_graph_needs_to_be_restored --restore-timestamp 2020-07-13T16:03:41+0000

必需参数

--account-name -a

Cosmosdb 帐户名称。

--database-name -d

CosmosDB Gremlin 数据库名称的名称。

--name -n

CosmosDB Gremlin 图形名称的名称。

--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 gremlin graph show

显示 Azure Cosmos DB Gremlin 数据库下 Gremlin 图形的详细信息。

az cosmosdb gremlin graph 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 gremlin graph update

在 Azure Cosmos DB Gremlin 数据库下更新 Gremlin 图形。

az cosmosdb gremlin graph 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

启用分析存储时的分析 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 获取完整的调试日志。