steampipe plugin install oci

Table: oci_ons_subscription - Query OCI Notification Service Subscriptions using SQL

The Oracle Cloud Infrastructure (OCI) Notification Service is a cloud messaging service for sending notifications to large numbers of recipients. It enables you to broadcast messages to distributed components by topic, through a publish-subscribe pattern. This service ensures that messages are delivered to all active, healthy subscribers in a topic.

Table Usage Guide

The oci_ons_subscription table provides insights into subscriptions within the OCI Notification Service. As a DevOps engineer, explore subscription-specific details through this table, including subscription protocol, endpoint, and associated metadata. Utilize it to uncover information about subscriptions, such as their delivery policy, effective delivery policy, and the status of the subscription.

Examples

Basic info

Explore which topics are subscribed to in the Oracle Cloud Infrastructure (OCI) messaging service, understanding the lifecycle state and protocol of each. This aids in monitoring the health and status of your subscribed topics for efficient message processing.

select
id,
topic_id,
lifecycle_state,
protocol,
endpoint,
etag
from
oci_ons_subscription;
select
id,
topic_id,
lifecycle_state,
protocol,
endpoint,
etag
from
oci_ons_subscription;

List subscriptions in a pending state

Explore which subscriptions are in a pending state to assess their status and take necessary actions. This is useful in managing subscriptions and ensuring timely activation or termination.

select
id,
lifecycle_state,
protocol,
endpoint
from
oci_ons_subscription
where
lifecycle_state = 'PENDING';
select
id,
lifecycle_state,
protocol,
endpoint
from
oci_ons_subscription
where
lifecycle_state = 'PENDING';

Get subscription count by topic ID

Explore the distribution of subscriptions across different topics. This can be useful to understand which topics are attracting the most subscribers, aiding in content strategy and resource allocation.

select
topic_id,
count(id) as subscription_count
from
oci_ons_subscription
group by
topic_id;
select
topic_id,
count(id) as subscription_count
from
oci_ons_subscription
group by
topic_id;

Get subscription count by protocol

Analyze the distribution of different protocols to understand the overall usage patterns in your Oracle Cloud Infrastructure (OCI) Notification Service subscriptions. This can help in optimizing resource allocation and planning for future requirements.

select
protocol,
count(protocol) as protocol_count
from
oci_ons_subscription
group by
protocol;
select
protocol,
count(protocol) as protocol_count
from
oci_ons_subscription
group by
protocol;

Schema for oci_ons_subscription

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
created_timetimestamp with time zoneThe time when this subscription was created.
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.
delivery_policyjsonbDelivery Policy of the subscription.
endpointtextA locator that corresponds to the subscription protocol.
etagtextUsed for optimistic concurrency control.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the subscription.
lifecycle_statetextThe lifecycle state of the subscription.
protocoltextThe protocol used for the subscription.
regiontextThe OCI region in which the resource is located.
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.
titletextTitle of the resource.
topic_idtext=The OCID of the associated topic.

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_ons_subscription