1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. CloudBackupSnapshotRestoreJob
MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi

mongodbatlas.CloudBackupSnapshotRestoreJob

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi

    Example Usage

    Example of a point in time restore

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const clusterTest = new mongodbatlas.Cluster("clusterTest", {
        projectId: mongodbatlas_project.project_test.id,
        providerName: "AWS",
        providerRegionName: "US_EAST_1",
        providerInstanceSizeName: "M10",
        cloudBackup: true,
        pitEnabled: true,
    });
    const testCloudBackupSnapshot = new mongodbatlas.CloudBackupSnapshot("testCloudBackupSnapshot", {
        projectId: clusterTest.projectId,
        clusterName: clusterTest.name,
        description: "My description",
        retentionInDays: 1,
    });
    let testCloudBackupSnapshotRestoreJob: mongodbatlas.CloudBackupSnapshotRestoreJob | undefined;
    if ((_var.point_in_time_utc_seconds == 0 ? 0 : 1) == true) {
        testCloudBackupSnapshotRestoreJob = new mongodbatlas.CloudBackupSnapshotRestoreJob("testCloudBackupSnapshotRestoreJob", {
            projectId: testCloudBackupSnapshot.projectId,
            clusterName: testCloudBackupSnapshot.clusterName,
            snapshotId: testCloudBackupSnapshot.id,
            deliveryTypeConfig: {
                pointInTime: true,
                targetClusterName: clusterTest.name,
                targetProjectId: clusterTest.projectId,
                pointInTimeUtcSeconds: _var.point_in_time_utc_seconds,
            },
        });
    }
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    cluster_test = mongodbatlas.Cluster("clusterTest",
        project_id=mongodbatlas_project["project_test"]["id"],
        provider_name="AWS",
        provider_region_name="US_EAST_1",
        provider_instance_size_name="M10",
        cloud_backup=True,
        pit_enabled=True)
    test_cloud_backup_snapshot = mongodbatlas.CloudBackupSnapshot("testCloudBackupSnapshot",
        project_id=cluster_test.project_id,
        cluster_name=cluster_test.name,
        description="My description",
        retention_in_days=1)
    test_cloud_backup_snapshot_restore_job = None
    if (0 if var.point_in_time_utc_seconds == 0 else 1) == True:
        test_cloud_backup_snapshot_restore_job = mongodbatlas.CloudBackupSnapshotRestoreJob("testCloudBackupSnapshotRestoreJob",
            project_id=test_cloud_backup_snapshot.project_id,
            cluster_name=test_cloud_backup_snapshot.cluster_name,
            snapshot_id=test_cloud_backup_snapshot.id,
            delivery_type_config=mongodbatlas.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs(
                point_in_time=True,
                target_cluster_name=cluster_test.name,
                target_project_id=cluster_test.project_id,
                point_in_time_utc_seconds=var["point_in_time_utc_seconds"],
            ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    clusterTest, err := mongodbatlas.NewCluster(ctx, "clusterTest", &mongodbatlas.ClusterArgs{
    ProjectId: pulumi.Any(mongodbatlas_project.Project_test.Id),
    ProviderName: pulumi.String("AWS"),
    ProviderRegionName: pulumi.String("US_EAST_1"),
    ProviderInstanceSizeName: pulumi.String("M10"),
    CloudBackup: pulumi.Bool(true),
    PitEnabled: pulumi.Bool(true),
    })
    if err != nil {
    return err
    }
    testCloudBackupSnapshot, err := mongodbatlas.NewCloudBackupSnapshot(ctx, "testCloudBackupSnapshot", &mongodbatlas.CloudBackupSnapshotArgs{
    ProjectId: clusterTest.ProjectId,
    ClusterName: clusterTest.Name,
    Description: pulumi.String("My description"),
    RetentionInDays: pulumi.Int(1),
    })
    if err != nil {
    return err
    }
    var testCloudBackupSnapshotRestoreJob []*mongodbatlas.CloudBackupSnapshotRestoreJob
    for index := 0; index < ()%!v(PANIC=Format method: fatal: A failure has occurred: unlowered conditional expression @ #-resources-mongodbatlas:index-cloudBackupSnapshotRestoreJob:CloudBackupSnapshotRestoreJob.pp:18,19-61) == true; index++ {
        key0 := index
        _ := index
    __res, err := mongodbatlas.NewCloudBackupSnapshotRestoreJob(ctx, fmt.Sprintf("testCloudBackupSnapshotRestoreJob-%v", key0), &mongodbatlas.CloudBackupSnapshotRestoreJobArgs{
    ProjectId: testCloudBackupSnapshot.ProjectId,
    ClusterName: testCloudBackupSnapshot.ClusterName,
    SnapshotId: testCloudBackupSnapshot.ID(),
    DeliveryTypeConfig: &mongodbatlas.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs{
    PointInTime: pulumi.Bool(true),
    TargetClusterName: clusterTest.Name,
    TargetProjectId: clusterTest.ProjectId,
    PointInTimeUtcSeconds: pulumi.Any(_var.Point_in_time_utc_seconds),
    },
    })
    if err != nil {
    return err
    }
    testCloudBackupSnapshotRestoreJob = append(testCloudBackupSnapshotRestoreJob, __res)
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var clusterTest = new Mongodbatlas.Cluster("clusterTest", new()
        {
            ProjectId = mongodbatlas_project.Project_test.Id,
            ProviderName = "AWS",
            ProviderRegionName = "US_EAST_1",
            ProviderInstanceSizeName = "M10",
            CloudBackup = true,
            PitEnabled = true,
        });
    
        var testCloudBackupSnapshot = new Mongodbatlas.CloudBackupSnapshot("testCloudBackupSnapshot", new()
        {
            ProjectId = clusterTest.ProjectId,
            ClusterName = clusterTest.Name,
            Description = "My description",
            RetentionInDays = 1,
        });
    
        var testCloudBackupSnapshotRestoreJob = new List<Mongodbatlas.CloudBackupSnapshotRestoreJob>();
        for (var rangeIndex = 0; rangeIndex < ((@var.Point_in_time_utc_seconds == 0 ? 0 : 1) == true); rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            testCloudBackupSnapshotRestoreJob.Add(new Mongodbatlas.CloudBackupSnapshotRestoreJob($"testCloudBackupSnapshotRestoreJob-{range.Value}", new()
            {
                ProjectId = testCloudBackupSnapshot.ProjectId,
                ClusterName = testCloudBackupSnapshot.ClusterName,
                SnapshotId = testCloudBackupSnapshot.Id,
                DeliveryTypeConfig = new Mongodbatlas.Inputs.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
                {
                    PointInTime = true,
                    TargetClusterName = clusterTest.Name,
                    TargetProjectId = clusterTest.ProjectId,
                    PointInTimeUtcSeconds = @var.Point_in_time_utc_seconds,
                },
            }));
        }
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.Cluster;
    import com.pulumi.mongodbatlas.ClusterArgs;
    import com.pulumi.mongodbatlas.CloudBackupSnapshot;
    import com.pulumi.mongodbatlas.CloudBackupSnapshotArgs;
    import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJob;
    import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJobArgs;
    import com.pulumi.mongodbatlas.inputs.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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 clusterTest = new Cluster("clusterTest", ClusterArgs.builder()        
                .projectId(mongodbatlas_project.project_test().id())
                .providerName("AWS")
                .providerRegionName("US_EAST_1")
                .providerInstanceSizeName("M10")
                .cloudBackup(true)
                .pitEnabled(true)
                .build());
    
            var testCloudBackupSnapshot = new CloudBackupSnapshot("testCloudBackupSnapshot", CloudBackupSnapshotArgs.builder()        
                .projectId(clusterTest.projectId())
                .clusterName(clusterTest.name())
                .description("My description")
                .retentionInDays("1")
                .build());
    
            for (var i = 0; i < ((var_.point_in_time_utc_seconds() == 0 ? 0 : 1) == true); i++) {
                new CloudBackupSnapshotRestoreJob("testCloudBackupSnapshotRestoreJob-" + i, CloudBackupSnapshotRestoreJobArgs.builder()            
                    .projectId(testCloudBackupSnapshot.projectId())
                    .clusterName(testCloudBackupSnapshot.clusterName())
                    .snapshotId(testCloudBackupSnapshot.id())
                    .deliveryTypeConfig(CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs.builder()
                        .pointInTime(true)
                        .targetClusterName(clusterTest.name())
                        .targetProjectId(clusterTest.projectId())
                        .pointInTimeUtcSeconds(var_.point_in_time_utc_seconds())
                        .build())
                    .build());
    
            
    }
        }
    }
    
    resources:
      clusterTest:
        type: mongodbatlas:Cluster
        properties:
          projectId: ${mongodbatlas_project.project_test.id}
          # Provider Settings "block"
          providerName: AWS
          providerRegionName: US_EAST_1
          providerInstanceSizeName: M10
          cloudBackup: true
          # enable cloud provider snapshots
          pitEnabled: true
      testCloudBackupSnapshot:
        type: mongodbatlas:CloudBackupSnapshot
        properties:
          projectId: ${clusterTest.projectId}
          clusterName: ${clusterTest.name}
          description: My description
          retentionInDays: '1'
      testCloudBackupSnapshotRestoreJob:
        type: mongodbatlas:CloudBackupSnapshotRestoreJob
        properties:
          projectId: ${testCloudBackupSnapshot.projectId}
          clusterName: ${testCloudBackupSnapshot.clusterName}
          snapshotId: ${testCloudBackupSnapshot.id}
          deliveryTypeConfig:
            pointInTime: true
            targetClusterName: ${clusterTest.name}
            targetProjectId: ${clusterTest.projectId}
            pointInTimeUtcSeconds: ${var.point_in_time_utc_seconds}
        options: {}
    

    Available complete examples

    • Restore from backup snapshot at point in time
    • Restore from backup snapshot using an advanced cluster resource

    Create CloudBackupSnapshotRestoreJob Resource

    new CloudBackupSnapshotRestoreJob(name: string, args: CloudBackupSnapshotRestoreJobArgs, opts?: CustomResourceOptions);
    @overload
    def CloudBackupSnapshotRestoreJob(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      cluster_name: Optional[str] = None,
                                      delivery_type_config: Optional[CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs] = None,
                                      project_id: Optional[str] = None,
                                      snapshot_id: Optional[str] = None)
    @overload
    def CloudBackupSnapshotRestoreJob(resource_name: str,
                                      args: CloudBackupSnapshotRestoreJobArgs,
                                      opts: Optional[ResourceOptions] = None)
    func NewCloudBackupSnapshotRestoreJob(ctx *Context, name string, args CloudBackupSnapshotRestoreJobArgs, opts ...ResourceOption) (*CloudBackupSnapshotRestoreJob, error)
    public CloudBackupSnapshotRestoreJob(string name, CloudBackupSnapshotRestoreJobArgs args, CustomResourceOptions? opts = null)
    public CloudBackupSnapshotRestoreJob(String name, CloudBackupSnapshotRestoreJobArgs args)
    public CloudBackupSnapshotRestoreJob(String name, CloudBackupSnapshotRestoreJobArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:CloudBackupSnapshotRestoreJob
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CloudBackupSnapshotRestoreJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CloudBackupSnapshotRestoreJobArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CloudBackupSnapshotRestoreJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudBackupSnapshotRestoreJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudBackupSnapshotRestoreJobArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CloudBackupSnapshotRestoreJob Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The CloudBackupSnapshotRestoreJob resource accepts the following input properties:

    ClusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    ProjectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    DeliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    SnapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    ClusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    ProjectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    DeliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    SnapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    clusterName String
    The name of the Atlas cluster whose snapshot you want to restore.
    projectId String
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    deliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    snapshotId String
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    clusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    projectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    deliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    snapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    cluster_name str
    The name of the Atlas cluster whose snapshot you want to restore.
    project_id str
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    delivery_type_config CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    snapshot_id str
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    clusterName String
    The name of the Atlas cluster whose snapshot you want to restore.
    projectId String
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    deliveryTypeConfig Property Map
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    snapshotId String
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CloudBackupSnapshotRestoreJob resource produces the following output properties:

    Cancelled bool
    Indicates whether the restore job was canceled.
    CreatedAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    DeliveryUrls 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.
    ExpiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    FinishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    Id string
    The provider-assigned unique ID for this managed resource.
    SnapshotRestoreJobId string
    The unique identifier of the restore job.
    Timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    Cancelled bool
    Indicates whether the restore job was canceled.
    CreatedAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    DeliveryUrls []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.
    ExpiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    FinishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    Id string
    The provider-assigned unique ID for this managed resource.
    SnapshotRestoreJobId string
    The unique identifier of the restore job.
    Timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled Boolean
    Indicates whether the restore job was canceled.
    createdAt String
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryUrls 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.
    expiresAt String
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt String
    UTC ISO 8601 formatted point in time when the restore job completed.
    id String
    The provider-assigned unique ID for this managed resource.
    snapshotRestoreJobId String
    The unique identifier of the restore job.
    timestamp String
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled boolean
    Indicates whether the restore job was canceled.
    createdAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryUrls 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.
    expiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    id string
    The provider-assigned unique ID for this managed resource.
    snapshotRestoreJobId string
    The unique identifier of the restore job.
    timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled bool
    Indicates whether the restore job was canceled.
    created_at str
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    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.
    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.
    snapshot_restore_job_id str
    The unique identifier of the restore job.
    timestamp str
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled Boolean
    Indicates whether the restore job was canceled.
    createdAt String
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryUrls 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.
    expiresAt String
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt String
    UTC ISO 8601 formatted point in time when the restore job completed.
    id String
    The provider-assigned unique ID for this managed resource.
    snapshotRestoreJobId String
    The unique identifier of the restore job.
    timestamp String
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

    Look up Existing CloudBackupSnapshotRestoreJob Resource

    Get an existing CloudBackupSnapshotRestoreJob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CloudBackupSnapshotRestoreJobState, opts?: CustomResourceOptions): CloudBackupSnapshotRestoreJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cancelled: Optional[bool] = None,
            cluster_name: Optional[str] = None,
            created_at: Optional[str] = None,
            delivery_type_config: Optional[CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs] = None,
            delivery_urls: Optional[Sequence[str]] = None,
            expired: Optional[bool] = None,
            expires_at: Optional[str] = None,
            finished_at: Optional[str] = None,
            project_id: Optional[str] = None,
            snapshot_id: Optional[str] = None,
            snapshot_restore_job_id: Optional[str] = None,
            timestamp: Optional[str] = None) -> CloudBackupSnapshotRestoreJob
    func GetCloudBackupSnapshotRestoreJob(ctx *Context, name string, id IDInput, state *CloudBackupSnapshotRestoreJobState, opts ...ResourceOption) (*CloudBackupSnapshotRestoreJob, error)
    public static CloudBackupSnapshotRestoreJob Get(string name, Input<string> id, CloudBackupSnapshotRestoreJobState? state, CustomResourceOptions? opts = null)
    public static CloudBackupSnapshotRestoreJob get(String name, Output<String> id, CloudBackupSnapshotRestoreJobState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Cancelled bool
    Indicates whether the restore job was canceled.
    ClusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    CreatedAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    DeliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    DeliveryUrls 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.
    ExpiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    FinishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    ProjectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    SnapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    SnapshotRestoreJobId string
    The unique identifier of the restore job.
    Timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    Cancelled bool
    Indicates whether the restore job was canceled.
    ClusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    CreatedAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    DeliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    DeliveryUrls []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.
    ExpiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    FinishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    ProjectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    SnapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    SnapshotRestoreJobId string
    The unique identifier of the restore job.
    Timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled Boolean
    Indicates whether the restore job was canceled.
    clusterName String
    The name of the Atlas cluster whose snapshot you want to restore.
    createdAt String
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    deliveryUrls 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.
    expiresAt String
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt String
    UTC ISO 8601 formatted point in time when the restore job completed.
    projectId String
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    snapshotId String
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    snapshotRestoreJobId String
    The unique identifier of the restore job.
    timestamp String
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled boolean
    Indicates whether the restore job was canceled.
    clusterName string
    The name of the Atlas cluster whose snapshot you want to restore.
    createdAt string
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryTypeConfig CloudBackupSnapshotRestoreJobDeliveryTypeConfig
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    deliveryUrls 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.
    expiresAt string
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt string
    UTC ISO 8601 formatted point in time when the restore job completed.
    projectId string
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    snapshotId string
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    snapshotRestoreJobId string
    The unique identifier of the restore job.
    timestamp string
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled bool
    Indicates whether the restore job was canceled.
    cluster_name str
    The name of the Atlas cluster whose snapshot you want to restore.
    created_at str
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    delivery_type_config CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    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.
    finished_at str
    UTC ISO 8601 formatted point in time when the restore job completed.
    project_id str
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    snapshot_id str
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    snapshot_restore_job_id str
    The unique identifier of the restore job.
    timestamp str
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
    cancelled Boolean
    Indicates whether the restore job was canceled.
    clusterName String
    The name of the Atlas cluster whose snapshot you want to restore.
    createdAt String
    UTC ISO 8601 formatted point in time when Atlas created the restore job.
    deliveryTypeConfig Property Map
    Type of restore job to create. Possible configurations are: download, automated, or pointInTime only one must be set it in true.

    • delivery_type_config.automated - Set to true to use the automated configuration.
    • delivery_type_config.download - Set to true to use the download configuration.
    • delivery_type_config.pointInTime - Set to true to use the pointInTime configuration. If using pointInTime configuration, you must also specify either oplog_ts and oplog_inc, or point_in_time_utc_seconds.
    • delivery_type_config.target_cluster_name - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.target_project_id - Name of the target Atlas cluster to which the restore job restores the snapshot. Required for automated and pointInTime.
    • delivery_type_config.oplog_ts - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp.
    • delivery_type_config.oplog_inc - Optional setting for pointInTime configuration. Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Used in conjunction with oplog_ts.
    • delivery_type_config.point_in_time_utc_seconds - Optional setting for pointInTime configuration. Timestamp in the number of seconds that have elapsed since the UNIX epoch from which you want to restore this snapshot. Used instead of oplog settings.
    deliveryUrls 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.
    expiresAt String
    UTC ISO 8601 formatted point in time when the restore job expires.
    finishedAt String
    UTC ISO 8601 formatted point in time when the restore job completed.
    projectId String
    The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
    snapshotId String
    Optional setting for pointInTime configuration. Unique identifier of the snapshot to restore.
    snapshotRestoreJobId String
    The unique identifier of the restore job.
    timestamp String
    Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

    Supporting Types

    CloudBackupSnapshotRestoreJobDeliveryTypeConfig, CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs

    Automated bool
    Download bool
    OplogInc int
    OplogTs int
    PointInTime bool
    PointInTimeUtcSeconds int
    TargetClusterName string
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    TargetProjectId string
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
    Automated bool
    Download bool
    OplogInc int
    OplogTs int
    PointInTime bool
    PointInTimeUtcSeconds int
    TargetClusterName string
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    TargetProjectId string
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
    automated Boolean
    download Boolean
    oplogInc Integer
    oplogTs Integer
    pointInTime Boolean
    pointInTimeUtcSeconds Integer
    targetClusterName String
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    targetProjectId String
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
    automated boolean
    download boolean
    oplogInc number
    oplogTs number
    pointInTime boolean
    pointInTimeUtcSeconds number
    targetClusterName string
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    targetProjectId string
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
    automated bool
    download bool
    oplog_inc int
    oplog_ts int
    point_in_time bool
    point_in_time_utc_seconds int
    target_cluster_name str
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    target_project_id str
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
    automated Boolean
    download Boolean
    oplogInc Number
    oplogTs Number
    pointInTime Boolean
    pointInTimeUtcSeconds Number
    targetClusterName String
    Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
    targetProjectId String
    Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.

    Import

    Cloud Backup Snapshot Restore Job entries can be imported using project project_id, cluster_name and snapshot_id (Unique identifier of the snapshot), in the format PROJECTID-CLUSTERNAME-JOBID, e.g.

    $ pulumi import mongodbatlas:index/cloudBackupSnapshotRestoreJob:CloudBackupSnapshotRestoreJob test 5cf5a45a9ccf6400e60981b6-MyCluster-5d1b654ecf09a24b888f4c79
    

    For more information see: MongoDB Atlas API Reference.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi