In Neon, you can recover a 100 TB database in 1 second. No more fear of breaking production

Neon CLI commands — vpc

Use the Neon CLI to manage Neon directly from the terminal

Before you begin

  • Before running a vpc command, ensure that you have installed the Neon CLI.
  • If you have not authenticated with the neon auth command, running a Neon CLI command automatically launches the Neon CLI browser authentication process. Alternatively, you can specify a Neon API key using the --api-key option when running a command. See Connect.

The vpc command

You can use the vpc CLI command to manage Private Networking configurations in Neon.

The vpc command includes subcommands for managing VPC endpoints and project-level VPC endpoint restrictions.

SubcommandDescription
endpointManage VPC endpoints
projectManage project-level VPC endpoint restrictions

The vpc endpoint subcommand

The vpc endpoint subcommand lets you to list, assign, remove, and get the status of VPC endpoints for a Neon organization.

Usage

SubcommandDescription
listList configured VPC endpoints for the Neon organization.
assign <id>Add or update a VPC endpoint in the Neon organization. The ID is the VPC endpoint ID. Aliases for this command are add and update
remove <id>Remove a VPC endpoint from the Neon organization. The ID is the VPC endpoint ID.
status <id>Get the status of a VPC endpoint for the Neon organization. The ID is the VPC endpoint ID.

Options

In addition to the Neon CLI global options, the vpc endpoint subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--org-idOrganization IDstringOnly if the user has more than one organization. If not specified, and the user has only one organization, that org_id is used.
--region-idThe region ID. Possible values: aws-us-west-2, aws-ap-southeast-1, aws-ap-southeast-2, aws-eu-central-1, aws-us-east-2, aws-us-east-1, azure-eastus2stringyes

Examples

  • List VPC endpoints

    Retrieve a list of all configured VPC endpoints for a specific Neon organization.

    neon vpc endpoint list --org-id org-bold-bonus-12345678
  • Assign a VPC endpoint

    Add or update a VPC endpoint for a specific Neon organization and region.

    neon vpc endpoint assign vpc-12345678 --org-id org-bold-bonus-12345678 --region-id aws-us-east-1

    After assigning a VPC endpoint to a Neon organization, client connections will be accepted from the corresponding VPC for all projects in the Neon organization, unless restricted. Aliases for this command are add and update.

  • Remove a VPC endpoint

    Delete an existing VPC endpoint from a specific Neon organization.

    neon vpc endpoint remove vpc-12345678 --org-id org-bold-bonus-12345678
  • Get the status of a VPC endpoint

    Check the status of a specific VPC endpoint in a Neon organization.

    neon vpc endpoint status vpc-12345678 --org-id org-bold-bonus-12345678

The vpc project subcommand

The vpc project command lets you list, configure, or remove VPC endpoint restrictions for specific Neon projects.

Usage

SubcommandDescription
listList all VPC endpoint restrictions for a specific project.
restrict <id>Configure or update a VPC endpoint restriction for a project. The ID is the VPC endpoint ID. [Alias: update]
remove <id>Remove a VPC endpoint restriction from a project. The ID is the VPC endpoint ID.

Options

In addition to the Neon CLI global options, the vpc project subcommand supports these options:

OptionDescriptionTypeRequired
--context-fileContext file path and file namestring
--project-idThe Project ID.stringyes

Examples

  • List project-level VPC endpoint restrictions

    List all VPC endpoint restrictions for the specified Neon project.

    neon vpc project list --project-id orange-credit-12345678
  • Restrict connections to a specific VPC

    Configure or update a VPC endpoint restriction for a Neon project. The specified Neon project will not accept client connections from the VPC of specified VPC endpoint ID.

    neon vpc project restrict vpc-12345678 --project-id orange-credit-12345678
  • Remove a VPC endpoint restriction

    Remove a VPC endpoint restriction from a specific Neon project. This allows clients to connect from the VPC of the VPC endpoint ID to the specified Neon project.

    neon vpc project remove vpc-12345678 --project-id orange-credit-12345678

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more details, see Getting Support.

Last updated on

Was this page helpful?