steampipe plugin install oci

Table: oci_core_dhcp_options - Query OCI Core DHCP Options using SQL

OCI Core DHCP Options is a resource within Oracle Cloud Infrastructure that allows you to manage options for the Dynamic Host Configuration Protocol (DHCP). DHCP options determine how DHCP-enabled devices operate in a VCN (Virtual Cloud Network). It includes options such as domain name servers, search domains, and more, providing a centralized way to manage and configure these options for your VCN.

Table Usage Guide

The oci_core_dhcp_options table provides insights into DHCP Options within Oracle Cloud Infrastructure Core Services. As a network administrator, explore option-specific details through this table, including the associated VCN, domain name servers, search domains, and more. Utilize it to manage and configure your network settings, ensuring optimal operation of DHCP-enabled devices within your VCN.

Examples

Basic info

Explore the state and creation time of your Oracle Cloud Infrastructure's DHCP options to understand their lifecycle and location. This can help you assess their configuration and manage your resources more efficiently.

select
display_name,
id,
time_created,
lifecycle_state as state,
region
from
oci_core_dhcp_options;
select
display_name,
id,
time_created,
lifecycle_state as state,
region
from
oci_core_dhcp_options;

Get configuration info for each DHCP option

Explore the configuration details of each DHCP option to understand the server type and custom DNS servers. This can be particularly useful for network administrators who want to manage and optimize their network configurations.

select
id,
display_name,
jsonb_array_elements_text(o -> 'searchDomainNames') as search_domain_names,
jsonb_array_elements_text(o -> 'customDnsServers') as custom_dns_servers,
o ->> 'serverType' as server_type,
o ->> 'type' as type
from
oci_core_dhcp_options,
jsonb_array_elements(options) as o;
select
id,
display_name,
json_extract(o.value, '$.searchDomainNames') as search_domain_names,
json_extract(o.value, '$.customDnsServers') as custom_dns_servers,
json_extract(o.value, '$.serverType') as server_type,
json_extract(o.value, '$.type') as type
from
oci_core_dhcp_options,
json_each(options) as o;

Count the number of DHCP options by VCN

Identify the quantity of DHCP options for each Virtual Cloud Network (VCN) to understand the network configuration and manage resources effectively. This can aid in optimizing network performance and troubleshooting network issues.

select
vcn_id,
count(*) dhcp_option_count
from
oci_core_dhcp_options
group by
vcn_id;
select
vcn_id,
count(*) dhcp_option_count
from
oci_core_dhcp_options
group by
vcn_id;

Schema for oci_core_dhcp_options

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 of the DHCP options.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the DHCP options.
lifecycle_statetext=The DHCP options's current state.
optionsjsonbThe collection of individual DHCP options.
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 DHCP options was created.
titletextTitle of the resource.
vcn_idtext=The OCID of the VCN the DHCP options belongs to.

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_dhcp_options