az neon postgres project
Note
此参考是 Azure CLI(版本 2.75.0 或更高版本) 的 neon 扩展的一部分。 该扩展将在首次运行 az neon postgres 项目 命令时自动安装。 了解更多关于扩展的信息。
管理 Neon 项目,包括列出、创建、更新、删除和检索项目信息。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az neon postgres project create |
在 Azure 中创建新的 Neon 项目资源。 |
Extension | GA |
| az neon postgres project delete |
删除 Azure 中的现有 Neon 项目资源。 |
Extension | GA |
| az neon postgres project get-connection-uri |
检索特定 Neon Postgres 数据库的连接 URI。 |
Extension | GA |
| az neon postgres project list |
列出与特定 Neon 组织关联的所有 Neon 项目。 |
Extension | GA |
| az neon postgres project show |
检索特定 Neon 项目资源的详细信息。 |
Extension | GA |
| az neon postgres project update |
更新 Azure 中现有 Neon 项目资源的属性。 |
Extension | GA |
az neon postgres project create
在 Azure 中创建新的 Neon 项目资源。
az neon postgres project create --organization-name
--resource-group
[--branch]
[--name --project-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--pg-version]
[--region]
示例
创建 Neon 项目
az neon postgres project create --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 17 --branch "{branch-name:main, role-name:owner_role,database-name:neondb}"
必需参数
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
Azure 资源组的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
项目的 Branch 属性。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
Neon 项目的名称。
| 属性 | 值 |
|---|---|
| 默认值: | Default-Project |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
Neon 数据库的 PostgreSQL 版本,默认值为 17。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
| 默认值: | 17 |
创建项目的区域。
| 属性 | 值 |
|---|---|
| 参数组: | 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 project delete
删除 Azure 中的现有 Neon 项目资源。
az neon postgres project delete [--ids]
[--organization-name]
[--project-id]
[--resource-group]
[--subscription]
[--yes]
示例
删除 Neon 项目
az neon postgres project delete --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 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 project get-connection-uri
检索特定 Neon Postgres 数据库的连接 URI。
az neon postgres project get-connection-uri [--branch-id]
[--database-name]
[--endpoint-id]
[--ids]
[--is-pooled {0, 1, f, false, n, no, t, true, y, yes}]
[--organization-name]
[--project-id]
[--project-name]
[--resource-group]
[--role-name]
[--subscription]
示例
获取数据库连接 URI
az neon postgres project get-connection-uri --resource-group rgneon --organization-name test-org --project-name entity-name --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr --database-name neondb --role-name owner_role --endpoint-id ep-purple-voice-a84wphbw --is-pooled false
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
与此连接关联的分支 ID。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters Arguments |
与此连接关联的数据库名称。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters Arguments |
具有此连接的终结点 ID。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
指示连接是否已入池。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
与此连接关联的项目 ID。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters Arguments |
Neon 项目的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Azure 资源组的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
用于身份验证的角色名称。
| 属性 | 值 |
|---|---|
| 参数组: | ConnectionUriParameters 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 project list
列出与特定 Neon 组织关联的所有 Neon 项目。
az neon postgres project list --organization-name
--resource-group
[--max-items]
[--next-token]
示例
列出组织中的 Neon 项目
az neon postgres project list --resource-group rgneon --organization-name org-cli-test
必需参数
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
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 project show
检索特定 Neon 项目资源的详细信息。
az neon postgres project show [--ids]
[--organization-name]
[--project-id]
[--resource-group]
[--subscription]
示例
显示 Neon 项目 Deatils
az neon postgres project show --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 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 project update
更新 Azure 中现有 Neon 项目资源的属性。
az neon postgres project update [--add]
[--branch]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name --project-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--organization-name]
[--pg-version]
[--region]
[--remove]
[--resource-group]
[--set]
[--subscription]
示例
Neon 项目更新
az neon postgres project update --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 18
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
项目的 Branch 属性。 这是可选的支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| 参数组: | 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 |
Neon 项目的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
Neon 组织的名称。 如果值为空,则从 tty 中询问该值。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
项目的 Postgres 版本。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
在其中创建项目的区域。
| 属性 | 值 |
|---|---|
| 参数组: | Properties Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| 参数组: | Generic Update Arguments |
Azure 资源组的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id 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 |