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_createdfrom oci_core_public_ip;
select display_name, id, lifecycle_state as state, ip_address, scope, time_createdfrom 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, scopefrom oci_core_public_ipwhere lifecycle_state = 'AVAILABLE';
select display_name, lifecycle_state as state, scopefrom oci_core_public_ipwhere lifecycle_state = 'AVAILABLE';
Schema for oci_core_public_ip
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
assigned_entity_id | text | The OCID of the entity the public IP is assigned to, or in the process of being assigned to. | |
assigned_entity_type | text | The type of entity the public IP is assigned to, or in the process of being assigned to. | |
availability_domain | text | = | The public IP's availability domain. This property is set only for ephemeral public IPs that are assigned to a private IP. |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
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. Does not have to be unique, and it's changeable. Avoid entering confidential information. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The public IP's Oracle ID (OCID). |
ip_address | inet | The public IP address of the publicIp object. | |
lifecycle_state | text | The public IP's current state. | |
lifetime | text | = | Defines when the public IP is deleted and released back to Oracle's public IP pool. |
public_ip_pool_id | text | = | The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the pool object created in the current tenancy. |
scope | text | Indicates whether the public IP is regional or specific to a particular availability domain. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
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 public IP was created. | |
title | text | Title 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