在一个联合中更新一个组织配置
从指定联合中更新一个已连接的组织配置。要使用此资源,请求的服务帐户或 API 密钥必须具有“组织所有者”角色。
请注意,如果组织配置中没有关联身份提供商,则无法使用此资源更新角色映射或发布授权角色授予。
注意:如果请求中未提供,则 domainRestrictionEnabled 字段默认为 false。
注意:如果未提供 identityProviderId 字段,则会断开组织和身份供应商的连接。
注意:如果 dataAccessIdentityProviderIds 字段中缺少当前已连接的数据访问身份提供商,则会断开连接。
路径参数
-
用于标识联合的唯一的 24 位十六进制数字字符串。
格式应符合以下模式:
^([a-f0-9]{24})$
。 -
唯一的 24 位十六进制数字字符串,用于标识要更新的连接组织配置。
格式应符合以下模式:
^([a-f0-9]{24})$
。
查询参数
-
指示应用程序是否将响应包装在
envelope
JSON 对象中的标志。某些 API 客户端无法访问 HTTP 响应标头或状态代码。要修复此问题,请在查询中设置 Envelope=true。返回结果列表的端点将结果对象用作 envelope。应用程序将状态参数添加到响应正文中。默认值为
false
。
body
必需
要更新的连接组织配置。
-
代表可用于该组织数据访问的身份提供者的唯一 ID 集合。
-
根据电子邮件地址限制用户加入组织的批准域。
-
指示是否为此连接的组织启用域限制的值。
-
旧有的 20 位十六进制数字字符串,用于标识此已连接的组织配置所关联的用户界面访问身份提供者。通过单击已配置身份提供者的 IdP ID 行中的信息图标,可以在“联合管理控制台” > “身份提供者”选项卡中找到此 ID。
格式应符合以下模式:
^([a-f0-9]{20})$
。 -
身份验证后向该组织中的用户授予的 Atlas 角色。角色是一个人类可读的标签,用于标识 MongoDB Cloud 授予特定 MongoDB Cloud 用户的权限集合。这些角色只能是组织特定的角色。
取值为
ORG_OWNER
、ORG_MEMBER
、ORG_GROUP_CREATOR
、ORG_BILLING_ADMIN
、ORG_BILLING_READ_ONLY
、ORG_STREAM_PROCESSING_ADMIN
或ORG_READ_ONLY
。 -
在此组织中配置的角色映射。
链接一个 IdP 和MongoDB Cloud 的映射设置。
-
包含电子邮件地址与允许列表中的任何域都不匹配的用户的列表。
链接到此联合身份验证的MongoDB Cloud 用户。
curl \
--request PATCH 'https://cloud.mongodb.com/api/atlas/v1.0/federationSettings/55fa922fb343282757d9554e/connectedOrgConfigs/32b6e34b3d91647abb20e7b8' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"dataAccessIdentityProviderIds":["string"],"domainAllowList":["string"],"domainRestrictionEnabled":true,"identityProviderId":"string","postAuthRoleGrants":["ORG_OWNER"],"roleMappings":[{"externalGroupName":"string","roleAssignments":[{"groupId":"32b6e34b3d91647abb20e7b8","orgId":"32b6e34b3d91647abb20e7b8","role":"ORG_OWNER"}]}],"userConflicts":[{"emailAddress":"hello@example.com","federationSettingsId":"32b6e34b3d91647abb20e7b8","firstName":"string","lastName":"string"}]}'
{
"dataAccessIdentityProviderIds": [
"string"
],
"domainAllowList": [
"string"
],
"domainRestrictionEnabled": true,
"identityProviderId": "string",
"postAuthRoleGrants": [
"ORG_OWNER"
],
"roleMappings": [
{
"externalGroupName": "string",
"roleAssignments": [
{
"groupId": "32b6e34b3d91647abb20e7b8",
"orgId": "32b6e34b3d91647abb20e7b8",
"role": "ORG_OWNER"
}
]
}
],
"userConflicts": [
{
"emailAddress": "hello@example.com",
"federationSettingsId": "32b6e34b3d91647abb20e7b8",
"firstName": "string",
"lastName": "string"
}
]
}
{
"dataAccessIdentityProviderIds": [
"string"
],
"domainAllowList": [
"string"
],
"domainRestrictionEnabled": true,
"identityProviderId": "string",
"orgId": "32b6e34b3d91647abb20e7b8",
"postAuthRoleGrants": [
"ORG_OWNER"
],
"roleMappings": [
{
"externalGroupName": "string",
"id": "32b6e34b3d91647abb20e7b8",
"roleAssignments": [
{
"groupId": "32b6e34b3d91647abb20e7b8",
"orgId": "32b6e34b3d91647abb20e7b8",
"role": "ORG_OWNER"
}
]
}
],
"userConflicts": [
{
"emailAddress": "hello@example.com",
"federationSettingsId": "32b6e34b3d91647abb20e7b8",
"firstName": "string",
"lastName": "string",
"userId": "32b6e34b3d91647abb20e7b8"
}
]
}
{
"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": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}