GetCloudProviderSnapshotRestoreJobs
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
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var testCloudProviderSnapshot = new Mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", new Mongodbatlas.CloudProviderSnapshotArgs
{
ClusterName = "MyCluster",
Description = "MyDescription",
ProjectId = "5cf5a45a9ccf6400e60981b6",
RetentionInDays = 1,
});
var testCloudProviderSnapshotRestoreJob = new Mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", new Mongodbatlas.CloudProviderSnapshotRestoreJobArgs
{
ClusterName = "MyCluster",
DeliveryType = new Mongodbatlas.Inputs.CloudProviderSnapshotRestoreJobDeliveryTypeArgs
{
Automated = true,
Target_cluster_name = "MyCluster",
Target_project_id = "5cf5a45a9ccf6400e60981b6",
},
ProjectId = "5cf5a45a9ccf6400e60981b6",
SnapshotId = testCloudProviderSnapshot.Id,
});
var testCloudProviderSnapshotRestoreJobs = Output.Tuple(testCloudProviderSnapshotRestoreJob.ClusterName, testCloudProviderSnapshotRestoreJob.ProjectId).Apply(values =>
{
var clusterName = values.Item1;
var projectId = values.Item2;
return Mongodbatlas.GetCloudProviderSnapshotRestoreJobs.InvokeAsync(new Mongodbatlas.GetCloudProviderSnapshotRestoreJobsArgs
{
ClusterName = clusterName,
ItemsPerPage = 5,
PageNum = 1,
ProjectId = projectId,
});
});
}
}
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testCloudProviderSnapshot, err := mongodbatlas.NewCloudProviderSnapshot(ctx, "testCloudProviderSnapshot", &mongodbatlas.CloudProviderSnapshotArgs{
ClusterName: pulumi.String("MyCluster"),
Description: pulumi.String("MyDescription"),
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
RetentionInDays: pulumi.Int(1),
})
if err != nil {
return err
}
testCloudProviderSnapshotRestoreJob, err := mongodbatlas.NewCloudProviderSnapshotRestoreJob(ctx, "testCloudProviderSnapshotRestoreJob", &mongodbatlas.CloudProviderSnapshotRestoreJobArgs{
ClusterName: pulumi.String("MyCluster"),
DeliveryType: &mongodbatlas.CloudProviderSnapshotRestoreJobDeliveryTypeArgs{
Automated: pulumi.Bool(true),
Target_cluster_name: pulumi.String("MyCluster"),
Target_project_id: pulumi.String("5cf5a45a9ccf6400e60981b6"),
},
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
SnapshotId: testCloudProviderSnapshot.ID(),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_cloud_provider_snapshot = mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot",
cluster_name="MyCluster",
description="MyDescription",
project_id="5cf5a45a9ccf6400e60981b6",
retention_in_days=1)
test_cloud_provider_snapshot_restore_job = mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob",
cluster_name="MyCluster",
delivery_type=mongodbatlas.CloudProviderSnapshotRestoreJobDeliveryTypeArgs(
automated=True,
target_cluster_name="MyCluster",
target_project_id="5cf5a45a9ccf6400e60981b6",
),
project_id="5cf5a45a9ccf6400e60981b6",
snapshot_id=test_cloud_provider_snapshot.id)
test_cloud_provider_snapshot_restore_jobs = pulumi.Output.all(test_cloud_provider_snapshot_restore_job.cluster_name, test_cloud_provider_snapshot_restore_job.project_id).apply(lambda cluster_name, project_id: mongodbatlas.get_cloud_provider_snapshot_restore_jobs(cluster_name=cluster_name,
items_per_page=5,
page_num=1,
project_id=project_id))
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("test", {
clusterName: "MyCluster",
description: "MyDescription",
projectId: "5cf5a45a9ccf6400e60981b6",
retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("test", {
clusterName: "MyCluster",
deliveryType: {
automated: true,
target_cluster_name: "MyCluster",
target_project_id: "5cf5a45a9ccf6400e60981b6",
},
projectId: "5cf5a45a9ccf6400e60981b6",
snapshotId: testCloudProviderSnapshot.id,
});
const testCloudProviderSnapshotRestoreJobs = pulumi.all([testCloudProviderSnapshotRestoreJob.clusterName, testCloudProviderSnapshotRestoreJob.projectId]).apply(([clusterName, projectId]) => mongodbatlas.getCloudProviderSnapshotRestoreJobs({
clusterName: clusterName,
itemsPerPage: 5,
pageNum: 1,
projectId: projectId,
}, { async: true }));
Using GetCloudProviderSnapshotRestoreJobs
function getCloudProviderSnapshotRestoreJobs(args: GetCloudProviderSnapshotRestoreJobsArgs, opts?: InvokeOptions): Promise<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
func GetCloudProviderSnapshotRestoreJobs(ctx *Context, args *GetCloudProviderSnapshotRestoreJobsArgs, opts ...InvokeOption) (*GetCloudProviderSnapshotRestoreJobsResult, error)
public static class GetCloudProviderSnapshotRestoreJobs {
public static Task<GetCloudProviderSnapshotRestoreJobsResult> InvokeAsync(GetCloudProviderSnapshotRestoreJobsArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Items
Per intPage 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
.
- Cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Items
Per intPage 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
.
- cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- project
Id string The unique identifier of the project for the Atlas cluster.
- items
Per numberPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- page
Num 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_ intpage 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
.
GetCloudProviderSnapshotRestoreJobs Result
The following output properties are available:
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Results
List<Get
Cloud Provider Snapshot Restore Jobs Result> Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- Total
Count int - Items
Per intPage - Page
Num int
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Results
[]Get
Cloud Provider Snapshot Restore Jobs Result Type Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- Total
Count int - Items
Per intPage - Page
Num int
- cluster
Name string - id string
The provider-assigned unique ID for this managed resource.
- project
Id string - results
Get
Cloud Provider Snapshot Restore Jobs Result[] Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total
Count number - items
Per numberPage - page
Num number
- cluster_
name str - id str
The provider-assigned unique ID for this managed resource.
- project_
id str - results
Sequence[Get
Cloud Provider Snapshot Restore Jobs Result] Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total_
count int - items_
per_ intpage - page_
num int
Supporting Types
GetCloudProviderSnapshotRestoreJobsResult
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Cancelled bool
Indicates whether the restore job was canceled.
- Created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Type string Type of restore job to create. Possible values are: automated and download.
- Delivery
Urls 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.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
The unique identifier of the restore job.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - 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 string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Type string Type of restore job to create. Possible values are: automated and download.
- Delivery
Urls []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.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
The unique identifier of the restore job.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - 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.
- created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- delivery
Type string Type of restore job to create. Possible values are: automated and download.
- delivery
Urls 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.
- expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- id string
The unique identifier of the restore job.
- oplog
Inc number - oplog
Ts number - point
In numberTime Utc Seconds - snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project stringId - 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_ inttime_ utc_ seconds - snapshot_
id str Unique identifier of the source snapshot ID of the restore job.
- target_
cluster_ strname Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target_
project_ strid - timestamp str
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.