Navigation

Get a List of VPC Peering Connections

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project id. For existing groups, your group/project id remains the same. This page uses the more familiar term group. The endpoints are as stated on the page.

Base URL: https://cloud.mongodb.com/

Syntax

GET /api/atlas/v1.0/groups/{GROUP-ID}/peers

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required Group identifier.

Request Query Parameters

Field Required/Optional Description
pageNum Optional. The page to return.
itemsPerPage Optional. Maximum number of items to return per page. Default is 100.
envelope Optional. A boolean that specifies whether or not to wrap the response in an envelope.

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response Elements

The response includes a results array of peering connection information. Each connection information has the following fields:

Field Description
id
Atlas assigned unique ID for the connection. Only specific to and used by Atlas.
providerName The provider name; e.g. AWS.
routeTableCidrBlock The peer VPC CIDR block or subnet.
vpcId The ID of the peer VPC.
awsAccountId AWS account ID.
connectionId Connection ID.
statusName

The status.

The VPC peering connection status value can be one of the following:

  • INITIATING
  • PENDING_ACCEPTANCE
  • FAILED
  • FINALIZING
  • AVAILABLE
  • TERMINATING
errorStateName

The error state, if any.

The VPC peering connection error state value can be one of the following:

  • REJECTED
  • EXPIRED
  • INVALID_ARGUMENT
containerId The id of the Atlas VPC container for the AWS region.

Example Request

curl -X GET -u 'username:apiKey' --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794dee37132bb7b/peers"

Example Response

{
   "links": [ {
      "href" : "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794dee37132bb7b/peers?pageNum=1&itemsPerPage=100",
      "rel" : "self"
   } ],
   "results":[ {
      "awsAccountId" : "999900000000",
      "connectionId" : null,
      "errorStateName" : null,
      "id" : "1112222b3bf99403840e8934",
      "routeTableCidrBlock" : "10.15.0.0/16",
      "statusName" : "INITIATING",
      "vpcId" : "vpc-abc123abc123",
      "containerId" : "1112222b3bf99403840e8934"
   } ],
   "totalCount":1
}