turbot/gcp_insights

Query: pubsub_topic_subscription_details

Usage

powerpipe query gcp_insights.query.pubsub_topic_subscription_details

SQL

with pubsub_subscription as (
select
name,
self_link,
topic_name,
retain_acked_messages,
message_retention_duration,
dead_letter_policy_max_delivery_attempts
from
gcp_pubsub_subscription
where
project = split_part($1, '/', 6)
), pubsub_topic as (
select
self_link,
name
from
gcp_pubsub_topic
where
project = split_part($1, '/', 6)
and self_link = $1
)
select
k.name as "Name",
topic_name as "Topic Name",
message_retention_duration as "Message Retention Duration",
retain_acked_messages as "Retain Acknowledged Messages",
dead_letter_policy_max_delivery_attempts as "Maximum Number of Delivery Attempts"
from
pubsub_topic p,
pubsub_subscription k
where
p.name = k.topic_name;

Dashboards

The query is used in the dashboards: