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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API, Atlas
    • Labels:
      None

      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:

      Unable to find source-code formatter for language: request. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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.

            Assignee:
            ravind.kumar Ravind Kumar (Inactive)
            Reporter:
            luke.phillippi@mongodb.com Luke Phillippi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 29 weeks, 2 days ago