MongoDB Atlas

Pulumi Official
Package maintained by Pulumi
v3.3.0 published on Thursday, Mar 17, 2022 by Pulumi

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 the expire_after_days parameter.
  • criteria.date_format - the date format. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS
  • criteria.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 for CUSTOM type
  • partition_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 field
  • state - 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 Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Mongodbatlas.GetOnlineArchive.InvokeAsync(new Mongodbatlas.GetOnlineArchiveArgs
        {
            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, &GetOnlineArchiveArgs{
			ProjectId:   _var.Project_id,
			ClusterName: _var.Cluster_name,
			ArchiveId:   "5ebad3c1fe9c0ab8d37d61e1",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

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",
});

Coming soon!

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:

ArchiveId string

ID of the online archive.

ClusterName string

Name of the cluster that contains the collection.

ProjectId string

The unique ID for the project.

ArchiveId string

ID of the online archive.

ClusterName string

Name of the cluster that contains the collection.

ProjectId string

The unique ID for the project.

archiveId String

ID of the online archive.

clusterName String

Name of the cluster that contains the collection.

projectId String

The unique ID for the project.

archiveId string

ID of the online archive.

clusterName string

Name of the cluster that contains the collection.

projectId 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.

archiveId String

ID of the online archive.

clusterName String

Name of the cluster that contains the collection.

projectId String

The unique ID for the project.

getOnlineArchive Result

The following output properties are available:

ArchiveId string
ClusterName string
CollName string
Criterias List<GetOnlineArchiveCriteria>
DbName string
Id string

The provider-assigned unique ID for this managed resource.

PartitionFields List<GetOnlineArchivePartitionField>
Paused bool
ProjectId string
State string
ArchiveId string
ClusterName string
CollName string
Criterias []GetOnlineArchiveCriteria
DbName string
Id string

The provider-assigned unique ID for this managed resource.

PartitionFields []GetOnlineArchivePartitionField
Paused bool
ProjectId string
State string
archiveId String
clusterName String
collName String
criterias ListOnlineArchiveCriteria>
dbName String
id String

The provider-assigned unique ID for this managed resource.

partitionFields ListOnlineArchivePartitionField>
paused Boolean
projectId String
state String
archiveId string
clusterName string
collName string
criterias GetOnlineArchiveCriteria[]
dbName string
id string

The provider-assigned unique ID for this managed resource.

partitionFields GetOnlineArchivePartitionField[]
paused boolean
projectId string
state string
archiveId String
clusterName String
collName String
criterias List
dbName String
id String

The provider-assigned unique ID for this managed resource.

partitionFields List
paused Boolean
projectId String
state String

Supporting Types

GetOnlineArchiveCriteria

DateField string
DateFormat string
ExpireAfterDays int
Query string
Type string
DateField string
DateFormat string
ExpireAfterDays int
Query string
Type string
dateField String
dateFormat String
expireAfterDays Integer
query String
type String
dateField string
dateFormat string
expireAfterDays number
query string
type string
dateField String
dateFormat String
expireAfterDays Number
query String
type String

GetOnlineArchivePartitionField

FieldName string
FieldType string
Order int
FieldName string
FieldType string
Order int
fieldName String
fieldType String
order Integer
fieldName string
fieldType string
order number
fieldName String
fieldType String
order Number

Package Details

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

This Pulumi package is based on the mongodbatlas Terraform Provider.