MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi
mongodbatlas.getOnlineArchive
Explore with Pulumi AI
# Data Source: mongodbatlas.OnlineArchive
mongodbatlas.OnlineArchive
describes an Online Archive
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
Example Usage
data "mongodbatlas_online_archive" "test" {
project_id = var.project_id
cluster_name = var.cluster_name
archive_id = "5ebad3c1fe9c0ab8d37d61e1"
}
Attributes reference
db_name
- Name of the database that contains the collection.coll_name
- Name of the collection.collection_type
- Type of MongoDB collection that you want to return. This value can be “TIMESERIES” or “STANDARD”. Default is “STANDARD”.criteria
- Criteria to use for archiving data. See criteria.data_expiration_rule
- Rule for specifying when data should be deleted from the archive. See data expiration rule.data_process_region
- Settings to configure the region where you wish to store your archived data. See data process region.schedule
- Regular frequency and duration when archiving process occurs. See schedule.partition_fields
- Fields to use to partition data. You can specify up to two frequently queried fields to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.paused
- State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.state
- Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
Criteria
type
- Type of criteria (DATE, CUSTOM)date_field
- Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter. Set this parameter whentype
isDATE
.date_format
- Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. Set this parameter whentype
isDATE
. You must settype
toDATE
ifcollectionType
isTIMESERIES
. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.expire_after_days
- Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster. Set this parameter whentype
isDATE
.query
- JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported. Set this parameter whentype
isCUSTOM
.
Data Expiration Rule
expire_after_days
- Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
Data Process Region
cloud_provider
- Human-readable label that identifies the Cloud service provider where you wish to store your archived data.region
- Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
Schedule
type
- Type of schedule. Valid values:DEFAULT
,DAILY
,MONTHLY
,WEEKLY
.start_hour
- Hour of the day when the when the scheduled window to run one online archive starts.end_hour
- Hour of the day when the scheduled window to run one online archive ends.start_minute
- Minute of the hour when the scheduled window to run one online archive starts.end_minute
- Minute of the hour when the scheduled window to run one online archive ends.day_of_month
- Day of the month when the scheduled archive starts. Set this parameter whentype
isMONTHLY
.day_of_week
- Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7).Set this parameter whentype
isWEEKLY
.
Partition
field_name
- Human-readable label that identifies the parameter that MongoDB Cloud uses to partition data. To specify a nested parameter, use the dot notation.order
- Sequence in which MongoDB Cloud slices the collection data to create partitions. The resource expresses this sequence starting with zero. The value of thecriteria.dateField
parameter defaults as the first item in the partition sequence.field_type
- Data type of the parameter that that MongoDB Cloud uses to partition data. Partition parameters of type UUID must be of binary subtype 4. MongoDB Cloud skips partition parameters of type UUID with subtype 3. Valid values:date
,int
,long
,objectId
,string
,uuid
.
See MongoDB Atlas API Documentation for more information.
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)
public static Output<GetOnlineArchiveResult> getOnlineArchive(GetOnlineArchiveArgs args, InvokeOptions options)
fn::invoke:
function: mongodbatlas:index/getOnlineArchive:getOnlineArchive
arguments:
# arguments dictionary
The following arguments are supported:
- Archive
Id This property is required. string - ID of the online archive.
- Cluster
Name This property is required. string - Name of the cluster that contains the collection.
- Project
Id This property is required. string - The unique ID for the project.
- Archive
Id This property is required. string - ID of the online archive.
- Cluster
Name This property is required. string - Name of the cluster that contains the collection.
- Project
Id This property is required. string - The unique ID for the project.
- archive
Id This property is required. String - ID of the online archive.
- cluster
Name This property is required. String - Name of the cluster that contains the collection.
- project
Id This property is required. String - The unique ID for the project.
- archive
Id This property is required. string - ID of the online archive.
- cluster
Name This property is required. string - Name of the cluster that contains the collection.
- project
Id This property is required. string - The unique ID for the project.
- archive_
id This property is required. str - ID of the online archive.
- cluster_
name This property is required. str - Name of the cluster that contains the collection.
- project_
id This property is required. str - The unique ID for the project.
- archive
Id This property is required. String - ID of the online archive.
- cluster
Name This property is required. String - Name of the cluster that contains the collection.
- project
Id This property is required. String - The unique ID for the project.
getOnlineArchive Result
The following output properties are available:
- Archive
Id string - Cluster
Name string - Coll
Name string - Collection
Type string - Criterias
List<Get
Online Archive Criteria> - Data
Expiration List<GetRules Online Archive Data Expiration Rule> - Data
Process List<GetRegions Online Archive Data Process Region> - 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 - Schedules
List<Get
Online Archive Schedule> - State string
- Archive
Id string - Cluster
Name string - Coll
Name string - Collection
Type string - Criterias
[]Get
Online Archive Criteria - Data
Expiration []GetRules Online Archive Data Expiration Rule - Data
Process []GetRegions Online Archive Data Process Region - 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 - Schedules
[]Get
Online Archive Schedule - State string
- archive
Id String - cluster
Name String - coll
Name String - collection
Type String - criterias
List<Get
Online Archive Criteria> - data
Expiration List<GetRules Online Archive Data Expiration Rule> - data
Process List<GetRegions Online Archive Data Process Region> - 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 - schedules
List<Get
Online Archive Schedule> - state String
- archive
Id string - cluster
Name string - coll
Name string - collection
Type string - criterias
Get
Online Archive Criteria[] - data
Expiration GetRules Online Archive Data Expiration Rule[] - data
Process GetRegions Online Archive Data Process Region[] - 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 - schedules
Get
Online Archive Schedule[] - state string
- archive_
id str - cluster_
name str - coll_
name str - collection_
type str - criterias
Sequence[Get
Online Archive Criteria] - data_
expiration_ Sequence[Getrules Online Archive Data Expiration Rule] - data_
process_ Sequence[Getregions Online Archive Data Process Region] - 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 - schedules
Sequence[Get
Online Archive Schedule] - state str
- archive
Id String - cluster
Name String - coll
Name String - collection
Type String - criterias List<Property Map>
- data
Expiration List<Property Map>Rules - data
Process List<Property Map>Regions - db
Name String - id String
- The provider-assigned unique ID for this managed resource.
- partition
Fields List<Property Map> - paused Boolean
- project
Id String - schedules List<Property Map>
- state String
Supporting Types
GetOnlineArchiveCriteria
- Date
Field This property is required. string - Date
Format This property is required. string - Expire
After Days This property is required. int - Query
This property is required. string - Type
This property is required. string
- Date
Field This property is required. string - Date
Format This property is required. string - Expire
After Days This property is required. int - Query
This property is required. string - Type
This property is required. string
- date
Field This property is required. String - date
Format This property is required. String - expire
After Days This property is required. Integer - query
This property is required. String - type
This property is required. String
- date
Field This property is required. string - date
Format This property is required. string - expire
After Days This property is required. number - query
This property is required. string - type
This property is required. string
- date_
field This property is required. str - date_
format This property is required. str - expire_
after_ days This property is required. int - query
This property is required. str - type
This property is required. str
- date
Field This property is required. String - date
Format This property is required. String - expire
After Days This property is required. Number - query
This property is required. String - type
This property is required. String
GetOnlineArchiveDataExpirationRule
- Expire
After Days This property is required. int
- Expire
After Days This property is required. int
- expire
After Days This property is required. Integer
- expire
After Days This property is required. number
- expire_
after_ days This property is required. int
- expire
After Days This property is required. Number
GetOnlineArchiveDataProcessRegion
- Cloud
Provider This property is required. string - Region
This property is required. string
- Cloud
Provider This property is required. string - Region
This property is required. string
- cloud
Provider This property is required. String - region
This property is required. String
- cloud
Provider This property is required. string - region
This property is required. string
- cloud_
provider This property is required. str - region
This property is required. str
- cloud
Provider This property is required. String - region
This property is required. String
GetOnlineArchivePartitionField
- field_
name This property is required. str - field_
type This property is required. str - order
This property is required. int
GetOnlineArchiveSchedule
- End
Hour This property is required. int - End
Minute This property is required. int - Start
Hour This property is required. int - Start
Minute This property is required. int - Type
This property is required. string - Day
Of intMonth - Day
Of intWeek
- End
Hour This property is required. int - End
Minute This property is required. int - Start
Hour This property is required. int - Start
Minute This property is required. int - Type
This property is required. string - Day
Of intMonth - Day
Of intWeek
- end
Hour This property is required. Integer - end
Minute This property is required. Integer - start
Hour This property is required. Integer - start
Minute This property is required. Integer - type
This property is required. String - day
Of IntegerMonth - day
Of IntegerWeek
- end
Hour This property is required. number - end
Minute This property is required. number - start
Hour This property is required. number - start
Minute This property is required. number - type
This property is required. string - day
Of numberMonth - day
Of numberWeek
- end_
hour This property is required. int - end_
minute This property is required. int - start_
hour This property is required. int - start_
minute This property is required. int - type
This property is required. str - day_
of_ intmonth - day_
of_ intweek
- end
Hour This property is required. Number - end
Minute This property is required. Number - start
Hour This property is required. Number - start
Minute This property is required. Number - type
This property is required. String - day
Of NumberMonth - day
Of NumberWeek
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.