1 つの M2 または M5 クラスターのすべての復元ジョブを返す
非推奨
指定された M2 または M5 クラスターのすべての復元ジョブを返します。復元ジョブではスナップショットを使用してクラスターが復元されます。このリソースを使用するには、リクエスト元のサービス アカウントまたは API キーに Project Read Only ロールが必要です。
このエンドポイントは、 createCluster エンドポイントを使用して作成された Flex クラスター、または2 51 月 まで Flex クラスターに移行された以前の M /M2026 クラスターでも使用できます。その後、このエンドポイントは使用できなくなります。代わりに listFlexBackupRestoreJobs エンドポイントを使用してください。
GET /api/atlas/v2 /groups/{groupId}/clusters/{{clusterName}/ バックアップ/tenant/restores を取得する
Atlas CLI
atlas api listSharedClusterBackupRestoreJobs --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20240530001/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.ListSharedClusterBackupRestoreJobsApiParams{}
sdkResp, httpResp, err := client.Shared - TierRestoreJobsApi.
ListSharedClusterBackupRestoreJobsWithParams(ctx, params).
Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2024-05-30+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/tenant/restores?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest \
--header "Accept: application/vnd.atlas.2024-05-30+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/tenant/restores?pretty=true"
応答の例(200)
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"clusterName": "string",
"deliveryType": "RESTORE",
"expirationDate": "2025-05-04T09:42:00Z",
"id": "32b6e34b3d91647abb20e7b8",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"projectId": "32b6e34b3d91647abb20e7b8",
"restoreFinishedDate": "2025-05-04T09:42:00Z",
"restoreScheduledDate": "2025-05-04T09:42:00Z",
"snapshotFinishedDate": "2025-05-04T09:42:00Z",
"snapshotId": "32b6e34b3d91647abb20e7b8",
"snapshotUrl": "string",
"status": "PENDING",
"targetDeploymentItemName": "string",
"targetProjectId": "32b6e34b3d91647abb20e7b8"
}
],
"totalCount": 42
}
応答の例(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"
}
応答の例(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"
}
応答の例(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"
}
応答の例(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"
}
応答の例(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"
}