Authorize One Cloud Provider Access Role
Grants access to the specified project for the specified access role. To use this resource, the requesting Service Account or API Key must have the Project Owner role. This API endpoint is one step in a procedure to create unified access for MongoDB Cloud services. This is not required for GCP service account access.
PATCH /api/atlas/v1.0/groups/{groupId}/cloudProviderAccess/{roleId}
curl \ --request PATCH 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/cloudProviderAccess/{roleId}' \ --header "Authorization: Bearer $ACCESS_TOKEN" \ --header "Content-Type: application/json" \ --data '{"providerName":"AWS","iamAssumedRoleArn":"arn:aws:iam::123456789012:root"}'
Request examples
Aws
{ "providerName": "AWS", "iamAssumedRoleArn": "arn:aws:iam::123456789012:root" }
{ "providerName": "AZURE", "atlasAzureAppId": "string", "servicePrincipalId": "string", "tenantId": "string" }
{ "providerName": "GCP" }
Response examples (200)
{ "providerName": "AWS" }
Response examples (400)
{ "error": 400, "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.", "reason": "Bad Request", "errorCode": "VALIDATION_ERROR" }
Response examples (401)
{ "error": 401, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Unauthorized", "errorCode": "NOT_ORG_GROUP_CREATOR" }
Response examples (403)
{ "error": 403, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Forbidden", "errorCode": "CANNOT_CHANGE_GROUP_NAME" }
Response examples (404)
{ "error": 404, "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS", "reason": "Not Found", "errorCode": "RESOURCE_NOT_FOUND" }
Response examples (409)
{ "error": 409, "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554", "reason": "Conflict", "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK" }
Response examples (500)
{ "error": 500, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Internal Server Error", "errorCode": "UNEXPECTED_ERROR" }