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

mongodbatlas.getFlexRestoreJobs

Explore with Pulumi AI

# Data Source: mongodbatlas.getFlexRestoreJobs

mongodbatlas.getFlexRestoreJobs returns all flex restore job of a flex cluster.

Example Usage

S

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

const restoreJob = mongodbatlas.getFlexRestoreJob({
    projectId: projectId,
    name: example_cluster.name,
    restoreJobId: restoreJobId,
});
const restoreJobs = mongodbatlas.getFlexRestoreJobs({
    projectId: projectId,
    name: example_cluster.name,
});
export const mongodbatlasFlexRestoreJob = restoreJob.then(restoreJob => restoreJob.name);
export const mongodbatlasFlexRestoreJobs = restoreJobs.then(restoreJobs => .map(restoreJob => (restoreJob.restoreJobId)));
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

restore_job = mongodbatlas.get_flex_restore_job(project_id=project_id,
    name=example_cluster["name"],
    restore_job_id=restore_job_id)
restore_jobs = mongodbatlas.get_flex_restore_jobs(project_id=project_id,
    name=example_cluster["name"])
pulumi.export("mongodbatlasFlexRestoreJob", restore_job.name)
pulumi.export("mongodbatlasFlexRestoreJobs", [restore_job.restore_job_id for restoreJob in restore_jobs.results])
Copy
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var restoreJob = Mongodbatlas.GetFlexRestoreJob.Invoke(new()
    {
        ProjectId = projectId,
        Name = example_cluster.Name,
        RestoreJobId = restoreJobId,
    });

    var restoreJobs = Mongodbatlas.GetFlexRestoreJobs.Invoke(new()
    {
        ProjectId = projectId,
        Name = example_cluster.Name,
    });

    return new Dictionary<string, object?>
    {
        ["mongodbatlasFlexRestoreJob"] = restoreJob.Apply(getFlexRestoreJobResult => getFlexRestoreJobResult.Name),
        ["mongodbatlasFlexRestoreJobs"] = .Select(restoreJob => 
        {
            return restoreJob.Apply(getFlexRestoreJobResult => getFlexRestoreJobResult.RestoreJobId);
        }).ToList(),
    };
});
Copy
Coming soon!
Coming soon!

Using getFlexRestoreJobs

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 getFlexRestoreJobs(args: GetFlexRestoreJobsArgs, opts?: InvokeOptions): Promise<GetFlexRestoreJobsResult>
function getFlexRestoreJobsOutput(args: GetFlexRestoreJobsOutputArgs, opts?: InvokeOptions): Output<GetFlexRestoreJobsResult>
Copy
def get_flex_restore_jobs(name: Optional[str] = None,
                          project_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetFlexRestoreJobsResult
def get_flex_restore_jobs_output(name: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetFlexRestoreJobsResult]
Copy
func LookupFlexRestoreJobs(ctx *Context, args *LookupFlexRestoreJobsArgs, opts ...InvokeOption) (*LookupFlexRestoreJobsResult, error)
func LookupFlexRestoreJobsOutput(ctx *Context, args *LookupFlexRestoreJobsOutputArgs, opts ...InvokeOption) LookupFlexRestoreJobsResultOutput
Copy

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

public static class GetFlexRestoreJobs 
{
    public static Task<GetFlexRestoreJobsResult> InvokeAsync(GetFlexRestoreJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetFlexRestoreJobsResult> Invoke(GetFlexRestoreJobsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFlexRestoreJobsResult> getFlexRestoreJobs(GetFlexRestoreJobsArgs args, InvokeOptions options)
public static Output<GetFlexRestoreJobsResult> getFlexRestoreJobs(GetFlexRestoreJobsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getFlexRestoreJobs:getFlexRestoreJobs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
Name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
name This property is required. String
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
name This property is required. str
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
name This property is required. String
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.

getFlexRestoreJobs Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
Results List<GetFlexRestoreJobsResult>
Id string
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
Results []GetFlexRestoreJobsResult
id String
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
results List<GetFlexRestoreJobsResult>
id string
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
results GetFlexRestoreJobsResult[]
id str
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
results Sequence[GetFlexRestoreJobsResult]
id String
The provider-assigned unique ID for this managed resource.
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. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
results List<Property Map>

Supporting Types

GetFlexRestoreJobsResult

DeliveryType This property is required. string
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
ExpirationDate This property is required. string
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
Name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
RestoreFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
RestoreJobId This property is required. string
Unique 24-hexadecimal digit string that identifies the restore job.
RestoreScheduledDate This property is required. string
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
SnapshotFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
SnapshotId This property is required. string
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
SnapshotUrl This property is required. string
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
Status This property is required. string
Phase of the restore workflow for this job at the time this resource made this request.
TargetDeploymentItemName This property is required. string
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
TargetProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.
DeliveryType This property is required. string
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
ExpirationDate This property is required. string
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
Name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
ProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
RestoreFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
RestoreJobId This property is required. string
Unique 24-hexadecimal digit string that identifies the restore job.
RestoreScheduledDate This property is required. string
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
SnapshotFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
SnapshotId This property is required. string
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
SnapshotUrl This property is required. string
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
Status This property is required. string
Phase of the restore workflow for this job at the time this resource made this request.
TargetDeploymentItemName This property is required. string
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
TargetProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.
deliveryType This property is required. String
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
expirationDate This property is required. String
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
name This property is required. String
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
restoreFinishedDate This property is required. String
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
restoreJobId This property is required. String
Unique 24-hexadecimal digit string that identifies the restore job.
restoreScheduledDate This property is required. String
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotFinishedDate This property is required. String
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotId This property is required. String
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
snapshotUrl This property is required. String
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
status This property is required. String
Phase of the restore workflow for this job at the time this resource made this request.
targetDeploymentItemName This property is required. String
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
targetProjectId This property is required. String
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.
deliveryType This property is required. string
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
expirationDate This property is required. string
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
name This property is required. string
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. string
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
restoreFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
restoreJobId This property is required. string
Unique 24-hexadecimal digit string that identifies the restore job.
restoreScheduledDate This property is required. string
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotFinishedDate This property is required. string
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotId This property is required. string
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
snapshotUrl This property is required. string
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
status This property is required. string
Phase of the restore workflow for this job at the time this resource made this request.
targetDeploymentItemName This property is required. string
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
targetProjectId This property is required. string
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.
delivery_type This property is required. str
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
expiration_date This property is required. str
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
name This property is required. str
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
project_id This property is required. str
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
restore_finished_date This property is required. str
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
restore_job_id This property is required. str
Unique 24-hexadecimal digit string that identifies the restore job.
restore_scheduled_date This property is required. str
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshot_finished_date This property is required. str
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshot_id This property is required. str
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
snapshot_url This property is required. str
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
status This property is required. str
Phase of the restore workflow for this job at the time this resource made this request.
target_deployment_item_name This property is required. str
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
target_project_id This property is required. str
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.
deliveryType This property is required. String
Means by which this resource returns the snapshot to the requesting MongoDB Cloud user.
expirationDate This property is required. String
Date and time when the download link no longer works. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
name This property is required. String
Human-readable label that identifies the flex cluster whose snapshot you want to restore.
projectId This property is required. String
Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
restoreFinishedDate This property is required. String
Date and time when MongoDB Cloud completed writing this snapshot. MongoDB Cloud changes the status of the restore job to CLOSED. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
restoreJobId This property is required. String
Unique 24-hexadecimal digit string that identifies the restore job.
restoreScheduledDate This property is required. String
Date and time when MongoDB Cloud will restore this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotFinishedDate This property is required. String
Date and time when MongoDB Cloud completed writing this snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
snapshotId This property is required. String
Unique 24-hexadecimal digit string that identifies the snapshot to restore.
snapshotUrl This property is required. String
Internet address from which you can download the compressed snapshot files. The resource returns this parameter when "deliveryType" : "DOWNLOAD".
status This property is required. String
Phase of the restore workflow for this job at the time this resource made this request.
targetDeploymentItemName This property is required. String
Human-readable label that identifies the instance or cluster on the target project to which you want to restore the snapshot. You can restore the snapshot to another flex cluster or dedicated cluster tier.
targetProjectId This property is required. String
Unique 24-hexadecimal digit string that identifies the project that contains the instance or cluster to which you want to restore the snapshot.

Package Details

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