1 つのフェデレーション内の 1 つの組織構成を更新
指定されたフェデレーションから、接続された組織構成を 1 つ更新します。このリソースを使用するには、リクエスト元のサービス アカウントまたは API キーに組織オーナー ロールが必要です。
注: 組織構成に IdP が関連付けられていない場合、このリソースを使用してロール マッピングを更新したり、承認ロールの付与を書き込みしたりすることはできません。
注: domainRestrictionEnabled フィールドは、リクエストで提供されなければ、デフォルトで false に設定されます。
注: identityProviderId フィールドが提供されない場合、組織と IdP は切断されます。
注: 現在接続されているデータアクセス IdP が dataAccessIdentityProviderIds フィールドに含まれていない場合は、接続が解除されます。
path パラメータ
-
フェデレーションを識別するユニークな 24 桁の 16 進数文字列。
形式は次のパターンと一致する必要があります:
^([a-f0-9]{24})$
。 -
更新対象の接続済み組織の構成を識別するユニークな 24 桁の 16 進数文字列。
形式は次のパターンと一致する必要があります:
^([a-f0-9]{24})$
。
クエリ パラメータ
-
アプリケーションがレスポンスを
envelope
JSON オブジェクトにラップするかどうかを示すフラグ。一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。結果のリストを返すエンドポイントは、結果オブジェクトをエンベロープとして使用します。アプリケーションは、レスポンス本体にステータス パラメータを追加します。デフォルト値は
false
です。
body
必須
更新対象の接続済み組織の構成。
-
この組織内のデータアクセスに使用できる IdP を表すユニークな ID のコレクション。
-
メールアドレスに基づいて組織に参加できるユーザーを制限する承認済みドメイン。
-
この接続済み組織に対してドメイン制限が有効になっているかどうかを示す値。
-
この接続された組織構成が関連付けられている UI アクセス ID プロバイダーを識別する、レガシーの 20 桁の 16 進数文字列。この ID は、フェデレーティッド マネジメント コンソールの [ID プロバイダー] タブ内で、構成された ID プロバイダーの IdP 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
です。 -
この組織で設定されているロール マッピング。
1 つの IdP とMongoDB Cloud をリンクするマッピング設定。
-
許可リストのどのドメインとも一致しないメール アドレスを持つユーザーのリスト。
この フェデレーティッド認証にリンクされたMongoDB Cloud ユーザー。
atlas api federatedAuthentication updateFederationSettingConnectedOrgConfig --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20241023001/admin"
)
func main() {
ctx := context.Background()
clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")
// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))
if err != nil {
log.Fatalf("Error: %v", err)
}
params = &sdk.UpdateFederationSettingConnectedOrgConfigApiParams{}
sdkResp, httpResp, err := client.FederatedAuthenticationApi.
UpdateFederationSettingConnectedOrgConfigWithParams(ctx, params).
Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2024-10-23+json" \
--header "Content-Type: application/json" \
-X PATCH "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}" \
-d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest --include \
--header "Accept: application/vnd.atlas.2024-10-23+json" \
--header "Content-Type: application/json" \
-X PATCH "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}" \
-d '{ <Payload> }'
{
"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"
}