steampipe plugin install oci

Table: oci_file_storage_snapshot - Query OCI File Storage Snapshots using SQL

Oracle Cloud Infrastructure's File Storage service provides a durable, scalable, secure, enterprise-grade network file system. It allows you to dynamically grow and shrink your file system without the need to provision capacity ahead of time. File Storage supports the Network File System (NFS) protocol.

Table Usage Guide

The oci_file_storage_snapshot table provides insights into snapshots within OCI File Storage. As a DevOps engineer, explore snapshot-specific details through this table, including the snapshot's lifecycle state, time created, and associated metadata. Utilize it to uncover information about snapshots, such as those with a specific lifecycle state or created at a specific time.

Examples

Basic info

  1. "Explore the basic information about your file storage snapshots, such as their names, IDs, states, creation times, provenance IDs, and regions."
  2. "Determine the number of snapshots created per file system to understand the distribution and usage of your storage resources."
  3. "Identify the snapshots that have been used as clone sources, helping you track the propagation of your data across your storage environment.
select
name,
id,
lifecycle_state as state,
time_created,
provenance_id,
region
from
oci_file_storage_snapshot;
select
name,
id,
lifecycle_state as state,
time_created,
provenance_id,
region
from
oci_file_storage_snapshot;

Count of snapshots created per file system

select
file_system_id,
count(*) as snapshots_count
from
oci_file_storage_snapshot
group by
file_system_id;
select
file_system_id,
count(*) as snapshots_count
from
oci_file_storage_snapshot
group by
file_system_id;

List cloned snapshots

select
name,
id,
is_clone_source
from
oci_file_storage_snapshot
where
is_clone_source;
select
name,
id,
is_clone_source
from
oci_file_storage_snapshot
where
is_clone_source = 1;

Schema for oci_file_storage_snapshot

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
file_system_idtextThe OCID of the file system from which the snapshot was created.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the snapshot.
is_clone_sourcebooleanSpecifies whether the snapshot has been cloned.
lifecycle_detailstextAdditional information about the current 'lifecycleState'.
lifecycle_statetext=The current state of the snapshot.
nametextName of the snapshot.
provenance_idtextAn OCID identifying the parent from which this snapshot was cloned.
regiontextThe OCI region in which the resource is located.
snapshot_timetimestamp with time zoneThe date and time the snapshot was taken.
snapshot_typetextSpecifies the generation type of the snapshot.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe date and time the snapshot was created.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_file_storage_snapshot