This data source provides the list of Snapshots in Oracle Cloud Infrastructure File Storage service.
Lists snapshots of the specified file system, or by file system snapshot policy and compartment, or by file system snapshot policy and file system.
If file system ID is not specified, a file system snapshot policy ID and compartment ID must be specified.
Users can only sort by time created when listing snapshots by file system snapshot policy ID and compartment ID (sort by name is NOT supported for listing snapshots by policy and compartment).
data "oci_file_storage_snapshots" "test_snapshots" {
#Optional
compartment_id = var.compartment_id
file_system_id = oci_file_storage_file_system.test_file_system.id
filesystem_snapshot_policy_id = oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id
id = var.snapshot_id
state = var.snapshot_state
}
The following arguments are supported:
compartment_id
- (Optional) The OCID of the compartment.file_system_id
- (Optional) The OCID of the file system.filesystem_snapshot_policy_id
- (Optional) The OCID of the file system snapshot policy that is used to create the snapshots. id
- (Optional) Filter results by OCID. Must be an OCID of the correct type for the resouce type. state
- (Optional) Filter results by the specified lifecycle state. Must be a valid state for the resource type. The following attributes are exported:
snapshots
- The list of snapshots.The following attributes are exported:
defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
expiration_time
- The time when this snapshot will be deleted.file_system_id
- The OCID of the file system from which the snapshot was created. filesystem_snapshot_policy_id
- The OCID of the file system snapshot policy that created this snapshot. freeform_tags
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id
- The OCID of the snapshot.is_clone_source
- Specifies whether the snapshot has been cloned. See Cloning a File System. lifecycle_details
- Additional information about the current lifecycleState
.name
- Name of the snapshot. This value is immutable.
Avoid entering confidential information.
Example: Sunday
provenance_id
- An OCID identifying the parent from which this snapshot was cloned. If this snapshot was not cloned, then the provenanceId
is the same as the snapshot id
value. If this snapshot was cloned, then the provenanceId
value is the parent's provenanceId
. See Cloning a File System. snapshot_time
- The date and time the snapshot was taken, expressed in RFC 3339 timestamp format. This value might be the same or different from timeCreated
depending on the following factors:
Example: 2020-08-25T21:10:29.600Z
snapshot_type
- Specifies the generation type of the snapshot. state
- The current state of the snapshot.time_created
- The date and time the snapshot was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z