az neon postgres branch
Note
此参考是 Azure CLI(版本 2.75.0 或更高版本) 的 neon 扩展的一部分。 该扩展将在首次运行 az neon postgres branch 命令时自动安装。 了解更多关于扩展的信息。
管理 Neon Postgres 数据库中的分支。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az neon postgres branch create |
在 Neon Postgres 数据库中创建新分支。 |
Extension | GA |
| az neon postgres branch delete |
删除 Neon Postgres 数据库中的现有分支。 |
Extension | GA |
| az neon postgres branch list |
列出 Neon Postgres 中特定项目中的所有分支资源。 |
Extension | GA |
| az neon postgres branch show |
检索 Neon Postgres 数据库中特定分支的详细信息。 |
Extension | GA |
| az neon postgres branch update |
更新 Neon Postgres 数据库中现有分支的属性。 |
Extension | GA |
az neon postgres branch create
在 Neon Postgres 数据库中创建新分支。
az neon postgres branch create --branch-name --name
--organization-name
--project-name
--resource-group
[--database-name]
[--entity-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--parent-id]
[--role-name]
示例
创建分支
az neon postgres branch create --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --branch-name test-branch --entity-name test-branch --role-name test_role --database-name testneondb
必需参数
Neon 分支的名称。
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
Neon 项目的名称。
Azure 资源组的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
与分支关联的 Neon 数据库名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
资源的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
父分支的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
与分支关联的角色名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az neon postgres branch delete
删除 Neon Postgres 数据库中的现有分支。
az neon postgres branch delete [--branch-id]
[--ids]
[--organization-name]
[--project-id]
[--resource-group]
[--subscription]
[--yes]
示例
删除分支
az neon postgres branch delete --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
Neon 分支的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Neon 项目的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Azure 资源组的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az neon postgres branch list
列出 Neon Postgres 中特定项目中的所有分支资源。
az neon postgres branch list --organization-name
--project-id
--resource-group
[--max-items]
[--next-token]
示例
列出项目下的分支
az neon postgres branch list --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796
必需参数
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
Neon 项目的 ID。
Azure 资源组的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。
| 属性 | 值 |
|---|---|
| 参数组: | Pagination Arguments |
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
| 属性 | 值 |
|---|---|
| 参数组: | Pagination Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az neon postgres branch show
检索 Neon Postgres 数据库中特定分支的详细信息。
az neon postgres branch show [--branch-id]
[--ids]
[--organization-name]
[--project-id]
[--resource-group]
[--subscription]
示例
显示分支详细信息
az neon postgres branch show --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
Neon 分支的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Neon 项目的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Azure 资源组的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az neon postgres branch update
更新 Neon Postgres 数据库中现有分支的属性。
az neon postgres branch update [--add]
[--branch-name --name]
[--database-name]
[--entity-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--organization-name]
[--parent-id]
[--project-name]
[--remove]
[--resource-group]
[--role-name]
[--set]
[--subscription]
示例
更新分支
az neon postgres branch update --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --project-id old-frost-16758796 --branch-name test-branch --entity-name test-branch2 --role-name test_role --database-name testneondb
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
Neon 分支的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
与分支关联的 Neon 数据库名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
资源的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
父分支的 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
Neon 项目的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
Azure 资源组的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
与分支关联的角色名称。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |