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.
Path parameters
-
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
NOTE: 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.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Unique 24-hexadecimal digit string that identifies the role.
Format should match the following pattern:
^([a-f0-9]{24})$
.
Query parameters
-
Flag that indicates whether Application wraps the response in an
envelope
JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.Default value is
false
. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false
.Prettyprint
Body
object
Required
Grants access to the specified project for the specified access role.
Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role.
-
Human-readable label that identifies the cloud provider of the role.
Value is
AWS
. -
Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
Minimum length is
20
, maximum length is2048
.
Details that describe the features linked to the Azure Service Principal.
-
Human-readable label that identifies the cloud provider of the role.
Value is
AZURE
. -
Azure Active Directory Application ID of Atlas.
-
UUID string that identifies the Azure Service Principal.
-
UUID String that identifies the Azure Active Directory Tenant ID.
Responses
-
OK
One of: Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that identifies the cloud provider of the role.
-
Amazon Resource Name that identifies the Amazon Web Services (AWS) user account that MongoDB Cloud uses when it assumes the Identity and Access Management (IAM) role.
Minimum length is
20
, maximum length is2048
. -
Unique external ID that MongoDB Cloud uses when it assumes the IAM role in your Amazon Web Services (AWS) account.
-
Date and time when someone authorized this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
-
Date and time when someone created this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
-
List that contains application features associated with this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
One of: Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ATLAS_DATA_LAKE
. -
Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Details that describe the Key Management Service (KMS) linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ENCRYPTION_AT_REST
. -
Object that contains the identifying characteristics of the Amazon Web Services (AWS) Key Management Service (KMS). This field always returns a null value.
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
EXPORT_SNAPSHOT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
Hide featureId attributes Show featureId attributes object
-
Unique 24-hexadecimal digit string that identifies the AWS S3 bucket to which you export your snapshots.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Unique 24-hexadecimal digit string that identifies your project.
Format should match the following pattern:
^([a-f0-9]{24})$
.
-
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
PUSH_BASED_LOG_EXPORT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
-
-
Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
Minimum length is
20
, maximum length is2048
. -
Unique 24-hexadecimal digit string that identifies the role.
Format should match the following pattern:
^([a-f0-9]{24})$
.
Details that describe the features linked to the Azure Service Principal.
Hide attributes Show attributes
-
Human-readable label that identifies the cloud provider of the role.
Value is
AZURE
. -
Unique 24-hexadecimal digit string that identifies the role.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Azure Active Directory Application ID of Atlas.
-
Date and time when this Azure Service Principal was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
-
List that contains application features associated with this Azure Service Principal.
One of: Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ATLAS_DATA_LAKE
. -
Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Details that describe the Key Management Service (KMS) linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ENCRYPTION_AT_REST
. -
Object that contains the identifying characteristics of the Amazon Web Services (AWS) Key Management Service (KMS). This field always returns a null value.
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
EXPORT_SNAPSHOT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
Hide featureId attributes Show featureId attributes object
-
Unique 24-hexadecimal digit string that identifies the AWS S3 bucket to which you export your snapshots.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Unique 24-hexadecimal digit string that identifies your project.
Format should match the following pattern:
^([a-f0-9]{24})$
.
-
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
PUSH_BASED_LOG_EXPORT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
-
-
Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
-
UUID string that identifies the Azure Service Principal.
-
UUID String that identifies the Azure Active Directory Tenant ID.
Details that describe the features linked to the GCP Service Account.
Hide attributes Show attributes
-
Human-readable label that identifies the cloud provider of the role.
Value is
GCP
. -
Date and time when this Google Service Account was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
-
List that contains application features associated with this Google Service Account.
One of: Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ATLAS_DATA_LAKE
. -
Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Details that describe the Key Management Service (KMS) linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
ENCRYPTION_AT_REST
. -
Object that contains the identifying characteristics of the Amazon Web Services (AWS) Key Management Service (KMS). This field always returns a null value.
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
EXPORT_SNAPSHOT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
Hide featureId attributes Show featureId attributes object
-
Unique 24-hexadecimal digit string that identifies the AWS S3 bucket to which you export your snapshots.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Unique 24-hexadecimal digit string that identifies your project.
Format should match the following pattern:
^([a-f0-9]{24})$
.
-
Details that describe the Amazon Web Services (AWS) Simple Storage Service (S3) export buckets linked to this AWS Identity and Access Management (IAM) role.
Hide attributes Show attributes
-
Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.
Value is
PUSH_BASED_LOG_EXPORT
. -
Identifying characteristics about the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket linked to this AWS Identity and Access Management (IAM) role.
-
-
Email address for the Google Service Account created by Atlas.
Format should match the following pattern:
^mongodb-atlas-[0-9a-z]{16}@p-[0-9a-z]{24}.iam.gserviceaccount.com$
. -
Unique 24-hexadecimal digit string that identifies the role.
Format should match the following pattern:
^([a-f0-9]{24})$
. -
Provision status of the service account.
Values are
IN_PROGRESS
,COMPLETE
,FAILED
, orNOT_INITIATED
.
-
-
Bad Request.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
-
Unauthorized.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
-
Forbidden.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
-
Not Found.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
-
Conflict.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
-
Internal Server Error.
Hide response attributes Show response attributes object
-
Bad request detail.
Hide badRequestDetail attribute Show badRequestDetail attribute object
-
Describes the specific conditions or reasons that cause each type of error.
-
HTTP status code returned with this error.
External documentation -
Application error code returned with this error.
-
Parameters used to give more information about the error.
-
Application error message returned with this error.
-
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"}'
{
"providerName": "AWS",
"iamAssumedRoleArn": "arn:aws:iam::123456789012:root"
}
{
"providerName": "AZURE",
"atlasAzureAppId": "string",
"servicePrincipalId": "string",
"tenantId": "string"
}
{
"providerName": "GCP"
}
{
"providerName": "string",
"atlasAWSAccountArn": "arn:aws:iam::772401394250:role/my-test-aws-role",
"atlasAssumedRoleExternalId": "string",
"authorizedDate": "2025-05-04T09:42:00Z",
"createdDate": "2025-05-04T09:42:00Z",
"featureUsages": [
{
"featureType": "ATLAS_DATA_LAKE",
"featureId": {
"groupId": "32b6e34b3d91647abb20e7b8",
"name": "string"
}
}
],
"iamAssumedRoleArn": "arn:aws:iam::123456789012:root",
"roleId": "32b6e34b3d91647abb20e7b8"
}
{
"providerName": "AZURE",
"_id": "32b6e34b3d91647abb20e7b8",
"atlasAzureAppId": "string",
"createdDate": "2025-05-04T09:42:00Z",
"featureUsages": [
{
"featureType": "ATLAS_DATA_LAKE",
"featureId": {
"groupId": "32b6e34b3d91647abb20e7b8",
"name": "string"
}
}
],
"lastUpdatedDate": "2025-05-04T09:42:00Z",
"servicePrincipalId": "string",
"tenantId": "string"
}
{
"providerName": "GCP",
"createdDate": "2025-05-04T09:42:00Z",
"featureUsages": [
{
"featureType": "ATLAS_DATA_LAKE",
"featureId": {
"groupId": "32b6e34b3d91647abb20e7b8",
"name": "string"
}
}
],
"gcpServiceAccountForAtlas": "string",
"roleId": "32b6e34b3d91647abb20e7b8",
"status": "IN_PROGRESS"
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"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"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}