mongocli atlas networking peering list
The networking peering list
command retrieves information about all
network peering connections for a given Atlas project.
Syntax
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.
Options
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
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:
If omitted, defaults to | no |
Output
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:
Example
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
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 JSON format.
mongocli atlas networking peering list --output json
The previous command prints the following to the terminal in JSON format.
[ { "awsAccountId": "<aws-account-id>", "connectionId": "<aws-peering-connection-id>", "containerId": "5f4eb2178c9ff67e809a3619", "id": "5f60c6040948295c09356649", "routeTableCidrBlock": "10.0.0.0/24", "statusName": "AVAILABLE", "vpcId": "<aws-vpc-id>" } ]