turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
On This Page
Get Involved

Table: gcp_pubsub_snapshot

Snapshots are used in for seek operations, which allow you to manage message acknowledgments in bulk.

Examples

Basic info

select
name,
topic_name,
expire_time,
tags
from
gcp_pubsub_snapshot;

Find pubsub snapshots with policies that grant public access

select
name,
split_part(s ->> 'role', '/', 2) as role,
entity
from
gcp_pubsub_snapshot,
jsonb_array_elements(iam_policy -> 'bindings') as s,
jsonb_array_elements_text(s -> 'members') as entity
where
entity = 'allUsers'
or entity = 'allAuthenticatedUsers';

.inspect gcp_pubsub_snapshot

GCP Pub/Sub Snapshot

NameTypeDescription
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
expire_timetimestamp without time zoneThe snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`.
iam_policyjsonbAn Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`.
labelsjsonbA set of labels attached with the snapshot.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametextThe name of the snapshot
projecttextThe GCP Project in which the resource is located.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
topictextThe name of the topic from which this snapshot is retaining messages
topic_nametextThe short name of the topic from which this snapshot is retaining messages.