turbot/oci

steampipe plugin install ocisteampipe plugin install oci
On This Page
Get Involved

Table: oci_identity_compartment

Compartments are the primary building blocks you use to organize your cloud resources. You use compartments to organize and isolate your resources to make it easier to manage and secure access to them. For more information about compartments policy, go to Understanding Compartments

Examples

Basic info

select
name,
lifecycle_state,
id,
compartment_id as parent_compartment
from
oci.oci_identity_compartment

Details joined with parent compartment

select
child.name as name,
parent.name as parent_compartment,
child.id as id,
parent.id as parent_compartment_id
from
oci_identity_compartment child
left join
oci_identity_compartment parent
on (child.compartment_id = parent.id)
order by
parent.name;

.inspect oci_identity_compartment

OCI Identity Compartment

NameTypeDescription
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 you assign to the compartment.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtextThe OCID of the compartment.
inactive_statusbigintThe detailed status of INACTIVE lifecycleState
is_accessiblebooleanIndicates whether or not the compartment is accessible for the user making the request.
lifecycle_statetextThe compartment's current state.
nametextThe name assigned to the compartment during creation
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
time_createdtimestamp without time zoneDate and time the user was created.
titletextTitle of the resource.