steampipe plugin install oci

Table: oci_core_service_gateway - Query OCI Core Services using SQL

A Service Gateway in Oracle Cloud Infrastructure (OCI) Core Services enables your on-premises network to access Oracle services without exposing the data to the public internet. It provides private access from your virtual cloud network (VCN) to services in the Oracle Services Network. The traffic from your VCN to the Oracle service travels over the Oracle network fabric and never traverses the internet.

Table Usage Guide

The oci_core_service_gateway table provides insights into the Service Gateways within OCI Core Services. As a network administrator, you can use this table to explore details about each Service Gateway, including its associated VCN, lifecycle state, and the Oracle services enabled for the gateway. This can be beneficial for monitoring the status and configuration of your private network access to Oracle services.

Examples

Basic info

Explore which service gateways in your Oracle Cloud Infrastructure are active and when they were created. This can help you manage your resources and understand your usage patterns across different regions.

select
display_name,
id,
time_created,
vcn_id,
lifecycle_state,
region
from
oci_core_service_gateway;
select
display_name,
id,
time_created,
vcn_id,
lifecycle_state,
region
from
oci_core_service_gateway;

List service gateways that use route tables

Explore which service gateways are utilizing route tables. This can be beneficial in identifying potential areas of network configuration that may require optimization or troubleshooting.

select
display_name,
id,
route_table_id
from
oci_core_service_gateway
where
route_table_id is not null;
select
display_name,
id,
route_table_id
from
oci_core_service_gateway
where
route_table_id is not null;

Get enabled services for each service gateway

Explore which services are currently enabled for each service gateway. This can be useful in managing and optimizing network traffic by identifying active services.

select
display_name,
id,
s ->> 'serviceId' as service_id,
s ->> 'serviceName' as service_name
from
oci_core_service_gateway,
jsonb_array_elements(services) as s;
select
display_name,
id,
json_extract(s.value, '$.serviceId') as service_id,
json_extract(s.value, '$.serviceName') as service_name
from
oci_core_service_gateway,
json_each(services) as s;

List service gateways that block traffic

Discover the segments that are obstructing traffic flow within the service gateways. This is useful in identifying potential bottlenecks or areas of concern within your network infrastructure.

select
display_name,
id,
block_traffic
from
oci_core_service_gateway
where
block_traffic;
select
display_name,
id,
block_traffic
from
oci_core_service_gateway
where
block_traffic = 1;

Schema for oci_core_service_gateway

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
block_trafficbooleanSpecifies whether the service gateway blocks traffic through it.
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 of the service gateway.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the service gateway.
lifecycle_statetext=The service gateway's current state.
regiontextThe OCI region in which the resource is located.
route_table_idtextThe OCID of the route table the service gateway is using.
servicesjsonbList of the Service objects enabled for this service gateway.
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 service gateway was created
titletextTitle of the resource.
vcn_idtext=The OCID of the VCN the service gateway 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_service_gateway