Update a Container


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. The resource and corresponding endpoints use the term groups.

Base URL:


PATCH /api/atlas/v1.0/groups/{GROUP-ID}/containers/{CONTAINER-ID}

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required. The unique identifier for the project.
CONTAINER-ID Required. The identifier for the container.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pretty boolean Displays response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

Parameter Required/Optional Description
atlasCidrBlock Required.

Atlas CIDR block.

Atlas uses the specified CIDR block for all other VPC peering connections created in the project.

The Atlas CIDR block must be at least a /24 and at most a /21 in one of the following private networks.

  • - (10/8 prefix)
  • - (172.16/12 prefix)
  • - (192.168/16 prefix)

Atlas locks this value if an M10+ cluster or a VPC peering connection already exists. To modify the CIDR block, ensure there are no M10+ clusters in the project and no other VPC peering connections in the project. Alternatively, create a new project and create a VPC Peering Connection to set the desired Atlas VPC CIDR block for that project.


Atlas limits the number of MongoDB nodes per VPC based on the CIDR block and the region selected for the project. For example, a project in an AWS region supporting 3 availability zones and a Atlas CIDR VPC block of /24 is limited to the equivalent of 27 3-node replica sets.

Contact MongoDB Support for any questions on Atlas limits of MongoDB nodes per VPC.

providerName Required. The provider name. Specify AWS.
regionName Required. AWS region name.

HTTP Response Elements

Field Description
id The container ID.
providerName Provider name; e.g. AWS.
atlasCidrBlock The Atlas CIDR block.
regionName AWS region.
vpcId The ID of the peer VPC.
isProvisioned Flag that indicates if the project has clusters deployed in the VPC.

Example Request

curl -X PATCH -u 'username:apiKey' --digest "" \
   -H "Content-Type: application/json" --data '
       "atlasCidrBlock" : "",
       "providerName" : "AWS",
       "regionName" : "US_EAST_1"

Example Response

  "atlasCidrBlock" : "",
  "id" : "1112269b3bf99403840e8934",
  "providerName" : "AWS",
  "provisioned" : true,
  "regionName" : "US_EAST_1",
  "vpcId" : "vpc-zz0zzzzz"