Skip to main content

Module storage_notifications

Module storage_notifications 

Source
Expand description

Shared notification translation for setup generators and live controllers.

Structs§

GcsNotificationConfig
One GCS notification config: every rule of a Storage with the same queue and prefix. GCS filters by prefix only, so one config per rule would publish each object under a shared prefix once per rule. The consumer checks the suffixes instead.

Constants§

AWS_QUEUE_INGRESS_SID
Sid of the queue policy statement that lets S3 deliver a stack’s notifications.
GCS_RULE_ATTRIBUTE
Stable config identity for additive GCS notification reconciliation.
GCS_SUFFIXES_ATTRIBUTE
Custom GCS notification attributes storageEventSuffixes0, storageEventSuffixes1, … whose values, concatenated in order, form a JSON array of the config’s literal suffixes.

Functions§

aws_notification_id
Id of a rule’s S3 queue configuration. The stack prefix and a hash of the Storage’s identity let the owning controller recognise its own entries among everyone else’s.
aws_notification_id_prefix
Every aws_notification_id of one Storage starts with this.
gcs_notification_configs
GCS notification configs for a Storage’s rules, in order of first appearance.
gcs_suffixes
The literal suffixes a GCS notification’s attributes carry, or None when they carry none (every object under the config’s prefix matches).
notification_rule_key
Stable identity of what a rule delivers (queue, prefix, suffix), independent of its position, so adding or removing another rule never replaces this one’s subscription.
notifications_overlap
Whether one object key can match both rules. Rules on one Storage must not overlap: S3 rejects such a configuration (“Configuration is ambiguously defined”), so the portable declaration rejects it everywhere. Prefixes overlap when either is absent or one starts with the other; suffixes when either is absent or one ends with the other.
queue_receives_storage_notifications
Whether this queue owns an ingress grant for storage notifications in its stack.
storages_notifying_queue
Ids of the Storages in the stack that notify this queue, sorted for deterministic output.