1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getCloudBackupSnapshotExportJob
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getCloudBackupSnapshotExportJob

Explore with Pulumi AI

# Data Source: mongodbatlas_cloud_backup_snapshot_export_Job

mongodbatlas.CloudBackupSnapshotExportJob datasource allows you to retrieve a snapshot export job for the specified project and cluster.

NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testCloudBackupSnapshotExportBucket = new mongodbatlas.CloudBackupSnapshotExportBucket("test", {
    projectId: "{PROJECT_ID}",
    iamRoleId: "{IAM_ROLE_ID}",
    bucketName: "example_bucket",
    cloudProvider: "AWS",
});
const testCloudBackupSnapshotExportJob = new mongodbatlas.CloudBackupSnapshotExportJob("test", {
    projectId: "{PROJECT_ID}",
    clusterName: "{CLUSTER_NAME}",
    snapshotId: "{SNAPSHOT_ID}",
    exportBucketId: testCloudBackupSnapshotExportBucket.exportBucketId,
    customDatas: [{
        key: "exported by",
        value: "myName",
    }],
});
const test = mongodbatlas.getCloudBackupSnapshotExportJobOutput({
    projectId: "{PROJECT_ID}",
    clusterName: "{CLUSTER_NAME}",
    exportJobId: testCloudBackupSnapshotExportJob.exportJobId,
});
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test_cloud_backup_snapshot_export_bucket = mongodbatlas.CloudBackupSnapshotExportBucket("test",
    project_id="{PROJECT_ID}",
    iam_role_id="{IAM_ROLE_ID}",
    bucket_name="example_bucket",
    cloud_provider="AWS")
test_cloud_backup_snapshot_export_job = mongodbatlas.CloudBackupSnapshotExportJob("test",
    project_id="{PROJECT_ID}",
    cluster_name="{CLUSTER_NAME}",
    snapshot_id="{SNAPSHOT_ID}",
    export_bucket_id=test_cloud_backup_snapshot_export_bucket.export_bucket_id,
    custom_datas=[{
        "key": "exported by",
        "value": "myName",
    }])
test = mongodbatlas.get_cloud_backup_snapshot_export_job_output(project_id="{PROJECT_ID}",
    cluster_name="{CLUSTER_NAME}",
    export_job_id=test_cloud_backup_snapshot_export_job.export_job_id)
Copy
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 {
		testCloudBackupSnapshotExportBucket, err := mongodbatlas.NewCloudBackupSnapshotExportBucket(ctx, "test", &mongodbatlas.CloudBackupSnapshotExportBucketArgs{
			ProjectId:     pulumi.String("{PROJECT_ID}"),
			IamRoleId:     pulumi.String("{IAM_ROLE_ID}"),
			BucketName:    pulumi.String("example_bucket"),
			CloudProvider: pulumi.String("AWS"),
		})
		if err != nil {
			return err
		}
		testCloudBackupSnapshotExportJob, err := mongodbatlas.NewCloudBackupSnapshotExportJob(ctx, "test", &mongodbatlas.CloudBackupSnapshotExportJobArgs{
			ProjectId:      pulumi.String("{PROJECT_ID}"),
			ClusterName:    pulumi.String("{CLUSTER_NAME}"),
			SnapshotId:     pulumi.String("{SNAPSHOT_ID}"),
			ExportBucketId: testCloudBackupSnapshotExportBucket.ExportBucketId,
			CustomDatas: mongodbatlas.CloudBackupSnapshotExportJobCustomDataArray{
				&mongodbatlas.CloudBackupSnapshotExportJobCustomDataArgs{
					Key:   pulumi.String("exported by"),
					Value: pulumi.String("myName"),
				},
			},
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupCloudBackupSnapshotExportJobOutput(ctx, mongodbatlas.GetCloudBackupSnapshotExportJobOutputArgs{
			ProjectId:   pulumi.String("{PROJECT_ID}"),
			ClusterName: pulumi.String("{CLUSTER_NAME}"),
			ExportJobId: testCloudBackupSnapshotExportJob.ExportJobId,
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var testCloudBackupSnapshotExportBucket = new Mongodbatlas.CloudBackupSnapshotExportBucket("test", new()
    {
        ProjectId = "{PROJECT_ID}",
        IamRoleId = "{IAM_ROLE_ID}",
        BucketName = "example_bucket",
        CloudProvider = "AWS",
    });

    var testCloudBackupSnapshotExportJob = new Mongodbatlas.CloudBackupSnapshotExportJob("test", new()
    {
        ProjectId = "{PROJECT_ID}",
        ClusterName = "{CLUSTER_NAME}",
        SnapshotId = "{SNAPSHOT_ID}",
        ExportBucketId = testCloudBackupSnapshotExportBucket.ExportBucketId,
        CustomDatas = new[]
        {
            new Mongodbatlas.Inputs.CloudBackupSnapshotExportJobCustomDataArgs
            {
                Key = "exported by",
                Value = "myName",
            },
        },
    });

    var test = Mongodbatlas.GetCloudBackupSnapshotExportJob.Invoke(new()
    {
        ProjectId = "{PROJECT_ID}",
        ClusterName = "{CLUSTER_NAME}",
        ExportJobId = testCloudBackupSnapshotExportJob.ExportJobId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudBackupSnapshotExportBucket;
import com.pulumi.mongodbatlas.CloudBackupSnapshotExportBucketArgs;
import com.pulumi.mongodbatlas.CloudBackupSnapshotExportJob;
import com.pulumi.mongodbatlas.CloudBackupSnapshotExportJobArgs;
import com.pulumi.mongodbatlas.inputs.CloudBackupSnapshotExportJobCustomDataArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudBackupSnapshotExportJobArgs;
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 testCloudBackupSnapshotExportBucket = new CloudBackupSnapshotExportBucket("testCloudBackupSnapshotExportBucket", CloudBackupSnapshotExportBucketArgs.builder()
            .projectId("{PROJECT_ID}")
            .iamRoleId("{IAM_ROLE_ID}")
            .bucketName("example_bucket")
            .cloudProvider("AWS")
            .build());

        var testCloudBackupSnapshotExportJob = new CloudBackupSnapshotExportJob("testCloudBackupSnapshotExportJob", CloudBackupSnapshotExportJobArgs.builder()
            .projectId("{PROJECT_ID}")
            .clusterName("{CLUSTER_NAME}")
            .snapshotId("{SNAPSHOT_ID}")
            .exportBucketId(testCloudBackupSnapshotExportBucket.exportBucketId())
            .customDatas(CloudBackupSnapshotExportJobCustomDataArgs.builder()
                .key("exported by")
                .value("myName")
                .build())
            .build());

        final var test = MongodbatlasFunctions.getCloudBackupSnapshotExportJob(GetCloudBackupSnapshotExportJobArgs.builder()
            .projectId("{PROJECT_ID}")
            .clusterName("{CLUSTER_NAME}")
            .exportJobId(testCloudBackupSnapshotExportJob.exportJobId())
            .build());

    }
}
Copy
resources:
  testCloudBackupSnapshotExportBucket:
    type: mongodbatlas:CloudBackupSnapshotExportBucket
    name: test
    properties:
      projectId: '{PROJECT_ID}'
      iamRoleId: '{IAM_ROLE_ID}'
      bucketName: example_bucket
      cloudProvider: AWS
  testCloudBackupSnapshotExportJob:
    type: mongodbatlas:CloudBackupSnapshotExportJob
    name: test
    properties:
      projectId: '{PROJECT_ID}'
      clusterName: '{CLUSTER_NAME}'
      snapshotId: '{SNAPSHOT_ID}'
      exportBucketId: ${testCloudBackupSnapshotExportBucket.exportBucketId}
      customDatas:
        - key: exported by
          value: myName
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getCloudBackupSnapshotExportJob
      arguments:
        projectId: '{PROJECT_ID}'
        clusterName: '{CLUSTER_NAME}'
        exportJobId: ${testCloudBackupSnapshotExportJob.exportJobId}
Copy

Using getCloudBackupSnapshotExportJob

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 getCloudBackupSnapshotExportJob(args: GetCloudBackupSnapshotExportJobArgs, opts?: InvokeOptions): Promise<GetCloudBackupSnapshotExportJobResult>
function getCloudBackupSnapshotExportJobOutput(args: GetCloudBackupSnapshotExportJobOutputArgs, opts?: InvokeOptions): Output<GetCloudBackupSnapshotExportJobResult>
Copy
def get_cloud_backup_snapshot_export_job(cluster_name: Optional[str] = None,
                                         export_job_id: Optional[str] = None,
                                         project_id: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetCloudBackupSnapshotExportJobResult
def get_cloud_backup_snapshot_export_job_output(cluster_name: Optional[pulumi.Input[str]] = None,
                                         export_job_id: Optional[pulumi.Input[str]] = None,
                                         project_id: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetCloudBackupSnapshotExportJobResult]
Copy
func LookupCloudBackupSnapshotExportJob(ctx *Context, args *LookupCloudBackupSnapshotExportJobArgs, opts ...InvokeOption) (*LookupCloudBackupSnapshotExportJobResult, error)
func LookupCloudBackupSnapshotExportJobOutput(ctx *Context, args *LookupCloudBackupSnapshotExportJobOutputArgs, opts ...InvokeOption) LookupCloudBackupSnapshotExportJobResultOutput
Copy

> Note: This function is named LookupCloudBackupSnapshotExportJob in the Go SDK.

public static class GetCloudBackupSnapshotExportJob 
{
    public static Task<GetCloudBackupSnapshotExportJobResult> InvokeAsync(GetCloudBackupSnapshotExportJobArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudBackupSnapshotExportJobResult> Invoke(GetCloudBackupSnapshotExportJobInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCloudBackupSnapshotExportJobResult> getCloudBackupSnapshotExportJob(GetCloudBackupSnapshotExportJobArgs args, InvokeOptions options)
public static Output<GetCloudBackupSnapshotExportJobResult> getCloudBackupSnapshotExportJob(GetCloudBackupSnapshotExportJobArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getCloudBackupSnapshotExportJob:getCloudBackupSnapshotExportJob
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterName This property is required. string
Name of the Atlas cluster whose export job you want to retrieve.
ExportJobId This property is required. string
Unique identifier of the export job to retrieve.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
ClusterName This property is required. string
Name of the Atlas cluster whose export job you want to retrieve.
ExportJobId This property is required. string
Unique identifier of the export job to retrieve.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
clusterName This property is required. String
Name of the Atlas cluster whose export job you want to retrieve.
exportJobId This property is required. String
Unique identifier of the export job to retrieve.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
clusterName This property is required. string
Name of the Atlas cluster whose export job you want to retrieve.
exportJobId This property is required. string
Unique identifier of the export job to retrieve.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
cluster_name This property is required. str
Name of the Atlas cluster whose export job you want to retrieve.
export_job_id This property is required. str
Unique identifier of the export job to retrieve.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
clusterName This property is required. String
Name of the Atlas cluster whose export job you want to retrieve.
exportJobId This property is required. String
Unique identifier of the export job to retrieve.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.

getCloudBackupSnapshotExportJob Result

The following output properties are available:

ClusterName string
Components List<GetCloudBackupSnapshotExportJobComponent>
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
CreatedAt string
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
CustomDatas List<GetCloudBackupSnapshotExportJobCustomData>
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
ExportBucketId string
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
ExportJobId string
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
ExportStatusExportedCollections int
ExportStatusTotalCollections int
FinishedAt string
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
Id string
Prefix string
ProjectId string
SnapshotId string
Unique identifier of the Cloud Backup snapshot to export.
State string
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled
ClusterName string
Components []GetCloudBackupSnapshotExportJobComponent
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
CreatedAt string
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
CustomDatas []GetCloudBackupSnapshotExportJobCustomData
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
ExportBucketId string
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
ExportJobId string
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
ExportStatusExportedCollections int
ExportStatusTotalCollections int
FinishedAt string
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
Id string
Prefix string
ProjectId string
SnapshotId string
Unique identifier of the Cloud Backup snapshot to export.
State string
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled
clusterName String
components List<GetCloudBackupSnapshotExportJobComponent>
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
createdAt String
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
customDatas List<GetCloudBackupSnapshotExportJobCustomData>
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
exportBucketId String
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
exportJobId String
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
exportStatusExportedCollections Integer
exportStatusTotalCollections Integer
finishedAt String
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
id String
prefix String
projectId String
snapshotId String
Unique identifier of the Cloud Backup snapshot to export.
state String
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled
clusterName string
components GetCloudBackupSnapshotExportJobComponent[]
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
createdAt string
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
customDatas GetCloudBackupSnapshotExportJobCustomData[]
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
exportBucketId string
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
exportJobId string
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
exportStatusExportedCollections number
exportStatusTotalCollections number
finishedAt string
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
id string
prefix string
projectId string
snapshotId string
Unique identifier of the Cloud Backup snapshot to export.
state string
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled
cluster_name str
components Sequence[GetCloudBackupSnapshotExportJobComponent]
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
created_at str
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
custom_datas Sequence[GetCloudBackupSnapshotExportJobCustomData]
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
export_bucket_id str
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
export_job_id str
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
export_status_exported_collections int
export_status_total_collections int
finished_at str
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
id str
prefix str
project_id str
snapshot_id str
Unique identifier of the Cloud Backup snapshot to export.
state str
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled
clusterName String
components List<Property Map>
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
createdAt String
Timestamp in ISO 8601 date and time format in UTC when the export job was created.
customDatas List<Property Map>
Custom data to include in the metadata file named .complete that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
exportBucketId String
Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
exportJobId String
Unique identifier of the export job.

  • prefix - Full path on the cloud provider bucket to the folder where the snapshot is exported. The path is in the following format:/exported_snapshots/{ORG-NAME}/{PROJECT-NAME}/{CLUSTER-NAME}/{SNAPSHOT-INITIATION-DATE}/{TIMESTAMP}
exportStatusExportedCollections Number
exportStatusTotalCollections Number
finishedAt String
Timestamp in ISO 8601 date and time format in UTC when the export job completes.
id String
prefix String
projectId String
snapshotId String
Unique identifier of the Cloud Backup snapshot to export.
state String
Status of the export job. Value can be one of the following:

  • Queued - indicates that the export job is queued
  • InProgress - indicates that the snapshot is being exported
  • Successful - indicates that the export job has completed successfully
  • Failed - indicates that the export job has failed
  • Cancelled - indicates that the export job has cancelled

Supporting Types

GetCloudBackupSnapshotExportJobComponent

ExportId This property is required. string
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
ReplicaSetName This property is required. string
Returned for sharded clusters only. Unique identifier of the export job for the replica set.
ExportId This property is required. string
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
ReplicaSetName This property is required. string
Returned for sharded clusters only. Unique identifier of the export job for the replica set.
exportId This property is required. String
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
replicaSetName This property is required. String
Returned for sharded clusters only. Unique identifier of the export job for the replica set.
exportId This property is required. string
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
replicaSetName This property is required. string
Returned for sharded clusters only. Unique identifier of the export job for the replica set.
export_id This property is required. str
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
replica_set_name This property is required. str
Returned for sharded clusters only. Unique identifier of the export job for the replica set.
exportId This property is required. String
Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
replicaSetName This property is required. String
Returned for sharded clusters only. Unique identifier of the export job for the replica set.

GetCloudBackupSnapshotExportJobCustomData

Key This property is required. string
Custom data specified as key in the key and value pair.
Value This property is required. string
Value for the key specified using key.
Key This property is required. string
Custom data specified as key in the key and value pair.
Value This property is required. string
Value for the key specified using key.
key This property is required. String
Custom data specified as key in the key and value pair.
value This property is required. String
Value for the key specified using key.
key This property is required. string
Custom data specified as key in the key and value pair.
value This property is required. string
Value for the key specified using key.
key This property is required. str
Custom data specified as key in the key and value pair.
value This property is required. str
Value for the key specified using key.
key This property is required. String
Custom data specified as key in the key and value pair.
value This property is required. String
Value for the key specified using key.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.