mongodbatlas.getOnlineArchive
mongodbatlas.OnlineArchive
describes an Online Archive
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
Attributes reference
db_name
- Name of the database that contains the collection.coll_name
- Name of the collection.criteria
- Criteria to use for archiving data.criteria.type
- Type of criteria (DATE, CUSTOM)criteria.date_field
- Name of an already indexed date field from the documents. Data is archived when the current date is greater than the value of the date field specified here plus the number of days specified via theexpire_after_days
parameter.criteria.date_format
- the date format. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDScriteria.expire_after_days
- Number of days that specifies the age limit for the data in the live Atlas cluster.criteria.query
- JSON query to use to select documents for archiving. Only forCUSTOM
typepartition_fields
- Fields to use to partition data.partition_fields.field_name
- Name of the field. To specify a nested field, use the dot notation.partition_fields.order
- Position of the field in the partition. Value can be: 0,1,2 By default, the date field specified in the criteria.dateField parameter is in the first position of the partition.partitio_fields.field_type
- Type of the partition fieldstate
- Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
See MongoDB Atlas API Documentation for more information.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetOnlineArchive.Invoke(new()
{
ProjectId = @var.Project_id,
ClusterName = @var.Cluster_name,
ArchiveId = "5ebad3c1fe9c0ab8d37d61e1",
});
});
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 {
_, err := mongodbatlas.LookupOnlineArchive(ctx, &mongodbatlas.LookupOnlineArchiveArgs{
ProjectId: _var.Project_id,
ClusterName: _var.Cluster_name,
ArchiveId: "5ebad3c1fe9c0ab8d37d61e1",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetOnlineArchiveArgs;
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) {
final var test = MongodbatlasFunctions.getOnlineArchive(GetOnlineArchiveArgs.builder()
.projectId(var_.project_id())
.clusterName(var_.cluster_name())
.archiveId("5ebad3c1fe9c0ab8d37d61e1")
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_online_archive(project_id=var["project_id"],
cluster_name=var["cluster_name"],
archive_id="5ebad3c1fe9c0ab8d37d61e1")
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getOnlineArchive({
projectId: _var.project_id,
clusterName: _var.cluster_name,
archiveId: "5ebad3c1fe9c0ab8d37d61e1",
});
variables:
test:
fn::invoke:
Function: mongodbatlas:getOnlineArchive
Arguments:
projectId: ${var.project_id}
clusterName: ${var.cluster_name}
archiveId: 5ebad3c1fe9c0ab8d37d61e1
Using getOnlineArchive
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 getOnlineArchive(args: GetOnlineArchiveArgs, opts?: InvokeOptions): Promise<GetOnlineArchiveResult>
function getOnlineArchiveOutput(args: GetOnlineArchiveOutputArgs, opts?: InvokeOptions): Output<GetOnlineArchiveResult>
def get_online_archive(archive_id: Optional[str] = None,
cluster_name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOnlineArchiveResult
def get_online_archive_output(archive_id: Optional[pulumi.Input[str]] = None,
cluster_name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOnlineArchiveResult]
func LookupOnlineArchive(ctx *Context, args *LookupOnlineArchiveArgs, opts ...InvokeOption) (*LookupOnlineArchiveResult, error)
func LookupOnlineArchiveOutput(ctx *Context, args *LookupOnlineArchiveOutputArgs, opts ...InvokeOption) LookupOnlineArchiveResultOutput
> Note: This function is named LookupOnlineArchive
in the Go SDK.
public static class GetOnlineArchive
{
public static Task<GetOnlineArchiveResult> InvokeAsync(GetOnlineArchiveArgs args, InvokeOptions? opts = null)
public static Output<GetOnlineArchiveResult> Invoke(GetOnlineArchiveInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOnlineArchiveResult> getOnlineArchive(GetOnlineArchiveArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getOnlineArchive:getOnlineArchive
arguments:
# arguments dictionary
The following arguments are supported:
- Archive
Id string ID of the online archive.
- Cluster
Name string Name of the cluster that contains the collection.
- Project
Id string The unique ID for the project.
- Archive
Id string ID of the online archive.
- Cluster
Name string Name of the cluster that contains the collection.
- Project
Id string The unique ID for the project.
- archive
Id String ID of the online archive.
- cluster
Name String Name of the cluster that contains the collection.
- project
Id String The unique ID for the project.
- archive
Id string ID of the online archive.
- cluster
Name string Name of the cluster that contains the collection.
- project
Id string The unique ID for the project.
- archive_
id str ID of the online archive.
- cluster_
name str Name of the cluster that contains the collection.
- project_
id str The unique ID for the project.
- archive
Id String ID of the online archive.
- cluster
Name String Name of the cluster that contains the collection.
- project
Id String The unique ID for the project.
getOnlineArchive Result
The following output properties are available:
- Archive
Id string - Cluster
Name string - Coll
Name string - Criterias
List<Get
Online Archive Criteria> - Db
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Partition
Fields List<GetOnline Archive Partition Field> - Paused bool
- Project
Id string - State string
- Archive
Id string - Cluster
Name string - Coll
Name string - Criterias
[]Get
Online Archive Criteria - Db
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Partition
Fields []GetOnline Archive Partition Field - Paused bool
- Project
Id string - State string
- archive
Id String - cluster
Name String - coll
Name String - criterias
List<Get
Online Archive Criteria> - db
Name String - id String
The provider-assigned unique ID for this managed resource.
- partition
Fields List<GetOnline Archive Partition Field> - paused Boolean
- project
Id String - state String
- archive
Id string - cluster
Name string - coll
Name string - criterias
Get
Online Archive Criteria[] - db
Name string - id string
The provider-assigned unique ID for this managed resource.
- partition
Fields GetOnline Archive Partition Field[] - paused boolean
- project
Id string - state string
- archive_
id str - cluster_
name str - coll_
name str - criterias
Sequence[Get
Online Archive Criteria] - db_
name str - id str
The provider-assigned unique ID for this managed resource.
- partition_
fields Sequence[GetOnline Archive Partition Field] - paused bool
- project_
id str - state str
- archive
Id String - cluster
Name String - coll
Name String - criterias List<Property Map>
- db
Name String - id String
The provider-assigned unique ID for this managed resource.
- partition
Fields List<Property Map> - paused Boolean
- project
Id String - state String
Supporting Types
GetOnlineArchiveCriteria
- Date
Field string - Date
Format string - Expire
After intDays - Query string
- Type string
- Date
Field string - Date
Format string - Expire
After intDays - Query string
- Type string
- date
Field String - date
Format String - expire
After IntegerDays - query String
- type String
- date
Field string - date
Format string - expire
After numberDays - query string
- type string
- date_
field str - date_
format str - expire_
after_ intdays - query str
- type str
- date
Field String - date
Format String - expire
After NumberDays - query String
- type String
GetOnlineArchivePartitionField
- field_
name str - field_
type str - order int
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
mongodbatlas
Terraform Provider.