MongoDB Atlas

v3.5.1 published on Thursday, Sep 15, 2022 by Pulumi

getCloudProviderSnapshotRestoreJobs

WARNING: This datasource is deprecated, use mongodbatlas_cloud_backup_snapshots_restore_jobs

mongodbatlas.getCloudProviderSnapshotRestoreJobs provides a Cloud Backup Snapshot Restore Jobs datasource. Gets all the cloud backup snapshot restore jobs for the specified cluster.

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

Example Usage

Coming soon!

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudProviderSnapshot;
import com.pulumi.mongodbatlas.CloudProviderSnapshotArgs;
import com.pulumi.mongodbatlas.CloudProviderSnapshotRestoreJob;
import com.pulumi.mongodbatlas.CloudProviderSnapshotRestoreJobArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudProviderSnapshotRestoreJobsArgs;
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 testCloudProviderSnapshot = new CloudProviderSnapshot("testCloudProviderSnapshot", CloudProviderSnapshotArgs.builder()        
            .projectId("5cf5a45a9ccf6400e60981b6")
            .clusterName("MyCluster")
            .description("MyDescription")
            .retentionInDays(1)
            .build());

        var testCloudProviderSnapshotRestoreJob = new CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", CloudProviderSnapshotRestoreJobArgs.builder()        
            .projectId("5cf5a45a9ccf6400e60981b6")
            .clusterName("MyCluster")
            .snapshotId(testCloudProviderSnapshot.id())
            .deliveryType(Map.ofEntries(
                Map.entry("automated", true),
                Map.entry("targetClusterName", "MyCluster"),
                Map.entry("targetProjectId", "5cf5a45a9ccf6400e60981b6")
            ))
            .build());

        final var testCloudProviderSnapshotRestoreJobs = MongodbatlasFunctions.getCloudProviderSnapshotRestoreJobs(GetCloudProviderSnapshotRestoreJobsArgs.builder()
            .projectId(testCloudProviderSnapshotRestoreJob.projectId())
            .clusterName(testCloudProviderSnapshotRestoreJob.clusterName())
            .pageNum(1)
            .itemsPerPage(5)
            .build());

    }
}

Coming soon!

Coming soon!

resources:
  testCloudProviderSnapshot:
    type: mongodbatlas:CloudProviderSnapshot
    properties:
      projectId: 5cf5a45a9ccf6400e60981b6
      clusterName: MyCluster
      description: MyDescription
      retentionInDays: 1
  testCloudProviderSnapshotRestoreJob:
    type: mongodbatlas:CloudProviderSnapshotRestoreJob
    properties:
      projectId: 5cf5a45a9ccf6400e60981b6
      clusterName: MyCluster
      snapshotId: ${testCloudProviderSnapshot.id}
      deliveryType:
        - automated: true
          targetClusterName: MyCluster
          targetProjectId: 5cf5a45a9ccf6400e60981b6
variables:
  testCloudProviderSnapshotRestoreJobs:
    Fn::Invoke:
      Function: mongodbatlas:getCloudProviderSnapshotRestoreJobs
      Arguments:
        projectId: ${testCloudProviderSnapshotRestoreJob.projectId}
        clusterName: ${testCloudProviderSnapshotRestoreJob.clusterName}
        pageNum: 1
        itemsPerPage: 5

Using getCloudProviderSnapshotRestoreJobs

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 getCloudProviderSnapshotRestoreJobs(args: GetCloudProviderSnapshotRestoreJobsArgs, opts?: InvokeOptions): Promise<GetCloudProviderSnapshotRestoreJobsResult>
function getCloudProviderSnapshotRestoreJobsOutput(args: GetCloudProviderSnapshotRestoreJobsOutputArgs, opts?: InvokeOptions): Output<GetCloudProviderSnapshotRestoreJobsResult>
def get_cloud_provider_snapshot_restore_jobs(cluster_name: Optional[str] = None,
                                             items_per_page: Optional[int] = None,
                                             page_num: Optional[int] = None,
                                             project_id: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetCloudProviderSnapshotRestoreJobsResult
def get_cloud_provider_snapshot_restore_jobs_output(cluster_name: Optional[pulumi.Input[str]] = None,
                                             items_per_page: Optional[pulumi.Input[int]] = None,
                                             page_num: Optional[pulumi.Input[int]] = None,
                                             project_id: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetCloudProviderSnapshotRestoreJobsResult]
func LookupCloudProviderSnapshotRestoreJobs(ctx *Context, args *LookupCloudProviderSnapshotRestoreJobsArgs, opts ...InvokeOption) (*LookupCloudProviderSnapshotRestoreJobsResult, error)
func LookupCloudProviderSnapshotRestoreJobsOutput(ctx *Context, args *LookupCloudProviderSnapshotRestoreJobsOutputArgs, opts ...InvokeOption) LookupCloudProviderSnapshotRestoreJobsResultOutput

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

public static class GetCloudProviderSnapshotRestoreJobs 
{
    public static Task<GetCloudProviderSnapshotRestoreJobsResult> InvokeAsync(GetCloudProviderSnapshotRestoreJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProviderSnapshotRestoreJobsResult> Invoke(GetCloudProviderSnapshotRestoreJobsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProviderSnapshotRestoreJobsResult> getCloudProviderSnapshotRestoreJobs(GetCloudProviderSnapshotRestoreJobsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: mongodbatlas:index/getCloudProviderSnapshotRestoreJobs:getCloudProviderSnapshotRestoreJobs
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterName string

The name of the Atlas cluster for which you want to retrieve restore jobs.

ProjectId string

The unique identifier of the project for the Atlas cluster.

ItemsPerPage int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

PageNum int

The page to return. Defaults to 1.

ClusterName string

The name of the Atlas cluster for which you want to retrieve restore jobs.

ProjectId string

The unique identifier of the project for the Atlas cluster.

ItemsPerPage int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

PageNum int

The page to return. Defaults to 1.

clusterName String

The name of the Atlas cluster for which you want to retrieve restore jobs.

projectId String

The unique identifier of the project for the Atlas cluster.

itemsPerPage Integer

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum Integer

The page to return. Defaults to 1.

clusterName string

The name of the Atlas cluster for which you want to retrieve restore jobs.

projectId string

The unique identifier of the project for the Atlas cluster.

itemsPerPage number

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum number

The page to return. Defaults to 1.

cluster_name str

The name of the Atlas cluster for which you want to retrieve restore jobs.

project_id str

The unique identifier of the project for the Atlas cluster.

items_per_page int

Number of items to return per page, up to a maximum of 500. Defaults to 100.

page_num int

The page to return. Defaults to 1.

clusterName String

The name of the Atlas cluster for which you want to retrieve restore jobs.

projectId String

The unique identifier of the project for the Atlas cluster.

itemsPerPage Number

Number of items to return per page, up to a maximum of 500. Defaults to 100.

pageNum Number

The page to return. Defaults to 1.

getCloudProviderSnapshotRestoreJobs Result

The following output properties are available:

ClusterName string
Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
Results List<GetCloudProviderSnapshotRestoreJobsResult>

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

TotalCount int
ItemsPerPage int
PageNum int
ClusterName string
Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
Results []GetCloudProviderSnapshotRestoreJobsResult

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

TotalCount int
ItemsPerPage int
PageNum int
clusterName String
id String

The provider-assigned unique ID for this managed resource.

projectId String
results List<GetCloudProviderSnapshotRestoreJobsResult>

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

totalCount Integer
itemsPerPage Integer
pageNum Integer
clusterName string
id string

The provider-assigned unique ID for this managed resource.

projectId string
results GetCloudProviderSnapshotRestoreJobsResult[]

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

totalCount number
itemsPerPage number
pageNum number
cluster_name str
id str

The provider-assigned unique ID for this managed resource.

project_id str
results Sequence[GetCloudProviderSnapshotRestoreJobsResult]

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

total_count int
items_per_page int
page_num int
clusterName String
id String

The provider-assigned unique ID for this managed resource.

projectId String
results List<Property Map>

Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.

totalCount Number
itemsPerPage Number
pageNum Number

Supporting Types

GetCloudProviderSnapshotRestoreJobsResult

Cancelled bool

Indicates whether the restore job was canceled.

CreatedAt string

UTC ISO 8601 formatted point in time when Atlas created the restore job.

DeliveryType string

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

OplogInc int
OplogTs int
PointInTimeUtcSeconds int
SnapshotId string

Unique identifier of the source snapshot ID of the restore job.

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.

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.

DeliveryType string

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

OplogInc int
OplogTs int
PointInTimeUtcSeconds int
SnapshotId string

Unique identifier of the source snapshot ID of the restore job.

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.

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.

deliveryType String

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

oplogInc Integer
oplogTs Integer
pointInTimeUtcSeconds Integer
snapshotId String

Unique identifier of the source snapshot ID of the restore job.

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.

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.

deliveryType string

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

oplogInc number
oplogTs number
pointInTimeUtcSeconds number
snapshotId string

Unique identifier of the source snapshot ID of the restore job.

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.

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_type str

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

oplog_inc int
oplog_ts int
point_in_time_utc_seconds int
snapshot_id str

Unique identifier of the source snapshot ID of the restore job.

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.

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.

deliveryType String

Type of restore job to create. Possible values are: automated and download.

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 unique identifier of the restore job.

oplogInc Number
oplogTs Number
pointInTimeUtcSeconds Number
snapshotId String

Unique identifier of the source snapshot ID of the restore job.

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.

timestamp String

Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

Package Details

Repository
https://github.com/pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes

This Pulumi package is based on the mongodbatlas Terraform Provider.