Table: oci_core_volume - Query OCI Core Volumes using SQL
OCI Core Volumes are block storage devices that you can attach to instances in the same availability domain. They are durable, high performance storage volumes that can persist beyond the life of a single Oracle Cloud Infrastructure Compute instance. Core Volumes are designed for mission-critical applications that require granular, consistent, and reliable data access.
Table Usage Guide
The oci_core_volume
table provides insights into Core Volumes within Oracle Cloud Infrastructure (OCI). As a database administrator, explore volume-specific details through this table, including size, state, and associated metadata. Utilize it to uncover information about volumes, such as those with high performance, the availability of volumes, and the verification of volume backups.
Examples
Basic info
Explore which volumes in your Oracle Cloud Infrastructure are currently active, when they were created, and their display names for easy identification and management.
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volume;
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volume;
List volumes with a faulty state
Explore which storage volumes are in a faulty state. This is useful for identifying potential issues in your storage infrastructure that may require troubleshooting or maintenance.
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere lifecycle_state = 'FAULTY';
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere lifecycle_state = 'FAULTY';
List volumes with size greater than 1024 GB
Identify instances where storage volumes exceed 1024 GB to effectively manage resources and ensure optimal utilization.
select id as volume_id, display_name, lifecycle_state, size_in_gbsfrom oci_core_volumewhere size_in_gbs > 1024;
select id as volume_id, display_name, lifecycle_state, size_in_gbsfrom oci_core_volumewhere size_in_gbs > 1024;
List volumes with Oracle managed encryption (volumes are encrypted by default with Oracled managed encryption keys)
Determine the volumes that are encrypted using Oracle's default management keys. This can be useful to identify volumes that may not have been individually configured with custom encryption settings, potentially highlighting areas for enhanced security measures.
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere kms_key_id is null;
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere kms_key_id is null;
List volumes with customer managed encryption
Identify instances where customer-managed encryption is used for volumes. This can help assess security measures and compliance with data protection standards.
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere kms_key_id is not null;
select id as volume_id, display_name, lifecycle_state, time_createdfrom oci_core_volumewhere kms_key_id is not null;
List volumes created in the root compartment
Discover the segments that are utilizing storage space within the root compartment. This can help in efficient management of resources and planning for future storage needs.
select id as volume_id, display_name, lifecycle_state, tenant_id, compartment_idfrom oci_core_volumewhere compartment_id = tenant_id;
select id as volume_id, display_name, lifecycle_state, tenant_id, compartment_idfrom oci_core_volumewhere compartment_id = tenant_id;
Query examples
- blockstorage_block_volume_1_year
- blockstorage_block_volume_24_hrs
- blockstorage_block_volume_30_days
- blockstorage_block_volume_365_days
- blockstorage_block_volume_90_days
- blockstorage_block_volume_age_report
- blockstorage_block_volume_backup_policies_for_blockstorage_block_volume
- blockstorage_block_volume_backup_policy_schedules
- blockstorage_block_volume_by_compartment
- blockstorage_block_volume_by_creation_month
- blockstorage_block_volume_by_encryption_type
- blockstorage_block_volume_by_region
- blockstorage_block_volume_by_tenancy
- blockstorage_block_volume_count
- blockstorage_block_volume_customer_managed_encryption_count
- blockstorage_block_volume_default_backup_policies_for_blockstorage_block_volume
- blockstorage_block_volume_default_encrypted_volumes_count
- blockstorage_block_volume_encryption
- blockstorage_block_volume_encryption_report
- blockstorage_block_volume_input
- blockstorage_block_volume_overview
- blockstorage_block_volume_storage
- blockstorage_block_volume_storage_by_compartment
- blockstorage_block_volume_storage_by_creation_month
- blockstorage_block_volume_storage_by_encryption_type
- blockstorage_block_volume_storage_by_region
- blockstorage_block_volume_storage_by_tenancy
- blockstorage_block_volume_storage_total
- blockstorage_block_volume_tags
- blockstorage_block_volume_unattached_count
- blockstorage_block_volume_unattached_report
- blockstorage_block_volume_vpu
- blockstorage_block_volume_with_no_backups_count
- blockstorage_block_volumes_for_kms_key
- kms_keys_for_blockstorage_block_volume
- kms_vaults_for_blockstorage_block_volume
- source_blockstorage_block_volume_clones_for_blockstorage_block_volume
- target_blockstorage_block_volume_clones_for_blockstorage_block_volume
Control examples
Schema for oci_core_volume
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
auto_tuned_vpus_per_gb | bigint | The number of Volume Performance Units per GB that this volume is effectively tuned to when it's idle. | |
availability_domain | text | = | The availability domain of the volume. |
compartment_id | text | = | ColumnDescriptionCompartment |
defined_tags | jsonb | Defined 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. | |
display_name | text | = | A user-friendly name. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the volume. |
is_auto_tune_enabled | boolean | Specifies whether the auto-tune performance is enabled for this volume. | |
is_hydrated | boolean | Specifies whether the cloned volume's data has finished copying from the source volume or backup. | |
kms_key_id | text | The OCID of the Key Management key which is the master encryption key for the volume. | |
lifecycle_state | text | = | The current state of a volume. |
region | text | The OCI region in which the resource is located. | |
size_in_gbs | bigint | The size of the volume in GBs. | |
size_in_mbs | bigint | The size of the volume in MBs. | |
source_details | jsonb | The volume source, either an existing volume in the same availability domain or a volume backup. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
system_tags | jsonb | System tags to volume by the service. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the volume was created. | |
title | text | Title of the resource. | |
volume_backup_policy_assignment_id | text | The OCID of the volume backup policy assignment. | |
volume_backup_policy_id | text | The OCID of the volume backup policy that has been assigned to the volume. | |
volume_group_id | text | = | The OCID of the source volume group. |
vpus_per_gb | bigint | The number of volume performance units (VPUs) that will be applied to this volume per GB,representing the Block Volume service's elastic performance options. |
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_core_volume