steampipe plugin install oci

Table: oci_core_cluster_network - Query OCI Core Cluster Networks using SQL

A Cluster Network is a type of resource provided by the Oracle Cloud Infrastructure's (OCI) Core service. It is a virtual network in the cloud with a scalable, low-latency network infrastructure. Cluster Networks provide a simple, flexible, and secure environment for your compute instances.

Table Usage Guide

The oci_core_cluster_network table provides insights into cluster networks within Oracle Cloud Infrastructure's Core service. As a Network Administrator, you can explore details specific to each cluster network through this table, including its associated instances, security rules, and metadata. Utilize it to uncover information about the network's state, its capacity for instances, and the time it was created.

Examples

Basic info

Explore which OCI core cluster networks have been recently created or updated, by identifying their display names and IDs. This can help in understanding their current lifecycle states, which is beneficial for effective network management.

select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network;
select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network;

Get instance pool details of cluster network

Analyze the settings to understand the state and size of instance pools within a cluster network. This can help in assessing the overall capacity and availability of the network.

select
c.display_name,
p -> 'availabilityDomains' as availability_domains,
p ->> 'instanceConfigurationId' as instance_configuration_id,
p ->> 'lifecycleState' as instance_pool_state,
p ->> 'size' as instance_pool_size
from
oci_core_cluster_network as c,
jsonb_array_elements(instance_pools) as p;
select
c.display_name,
json_extract(p.value, '$.availabilityDomains') as availability_domains,
json_extract(p.value, '$.instanceConfigurationId') as instance_configuration_id,
json_extract(p.value, '$.lifecycleState') as instance_pool_state,
json_extract(p.value, '$.size') as instance_pool_size
from
oci_core_cluster_network as c,
json_each(c.instance_pools) as p;

List stopped cluster networks

Discover the segments that are associated with halted cluster networks. This is particularly useful for managing resources and ensuring optimal system performance.

select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network
where
lifecycle_state = 'STOPPED';
select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network
where
lifecycle_state = 'STOPPED';

List cluster networks created in the last 30 days

Discover the cluster networks that have been established in the past month. This can be useful for tracking recent network changes and understanding the current lifecycle state of these networks.

select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network
where
time_created >= now() - interval '30' day;
select
display_name,
id,
time_created,
lifecycle_state as state
from
oci_core_cluster_network
where
time_created >= datetime('now', '-30 day');

Schema for oci_core_cluster_network

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
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.
display_nametext=A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the cluster network.
instance_poolsjsonbThe instance pools in the cluster network.
lifecycle_statetext=The current state of the cluster network.
regiontextThe OCI region in which the resource is located.
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.
time_createdtimestamp with time zoneThe date and time the resource was created.
time_updatedtimestamp with time zoneThe date and time the resource was updated.
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_core_cluster_network