Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
mongodbatlas.CloudBackupSnapshotRestoreJob provides a Cloud Backup Snapshot Restore Job datasource. Gets all the cloud backup snapshot restore jobs for the specified cluster.
Example Usage
First create a snapshot of the desired cluster. Then request that snapshot be restored in an automated fashion to the designated cluster and project.
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testCloudBackupSnapshot = new mongodbatlas.CloudBackupSnapshot("test", {
projectId: "5cf5a45a9ccf6400e60981b6",
clusterName: "MyCluster",
description: "MyDescription",
retentionInDays: 1,
});
const testCloudBackupSnapshotRestoreJob = new mongodbatlas.CloudBackupSnapshotRestoreJob("test", {
projectId: "5cf5a45a9ccf6400e60981b6",
clusterName: "MyCluster",
snapshotId: testCloudBackupSnapshot.id,
deliveryType: [{
automated: true,
targetClusterName: "MyCluster",
targetProjectId: "5cf5a45a9ccf6400e60981b6",
}],
});
const test = mongodbatlas.getCloudBackupSnapshotRestoreJobOutput({
projectId: testCloudBackupSnapshotRestoreJob.projectId,
clusterName: testCloudBackupSnapshotRestoreJob.clusterName,
snapshotRestoreJobId: testCloudBackupSnapshotRestoreJob.snapshotRestoreJobId,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_cloud_backup_snapshot = mongodbatlas.CloudBackupSnapshot("test",
project_id="5cf5a45a9ccf6400e60981b6",
cluster_name="MyCluster",
description="MyDescription",
retention_in_days=1)
test_cloud_backup_snapshot_restore_job = mongodbatlas.CloudBackupSnapshotRestoreJob("test",
project_id="5cf5a45a9ccf6400e60981b6",
cluster_name="MyCluster",
snapshot_id=test_cloud_backup_snapshot.id,
delivery_type=[{
"automated": True,
"targetClusterName": "MyCluster",
"targetProjectId": "5cf5a45a9ccf6400e60981b6",
}])
test = mongodbatlas.get_cloud_backup_snapshot_restore_job_output(project_id=test_cloud_backup_snapshot_restore_job.project_id,
cluster_name=test_cloud_backup_snapshot_restore_job.cluster_name,
snapshot_restore_job_id=test_cloud_backup_snapshot_restore_job.snapshot_restore_job_id)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testCloudBackupSnapshot, err := mongodbatlas.NewCloudBackupSnapshot(ctx, "test", &mongodbatlas.CloudBackupSnapshotArgs{
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
ClusterName: pulumi.String("MyCluster"),
Description: pulumi.String("MyDescription"),
RetentionInDays: pulumi.Int(1),
})
if err != nil {
return err
}
testCloudBackupSnapshotRestoreJob, err := mongodbatlas.NewCloudBackupSnapshotRestoreJob(ctx, "test", &mongodbatlas.CloudBackupSnapshotRestoreJobArgs{
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
ClusterName: pulumi.String("MyCluster"),
SnapshotId: testCloudBackupSnapshot.ID(),
DeliveryType: []map[string]interface{}{
map[string]interface{}{
"automated": true,
"targetClusterName": "MyCluster",
"targetProjectId": "5cf5a45a9ccf6400e60981b6",
},
},
})
if err != nil {
return err
}
_ = mongodbatlas.GetCloudBackupSnapshotRestoreJobOutput(ctx, mongodbatlas.GetCloudBackupSnapshotRestoreJobOutputArgs{
ProjectId: testCloudBackupSnapshotRestoreJob.ProjectId,
ClusterName: testCloudBackupSnapshotRestoreJob.ClusterName,
SnapshotRestoreJobId: testCloudBackupSnapshotRestoreJob.SnapshotRestoreJobId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testCloudBackupSnapshot = new Mongodbatlas.Index.CloudBackupSnapshot("test", new()
{
ProjectId = "5cf5a45a9ccf6400e60981b6",
ClusterName = "MyCluster",
Description = "MyDescription",
RetentionInDays = 1,
});
var testCloudBackupSnapshotRestoreJob = new Mongodbatlas.Index.CloudBackupSnapshotRestoreJob("test", new()
{
ProjectId = "5cf5a45a9ccf6400e60981b6",
ClusterName = "MyCluster",
SnapshotId = testCloudBackupSnapshot.Id,
DeliveryType = new[]
{
{
{ "automated", true },
{ "targetClusterName", "MyCluster" },
{ "targetProjectId", "5cf5a45a9ccf6400e60981b6" },
},
},
});
var test = Mongodbatlas.Index.GetCloudBackupSnapshotRestoreJob.Invoke(new()
{
ProjectId = testCloudBackupSnapshotRestoreJob.ProjectId,
ClusterName = testCloudBackupSnapshotRestoreJob.ClusterName,
SnapshotRestoreJobId = testCloudBackupSnapshotRestoreJob.SnapshotRestoreJobId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudBackupSnapshot;
import com.pulumi.mongodbatlas.CloudBackupSnapshotArgs;
import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJob;
import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJobArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudBackupSnapshotRestoreJobArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testCloudBackupSnapshot = new CloudBackupSnapshot("testCloudBackupSnapshot", CloudBackupSnapshotArgs.builder()
.projectId("5cf5a45a9ccf6400e60981b6")
.clusterName("MyCluster")
.description("MyDescription")
.retentionInDays(1)
.build());
var testCloudBackupSnapshotRestoreJob = new CloudBackupSnapshotRestoreJob("testCloudBackupSnapshotRestoreJob", CloudBackupSnapshotRestoreJobArgs.builder()
.projectId("5cf5a45a9ccf6400e60981b6")
.clusterName("MyCluster")
.snapshotId(testCloudBackupSnapshot.id())
.deliveryType(List.of(Map.ofEntries(
Map.entry("automated", true),
Map.entry("targetClusterName", "MyCluster"),
Map.entry("targetProjectId", "5cf5a45a9ccf6400e60981b6")
)))
.build());
final var test = MongodbatlasFunctions.getCloudBackupSnapshotRestoreJob(GetCloudBackupSnapshotRestoreJobArgs.builder()
.projectId(testCloudBackupSnapshotRestoreJob.projectId())
.clusterName(testCloudBackupSnapshotRestoreJob.clusterName())
.snapshotRestoreJobId(testCloudBackupSnapshotRestoreJob.snapshotRestoreJobId())
.build());
}
}
resources:
testCloudBackupSnapshot:
type: mongodbatlas:CloudBackupSnapshot
name: test
properties:
projectId: 5cf5a45a9ccf6400e60981b6
clusterName: MyCluster
description: MyDescription
retentionInDays: 1
testCloudBackupSnapshotRestoreJob:
type: mongodbatlas:CloudBackupSnapshotRestoreJob
name: test
properties:
projectId: 5cf5a45a9ccf6400e60981b6
clusterName: MyCluster
snapshotId: ${testCloudBackupSnapshot.id}
deliveryType:
- automated: true
targetClusterName: MyCluster
targetProjectId: 5cf5a45a9ccf6400e60981b6
variables:
test:
fn::invoke:
function: mongodbatlas:getCloudBackupSnapshotRestoreJob
arguments:
projectId: ${testCloudBackupSnapshotRestoreJob.projectId}
clusterName: ${testCloudBackupSnapshotRestoreJob.clusterName}
snapshotRestoreJobId: ${testCloudBackupSnapshotRestoreJob.snapshotRestoreJobId}
Example coming soon!
Using getCloudBackupSnapshotRestoreJob
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCloudBackupSnapshotRestoreJob(args: GetCloudBackupSnapshotRestoreJobArgs, opts?: InvokeOptions): Promise<GetCloudBackupSnapshotRestoreJobResult>
function getCloudBackupSnapshotRestoreJobOutput(args: GetCloudBackupSnapshotRestoreJobOutputArgs, opts?: InvokeOptions): Output<GetCloudBackupSnapshotRestoreJobResult>def get_cloud_backup_snapshot_restore_job(cluster_name: Optional[str] = None,
project_id: Optional[str] = None,
snapshot_restore_job_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudBackupSnapshotRestoreJobResult
def get_cloud_backup_snapshot_restore_job_output(cluster_name: pulumi.Input[Optional[str]] = None,
project_id: pulumi.Input[Optional[str]] = None,
snapshot_restore_job_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudBackupSnapshotRestoreJobResult]func LookupCloudBackupSnapshotRestoreJob(ctx *Context, args *LookupCloudBackupSnapshotRestoreJobArgs, opts ...InvokeOption) (*LookupCloudBackupSnapshotRestoreJobResult, error)
func LookupCloudBackupSnapshotRestoreJobOutput(ctx *Context, args *LookupCloudBackupSnapshotRestoreJobOutputArgs, opts ...InvokeOption) LookupCloudBackupSnapshotRestoreJobResultOutput> Note: This function is named LookupCloudBackupSnapshotRestoreJob in the Go SDK.
public static class GetCloudBackupSnapshotRestoreJob
{
public static Task<GetCloudBackupSnapshotRestoreJobResult> InvokeAsync(GetCloudBackupSnapshotRestoreJobArgs args, InvokeOptions? opts = null)
public static Output<GetCloudBackupSnapshotRestoreJobResult> Invoke(GetCloudBackupSnapshotRestoreJobInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudBackupSnapshotRestoreJobResult> getCloudBackupSnapshotRestoreJob(GetCloudBackupSnapshotRestoreJobArgs args, InvokeOptions options)
public static Output<GetCloudBackupSnapshotRestoreJobResult> getCloudBackupSnapshotRestoreJob(GetCloudBackupSnapshotRestoreJobArgs args, InvokeOptions options)
fn::invoke:
function: mongodbatlas:index/getCloudBackupSnapshotRestoreJob:getCloudBackupSnapshotRestoreJob
arguments:
# arguments dictionarydata "mongodbatlas_getcloudbackupsnapshotrestorejob" "name" {
# arguments
}The following arguments are supported:
- Cluster
Name string - The name of the Atlas cluster for which you want to retrieve the restore job.
- Project
Id string - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - Snapshot
Restore stringJob Id - The unique identifier of the restore job to retrieve.
- Cluster
Name string - The name of the Atlas cluster for which you want to retrieve the restore job.
- Project
Id string - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - Snapshot
Restore stringJob Id - The unique identifier of the restore job to retrieve.
- cluster_
name string - The name of the Atlas cluster for which you want to retrieve the restore job.
- project_
id string - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - snapshot_
restore_ stringjob_ id - The unique identifier of the restore job to retrieve.
- cluster
Name String - The name of the Atlas cluster for which you want to retrieve the restore job.
- project
Id String - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - snapshot
Restore StringJob Id - The unique identifier of the restore job to retrieve.
- cluster
Name string - The name of the Atlas cluster for which you want to retrieve the restore job.
- project
Id string - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - snapshot
Restore stringJob Id - The unique identifier of the restore job to retrieve.
- cluster_
name str - The name of the Atlas cluster for which you want to retrieve the restore job.
- project_
id str - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - snapshot_
restore_ strjob_ id - The unique identifier of the restore job to retrieve.
- cluster
Name String - The name of the Atlas cluster for which you want to retrieve the restore job.
- project
Id String - The unique identifier of the project for the Atlas cluster, also known as
groupIdin the official documentation. - snapshot
Restore StringJob Id - The unique identifier of the restore job to retrieve.
getCloudBackupSnapshotRestoreJob Result
The following output properties are available:
- Cancelled bool
- Indicates whether the restore job was canceled.
- Cluster
Name string - Delivery
Type string - Type of restore job to create. Possible values are: automated and download.
- Delivery
Urls List<string> - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
- Indicates whether the restore job expired.
- Expires
At string - UTC ISO 8601 formatted point in time when the restore job expires.
- Failed bool
- Indicates whether the restore job failed.
- Finished
At string - UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Project
Id string - Snapshot
Id string - Unique identifier of the source snapshot ID of the restore job.
- Snapshot
Restore stringJob Id - Target
Cluster stringName - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- Timestamp string
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- Cancelled bool
- Indicates whether the restore job was canceled.
- Cluster
Name string - Delivery
Type string - Type of restore job to create. Possible values are: automated and download.
- Delivery
Urls []string - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
- Indicates whether the restore job expired.
- Expires
At string - UTC ISO 8601 formatted point in time when the restore job expires.
- Failed bool
- Indicates whether the restore job failed.
- Finished
At string - UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Project
Id string - Snapshot
Id string - Unique identifier of the source snapshot ID of the restore job.
- Snapshot
Restore stringJob Id - Target
Cluster stringName - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- Timestamp string
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- cancelled bool
- Indicates whether the restore job was canceled.
- cluster_
name string - delivery_
type string - Type of restore job to create. Possible values are: automated and download.
- delivery_
urls list(string) - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired bool
- Indicates whether the restore job expired.
- expires_
at string - UTC ISO 8601 formatted point in time when the restore job expires.
- failed bool
- Indicates whether the restore job failed.
- finished_
at string - UTC ISO 8601 formatted point in time when the restore job completed.
- id string
- The provider-assigned unique ID for this managed resource.
- oplog_
inc number - oplog_
ts number - point_
in_ numbertime_ utc_ seconds - project_
id string - snapshot_
id string - Unique identifier of the source snapshot ID of the restore job.
- snapshot_
restore_ stringjob_ id - target_
cluster_ stringname - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target_
project_ stringid - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- timestamp string
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- cancelled Boolean
- Indicates whether the restore job was canceled.
- cluster
Name String - delivery
Type String - Type of restore job to create. Possible values are: automated and download.
- delivery
Urls List<String> - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired Boolean
- Indicates whether the restore job expired.
- expires
At String - UTC ISO 8601 formatted point in time when the restore job expires.
- failed Boolean
- Indicates whether the restore job failed.
- finished
At String - UTC ISO 8601 formatted point in time when the restore job completed.
- id String
- The provider-assigned unique ID for this managed resource.
- oplog
Inc Integer - oplog
Ts Integer - point
In IntegerTime Utc Seconds - project
Id String - snapshot
Id String - Unique identifier of the source snapshot ID of the restore job.
- snapshot
Restore StringJob Id - target
Cluster StringName - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project StringId - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- timestamp String
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- cancelled boolean
- Indicates whether the restore job was canceled.
- cluster
Name string - delivery
Type string - Type of restore job to create. Possible values are: automated and download.
- delivery
Urls string[] - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired boolean
- Indicates whether the restore job expired.
- expires
At string - UTC ISO 8601 formatted point in time when the restore job expires.
- failed boolean
- Indicates whether the restore job failed.
- finished
At string - UTC ISO 8601 formatted point in time when the restore job completed.
- id string
- The provider-assigned unique ID for this managed resource.
- oplog
Inc number - oplog
Ts number - point
In numberTime Utc Seconds - project
Id string - snapshot
Id string - Unique identifier of the source snapshot ID of the restore job.
- snapshot
Restore stringJob Id - target
Cluster stringName - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project stringId - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- timestamp string
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- cancelled bool
- Indicates whether the restore job was canceled.
- cluster_
name str - delivery_
type str - Type of restore job to create. Possible values are: automated and download.
- delivery_
urls Sequence[str] - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired bool
- Indicates whether the restore job expired.
- expires_
at str - UTC ISO 8601 formatted point in time when the restore job expires.
- failed bool
- Indicates whether the restore job failed.
- finished_
at str - UTC ISO 8601 formatted point in time when the restore job completed.
- id str
- The provider-assigned unique ID for this managed resource.
- oplog_
inc int - oplog_
ts int - point_
in_ inttime_ utc_ seconds - project_
id str - snapshot_
id str - Unique identifier of the source snapshot ID of the restore job.
- snapshot_
restore_ strjob_ id - target_
cluster_ strname - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target_
project_ strid - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- timestamp str
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
- cancelled Boolean
- Indicates whether the restore job was canceled.
- cluster
Name String - delivery
Type String - Type of restore job to create. Possible values are: automated and download.
- delivery
Urls List<String> - One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired Boolean
- Indicates whether the restore job expired.
- expires
At String - UTC ISO 8601 formatted point in time when the restore job expires.
- failed Boolean
- Indicates whether the restore job failed.
- finished
At String - UTC ISO 8601 formatted point in time when the restore job completed.
- id String
- The provider-assigned unique ID for this managed resource.
- oplog
Inc Number - oplog
Ts Number - point
In NumberTime Utc Seconds - project
Id String - snapshot
Id String - Unique identifier of the source snapshot ID of the restore job.
- snapshot
Restore StringJob Id - target
Cluster StringName - Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project StringId - Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
- timestamp String
- Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
oplogTs- Timestamp in the number of seconds that have elapsed since the UNIX epoch.oplogInc- Oplog operation number from which to you want to restore this snapshot.pointInTimeUTCSeconds- Timestamp in the number of seconds that have elapsed since the UNIX epoch.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi
published on Thursday, Apr 23, 2026 by Pulumi
