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, regionfrom oci_core_service_gateway;
select display_name, id, time_created, vcn_id, lifecycle_state, regionfrom 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_idfrom oci_core_service_gatewaywhere route_table_id is not null;
select display_name, id, route_table_idfrom oci_core_service_gatewaywhere 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_namefrom 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_namefrom 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_trafficfrom oci_core_service_gatewaywhere block_traffic;
select display_name, id, block_trafficfrom oci_core_service_gatewaywhere block_traffic = 1;
Schema for oci_core_service_gateway
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
block_traffic | boolean | Specifies whether the service gateway blocks traffic through it. | |
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 service gateway. | |
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 service gateway. |
lifecycle_state | text | = | The service gateway's current state. |
region | text | The OCI region in which the resource is located. | |
route_table_id | text | The OCID of the route table the service gateway is using. | |
services | jsonb | List of the Service objects enabled for this service gateway. | |
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 service gateway was created | |
title | text | Title of the resource. | |
vcn_id | text | = | 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