1 つのプロバイダーの 1 つのプライベートエンドポイント サービスを作成
指定されたクラウド サービス プロバイダーのプライベートエンドポイント サービスを 1 つ作成します。このクラウド サービス プロバイダーは、プロジェクトのプライベートエンドポイント サービスを管理します。プライベートエンドポイント サービスを作成すると、MongoDB Cloud は、プライベートエンドポイント サービスを作成するクラウドプロバイダーのプロジェクトにネットワーク コンテナを作成します(未作成の場合)。MongoDB Cloud のプライベートエンドポイントの用語の詳細については、「プライベートエンドポイントの概念」を参照してください。このリソースを使用するには、リクエスト元のサービス アカウントまたは API キーにプロジェクト オーナー ロールが必要です。
path パラメータ
-
プロジェクトを識別する一意の 24 桁の 16 進数文字列。 認証済みユーザーがアクセスできるすべてのプロジェクトを取得するには、 /groups エンドポイントを使用します。
注: グループとプロジェクトは同義語です。そのため、グループ ID はプロジェクト ID と同じです。既存のグループの場合、グループ/プロジェクト ID は同じままです。リソースおよび対応するエンドポイントでは、グループという用語が使用されます。
形式は次のパターンと一致する必要があります:
^([a-f0-9]{24})$。
クエリ パラメータ
-
アプリケーションがレスポンスを
envelopeJSON オブジェクトにラップするかどうかを示すフラグ。一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。結果のリストを返すエンドポイントは、結果オブジェクトをエンベロープとして使用します。アプリケーションは、レスポンス本体にステータス パラメータを追加します。デフォルト値は
falseです。 -
レスポンス本体を pretty-print 形式にするかどうかを示すフラグ。
デフォルト値は
falseです。Prettyprint
body
必須
指定されたクラウド サービス プロバイダーにプライベートエンドポイントを 1 件作成します。
-
プライベートエンドポイント サービス作成先のクラウド サービス プロバイダーを識別する、人間が判読可能なラベル。
値は
AWS、AZURE、またはGCPです。 -
プライベートエンドポイント サービスを作成するクラウド・プロバイダーのリージョン。値として受け入れられるリージョンは、 Amazon Web Services、Google Cloud Platform、Microsoft Azure でそれぞれ異なります。
curl \
--request POST 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/privateEndpoint/endpointService' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"providerName":"AWS","region":"string"}'
{
"providerName": "AWS",
"region": "string"
}
{
"cloudProvider": "AWS",
"errorMessage": "string",
"id": "32b6e34b3d91647abb20e7b8",
"regionName": "string",
"status": "INITIATING",
"endpointServiceName": "string",
"interfaceEndpoints": [
"32b6e34b3d91647abb20e7b8"
]
}
{
"cloudProvider": "AZURE",
"errorMessage": "string",
"id": "32b6e34b3d91647abb20e7b8",
"regionName": "string",
"status": "INITIATING",
"privateEndpoints": [
"string"
],
"privateLinkServiceName": "string",
"privateLinkServiceResourceId": "/subscriptions/ae349d51-d12b-ee3d-2a27-7d53f6479cf0/resourcegroups/KObGGz/providers/Microsoft.Network/privateLinkServices/pls_d1820713f8153388d533e9de"
}
{
"cloudProvider": "GCP",
"errorMessage": "string",
"id": "32b6e34b3d91647abb20e7b8",
"regionName": "string",
"status": "INITIATING",
"endpointGroupNames": [
"string"
],
"serviceAttachmentNames": [
"string"
]
}
{
"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"
}