steampipe plugin install oci

Table: oci_core_public_ip - Query OCI Core Public IPs using SQL

A Public IP is a resource in Oracle Cloud Infrastructure Core Services that provides a means to access an instance, a load balancer, or other resource from outside the VCN. The resource can be ephemeral (assigned and unassigned by Oracle) or reserved (you can keep it for as long as you like). Public IPs have scope, which affects their behavior and how they're managed.

Table Usage Guide

The oci_core_public_ip table provides insights into Public IP resources within Oracle Cloud Infrastructure Core Services. As a network administrator or security engineer, explore Public IP-specific details through this table, including their assigned entities, lifecycles, and scopes. Utilize it to uncover information about Public IPs, such as those with reserved lifetimes, the resources they are assigned to, and their current availability status.

Examples

Basic info

Analyze the settings to understand the lifecycle state and creation time of your public IP addresses in Oracle Cloud Infrastructure. This can help you manage and track your resources more effectively.

select
display_name,
id,
lifecycle_state as state,
ip_address,
scope,
time_created
from
oci_core_public_ip;
select
display_name,
id,
lifecycle_state as state,
ip_address,
scope,
time_created
from
oci_core_public_ip;

List unused public IPs

Discover the segments that consist of unused public IPs to optimize resource allocation and reduce unnecessary costs. This is particularly useful in managing network resources effectively by identifying IPs that are available for use.

select
display_name,
lifecycle_state as state,
scope
from
oci_core_public_ip
where
lifecycle_state = 'AVAILABLE';
select
display_name,
lifecycle_state as state,
scope
from
oci_core_public_ip
where
lifecycle_state = 'AVAILABLE';

Schema for oci_core_public_ip

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
assigned_entity_idtextThe OCID of the entity the public IP is assigned to, or in the process of being assigned to.
assigned_entity_typetextThe type of entity the public IP is assigned to, or in the process of being assigned to.
availability_domaintext=The public IP's availability domain. This property is set only for ephemeral public IPs that are assigned to a private IP.
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_nametextA 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 public IP's Oracle ID (OCID).
ip_addressinetThe public IP address of the publicIp object.
lifecycle_statetextThe public IP's current state.
lifetimetext=Defines when the public IP is deleted and released back to Oracle's public IP pool.
public_ip_pool_idtext=The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pool object created in the current tenancy.
scopetextIndicates whether the public IP is regional or specific to a particular availability domain.
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 public IP 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_core_public_ip