1. Packages
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. getFlexSnapshot
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi
mongodbatlas logo
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi

    mongodbatlas.getFlexSnapshot describes a flex snapshot.

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const snapshot = mongodbatlas.getFlexSnapshot({
        projectId: projectId,
        name: example_cluster.name,
        snapshotId: snapshotId,
    });
    const snapshots = mongodbatlas.getFlexSnapshots({
        projectId: projectId,
        name: example_cluster.name,
    });
    export const mongodbatlasFlexSnapshot = snapshot.then(snapshot => snapshot.name);
    export const mongodbatlasFlexSnapshots = snapshots.then(snapshots => .map(snapshot => (snapshot.snapshotId)));
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    snapshot = mongodbatlas.get_flex_snapshot(project_id=project_id,
        name=example_cluster["name"],
        snapshot_id=snapshot_id)
    snapshots = mongodbatlas.get_flex_snapshots(project_id=project_id,
        name=example_cluster["name"])
    pulumi.export("mongodbatlasFlexSnapshot", snapshot.name)
    pulumi.export("mongodbatlasFlexSnapshots", [snapshot.snapshot_id for snapshot in snapshots.results])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var snapshot = Mongodbatlas.Index.GetFlexSnapshot.Invoke(new()
        {
            ProjectId = projectId,
            Name = example_cluster.Name,
            SnapshotId = snapshotId,
        });
    
        var snapshots = Mongodbatlas.Index.GetFlexSnapshots.Invoke(new()
        {
            ProjectId = projectId,
            Name = example_cluster.Name,
        });
    
        return new Dictionary<string, object?>
        {
            ["mongodbatlasFlexSnapshot"] = snapshot.Apply(getFlexSnapshotResult => getFlexSnapshotResult.Name),
            ["mongodbatlasFlexSnapshots"] = .Select(snapshot => 
            {
                return snapshot.Apply(getFlexSnapshotResult => getFlexSnapshotResult.SnapshotId);
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getFlexSnapshot

    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 getFlexSnapshot(args: GetFlexSnapshotArgs, opts?: InvokeOptions): Promise<GetFlexSnapshotResult>
    function getFlexSnapshotOutput(args: GetFlexSnapshotOutputArgs, opts?: InvokeOptions): Output<GetFlexSnapshotResult>
    def get_flex_snapshot(name: Optional[str] = None,
                          project_id: Optional[str] = None,
                          snapshot_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetFlexSnapshotResult
    def get_flex_snapshot_output(name: pulumi.Input[Optional[str]] = None,
                          project_id: pulumi.Input[Optional[str]] = None,
                          snapshot_id: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetFlexSnapshotResult]
    func GetFlexSnapshot(ctx *Context, args *GetFlexSnapshotArgs, opts ...InvokeOption) (*GetFlexSnapshotResult, error)
    func GetFlexSnapshotOutput(ctx *Context, args *GetFlexSnapshotOutputArgs, opts ...InvokeOption) GetFlexSnapshotResultOutput

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

    public static class GetFlexSnapshot 
    {
        public static Task<GetFlexSnapshotResult> InvokeAsync(GetFlexSnapshotArgs args, InvokeOptions? opts = null)
        public static Output<GetFlexSnapshotResult> Invoke(GetFlexSnapshotInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFlexSnapshotResult> getFlexSnapshot(GetFlexSnapshotArgs args, InvokeOptions options)
    public static Output<GetFlexSnapshotResult> getFlexSnapshot(GetFlexSnapshotArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getFlexSnapshot:getFlexSnapshot
      arguments:
        # arguments dictionary
    data "mongodbatlas_getflexsnapshot" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    SnapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    Name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    SnapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    project_id string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    snapshot_id string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    name String
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    snapshotId String
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    snapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    name str
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    snapshot_id str
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    name String
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    snapshotId String
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.

    getFlexSnapshot Result

    The following output properties are available:

    Expiration string
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    FinishTime string
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Id string
    The provider-assigned unique ID for this managed resource.
    MongoDbVersion string
    MongoDB host version that the snapshot runs.
    Name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    ScheduledTime string
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    SnapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    StartTime string
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Status string
    Phase of the restore workflow for this job at the time this resource made this request.
    Expiration string
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    FinishTime string
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Id string
    The provider-assigned unique ID for this managed resource.
    MongoDbVersion string
    MongoDB host version that the snapshot runs.
    Name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    ScheduledTime string
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    SnapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    StartTime string
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Status string
    Phase of the restore workflow for this job at the time this resource made this request.
    expiration string
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    finish_time string
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id string
    The provider-assigned unique ID for this managed resource.
    mongo_db_version string
    MongoDB host version that the snapshot runs.
    name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    project_id string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    scheduled_time string
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    snapshot_id string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    start_time string
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    status string
    Phase of the restore workflow for this job at the time this resource made this request.
    expiration String
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    finishTime String
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id String
    The provider-assigned unique ID for this managed resource.
    mongoDbVersion String
    MongoDB host version that the snapshot runs.
    name String
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    scheduledTime String
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    snapshotId String
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    startTime String
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    status String
    Phase of the restore workflow for this job at the time this resource made this request.
    expiration string
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    finishTime string
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id string
    The provider-assigned unique ID for this managed resource.
    mongoDbVersion string
    MongoDB host version that the snapshot runs.
    name string
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    scheduledTime string
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    snapshotId string
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    startTime string
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    status string
    Phase of the restore workflow for this job at the time this resource made this request.
    expiration str
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    finish_time str
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id str
    The provider-assigned unique ID for this managed resource.
    mongo_db_version str
    MongoDB host version that the snapshot runs.
    name str
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    scheduled_time str
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    snapshot_id str
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    start_time str
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    status str
    Phase of the restore workflow for this job at the time this resource made this request.
    expiration String
    Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    finishTime String
    Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    id String
    The provider-assigned unique ID for this managed resource.
    mongoDbVersion String
    MongoDB host version that the snapshot runs.
    name String
    Human-readable label that identifies the flex cluster whose snapshot you want to restore.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    scheduledTime String
    Date and time when MongoDB Cloud will take the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    snapshotId String
    Unique 24-hexadecimal digit string that identifies the snapshot to restore.
    startTime String
    Date and time when MongoDB Cloud began taking the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    status String
    Phase of the restore workflow for this job at the time this resource made this request.

    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
    Viewing docs for MongoDB Atlas v4.8.0
    published on Thursday, Apr 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.