Navigation

mongocli atlas networking peering list

The networking peering list command retrieves information about all network peering connections for a given Atlas project.

mongocli atlas networking peering list|ls
[ --output|-o <output-format> ]
[ --page <page-number> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]
[ --providerName <cloud-provider-name> ]
Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--page
integer
Page number.
no
--profile, -P
string
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no
--providerName
string

Cloud provider for this VPC peering connection. Accepted values are:

  • AWS
  • Azure
  • GCP.

If omitted, defaults to AWS.

no

If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

ID STATUS CONTAINER ID
<peering-connection-1-id> <peering-connection-1-status> <network-container-1-id>
<peering-connection-2-id> <peering-connection-2-status> <network-container-2-id>

The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the Public API reference for your MongoDB service:

The following command retrieves network peering connections for a project using the default profile, which contains credentials and the project ID. The output is returned in the default format.

mongocli atlas networking peering list

The previous command prints the following to the terminal.

ID STATUS CONTAINER ID
5f60c6040948295c09356649 AVAILABLE 5f4eb2178c9ff67e809a3619
Give Feedback