Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10876

Update Atlas' "Create a New VPC Peering Connection" API Documentation to Include Required Parameter: containerId

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API, Atlas
    • None

    Description

      Currently, within the Create a New VPC Peering Connection : Request Body Parameters section of the Atlas documentation, the following required parameters are depicted:

      Parameter Required/Optional Description
      vpcId Required. The ID of the peer VPC.
      awsAccountId Required. The AWS account ID of the owner of the peer VPC.
      routeTableCidrBlock Required. The peer VPC CIDR block or subnet.

      However, since the most recent Atlas release, an additional parameter is required when calling this API endpoint: containerId.

      As an example, when attempting to call this API endpoint sans-containerId:

      curl -X POST -u "$ATLAS_USERNAME:$ATLAS_API_KEY" --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/$ATLAS_PROJECT_ID/peers?pretty=true" \
       -H "Content-Type: application/json" --data '
       {
           "vpcId" : "$AWS_VPC_ID",
           "awsAccountId" : "$AWS_ACCOUNT_ID",
           "routeTableCidrBlock" : "10.0.128.0/17"
       }'
      

      The following response is received:

      {
        "detail" : "The required attribute containerId was not specified.",
        "error" : 400,
        "errorCode" : "MISSING_ATTRIBUTE",
        "parameters" : [ "containerId" ],
        "reason" : "Bad Request"
      }
      

      The containerId can be obtained via the Get a List of Cloud Services Containers API endpoint (returned as the id response element).

      Ideally, the Create a New VPC Peering Connection : Request Body Parameters section of the Atlas documentation should be updated to include containerId as a required parameter.

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            luke.phillippi Luke Phillippi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 18 weeks, 1 day ago