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, regionfrom oci_core_dhcp_options;
select display_name, id, time_created, lifecycle_state as state, regionfrom 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 typefrom 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 typefrom 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_countfrom oci_core_dhcp_optionsgroup by vcn_id;
select vcn_id, count(*) dhcp_option_countfrom oci_core_dhcp_optionsgroup by vcn_id;
Query examples
Schema for oci_core_dhcp_options
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
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 of the DHCP options. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the DHCP options. |
lifecycle_state | text | = | The DHCP options's current state. |
options | jsonb | The collection of individual DHCP options. | |
region | text | The OCI region in which the resource is located. | |
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 DHCP options was created. | |
title | text | Title of the resource. | |
vcn_id | text | = | 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