MongoDB Atlas v3.31.0 published on Tuesday, May 6, 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
groupIdin 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,
});
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)
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
})
}
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,
});
});
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());
}
}
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}
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>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]func LookupCloudBackupSnapshotExportJob(ctx *Context, args *LookupCloudBackupSnapshotExportJobArgs, opts ...InvokeOption) (*LookupCloudBackupSnapshotExportJobResult, error)
func LookupCloudBackupSnapshotExportJobOutput(ctx *Context, args *LookupCloudBackupSnapshotExportJobOutputArgs, opts ...InvokeOption) LookupCloudBackupSnapshotExportJobResultOutput> 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)
}public static CompletableFuture<GetCloudBackupSnapshotExportJobResult> getCloudBackupSnapshotExportJob(GetCloudBackupSnapshotExportJobArgs args, InvokeOptions options)
public static Output<GetCloudBackupSnapshotExportJobResult> getCloudBackupSnapshotExportJob(GetCloudBackupSnapshotExportJobArgs args, InvokeOptions options)
fn::invoke:
function: mongodbatlas:index/getCloudBackupSnapshotExportJob:getCloudBackupSnapshotExportJob
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Name string - Name of the Atlas cluster whose export job you want to retrieve.
- Export
Job stringId - Unique identifier of the export job to retrieve.
- Project
Id string - Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
- Cluster
Name string - Name of the Atlas cluster whose export job you want to retrieve.
- Export
Job stringId - Unique identifier of the export job to retrieve.
- Project
Id string - Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
- cluster
Name String - Name of the Atlas cluster whose export job you want to retrieve.
- export
Job StringId - Unique identifier of the export job to retrieve.
- project
Id String - Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
- cluster
Name string - Name of the Atlas cluster whose export job you want to retrieve.
- export
Job stringId - Unique identifier of the export job to retrieve.
- project
Id string - Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
- cluster_
name str - Name of the Atlas cluster whose export job you want to retrieve.
- export_
job_ strid - Unique identifier of the export job to retrieve.
- project_
id str - Unique 24-hexadecimal digit string that identifies the project which contains the Atlas cluster whose snapshot you want to retrieve.
- cluster
Name String - Name of the Atlas cluster whose export job you want to retrieve.
- export
Job StringId - Unique identifier of the export job to retrieve.
- project
Id 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:
- Cluster
Name string - Components
List<Get
Cloud Backup Snapshot Export Job Component> - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- Created
At string - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
- Custom
Datas List<GetCloud Backup Snapshot Export Job Custom Data> - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - Export
Bucket stringId - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- Export
Job stringId - 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 intExported Collections - Export
Status intTotal Collections - Finished
At string - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
- Id string
- Prefix string
- Project
Id string - Snapshot
Id 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
- Cluster
Name string - Components
[]Get
Cloud Backup Snapshot Export Job Component - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- Created
At string - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
- Custom
Datas []GetCloud Backup Snapshot Export Job Custom Data - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - Export
Bucket stringId - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- Export
Job stringId - 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 intExported Collections - Export
Status intTotal Collections - Finished
At string - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
- Id string
- Prefix string
- Project
Id string - Snapshot
Id 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
- cluster
Name String - components
List<Get
Cloud Backup Snapshot Export Job Component> - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- created
At String - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
- custom
Datas List<GetCloud Backup Snapshot Export Job Custom Data> - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - export
Bucket StringId - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- export
Job StringId - 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 IntegerExported Collections - export
Status IntegerTotal Collections - finished
At String - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
- id String
- prefix String
- project
Id String - snapshot
Id 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
- cluster
Name string - components
Get
Cloud Backup Snapshot Export Job Component[] - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- created
At string - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
- custom
Datas GetCloud Backup Snapshot Export Job Custom Data[] - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - export
Bucket stringId - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- export
Job stringId - 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 numberExported Collections - export
Status numberTotal Collections - finished
At string - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
- id string
- prefix string
- project
Id string - snapshot
Id 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
- cluster_
name str - components
Sequence[Get
Cloud Backup Snapshot Export Job Component] - 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[GetCloud Backup Snapshot Export Job Custom Data] - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - export_
bucket_ strid - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- export_
job_ strid - 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_ intexported_ collections - export_
status_ inttotal_ collections - 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
- cluster
Name String - components List<Property Map>
- Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- created
At String - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
- custom
Datas List<Property Map> - Custom data to include in the metadata file named
.completethat Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs. - export
Bucket StringId - Unique identifier of the AWS bucket to export the Cloud Backup snapshot to.
- export
Job StringId - 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 NumberExported Collections - export
Status NumberTotal Collections - finished
At String - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
- id String
- prefix String
- project
Id String - snapshot
Id 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 queuedInProgress- indicates that the snapshot is being exportedSuccessful- indicates that the export job has completed successfullyFailed- indicates that the export job has failedCancelled- indicates that the export job has cancelled
Supporting Types
GetCloudBackupSnapshotExportJobComponent
- Export
Id string - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- Replica
Set stringName - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
- Export
Id string - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- Replica
Set stringName - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
- export
Id String - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- replica
Set StringName - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
- export
Id string - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- replica
Set stringName - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
- export_
id str - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- replica_
set_ strname - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
- export
Id String - Returned for sharded clusters only. Export job details for each replica set in the sharded cluster.
- replica
Set StringName - Returned for sharded clusters only. Unique identifier of the export job for the replica set.
GetCloudBackupSnapshotExportJobCustomData
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.