steampipe plugin install oci

Table: oci_identity_tenancy - Query OCI Identity Tenancies using SQL

The OCI Identity Tenancy is a dedicated instance of Oracle Cloud Infrastructure resources. It is the root compartment that contains all of the organization's resources. A tenancy is provisioned in a specific Oracle Cloud Infrastructure region, but it has access to all global regions.

Table Usage Guide

The oci_identity_tenancy table provides insights into the tenancies within Oracle Cloud Infrastructure Identity. As a cloud administrator, you can explore tenancy-specific details through this table, including the home region, description, and name. Utilize it to uncover information about tenancies, such as their ID, status, and time created, which can be useful for managing and auditing cloud resources.

Examples

Basic info

Explore the basic information about your Oracle Cloud Infrastructure (OCI) tenancy, such as its name and ID, as well as understanding its retention period and description. This is useful for getting a quick overview of your tenancy's configuration and settings.

select
name,
id,
retention_period_days,
description
from
oci_identity_tenancy;
select
name,
id,
retention_period_days,
description
from
oci_identity_tenancy;

List tenancies with a retention period less than 365 days

Explore tenancies that have a retention period of less than a year to assess compliance with data retention policies and identify any potential areas of risk.

select
name,
id,
retention_period_days,
home_region_key
from
oci_identity_tenancy
where
retention_period_days < 365;
select
name,
id,
retention_period_days,
home_region_key
from
oci_identity_tenancy
where
retention_period_days < 365;

Query examples

Control examples

Schema for oci_identity_tenancy

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
compartment_idtextThe 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.
descriptiontextThe description of the tenancy.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
home_region_keytextThe region key for the tenancy's home region.
idtextThe OCID of the tenancy.
nametextThe name of the tenancy.
retention_period_daysbigintThe retention period setting, specified in days.
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
titletextTitle of the resource.
upi_idcs_compatibility_layer_endpointtextUrl which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.

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_identity_tenancy