Navigation

Update an Existing VPC Peering Connection

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

Syntax

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

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required. The unique identifier for the group.
PEER-ID Required.

Atlas assigned unique ID for the peering connection.

Note

This is separate from the vpc ID.

Request Query Parameters

Field Required/Optional Description
envelope Optional. A boolean that specifies whether or not to wrap the response in an envelope.

Request Body Parameters

The following parameters are required in the body of the request.

Parameter Required/Optional Description
routeTableCidrBlock Optional The peer VPC CIDR block or subnet.
awsAccountId Optional AWS account ID of the peer. If both awsAccountId and vpcId are specified, Atlas attempts to reinitialize the peering connection.
vpcId Optional VPC ID of the peer. If both vpcId and awsAccountId are specified, Atlas attempts to reinitialize the peering connection.

HTTP Response Elements

Field Description
id The peer ID.
routeTableCidrBlock The peer VPC CIDR block or subnet.
vpcId The ID of the peer VPC.
awsAccountId AWS account ID of the peer.
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

Example Request

curl -X PATCH -u 'username:apiKey' --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794dee37132bb7b/peers/1112222b3bf99403840e8934" \
   -H "Content-Type: application/json" --data '
   {
       "routeTableCidrBlock" : "10.15.0.0/24"
   }'

Example Response

{
   "awsAccountId" : "999900000000",
   "connectionId" : null,
   "errorStateName" : null,
   "id" : "1112222b3bf99403840e8934",
   "routeTableCidrBlock" : "10.15.0.0/16",
   "statusName" : "INITIATING",
   "vpcId" : "vpc-abc123abc123"
}