notifications
Creates, updates, deletes, gets or lists a notifications
resource.
Overview
Name | notifications |
Type | Resource |
Id | google.storage.notifications |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The ID of the notification. |
custom_attributes | object | An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
etag | string | HTTP 1.1 Entity tag for this subscription notification. |
event_types | array | If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
kind | string | The kind of item this is. For notifications, this is always storage#notification. |
object_name_prefix | string | If present, only apply this notification configuration to object names that begin with this prefix. |
payload_format | string | The desired content of the Payload. |
selfLink | string | The canonical URL of this notification. |
topic | string | The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | bucket, notification | View a notification configuration. |
list | SELECT | bucket | Retrieves a list of notification subscriptions for a given bucket. |
insert | INSERT | bucket | Creates a notification subscription for a given bucket. |
delete | DELETE | bucket, notification | Permanently deletes a notification subscription. |
SELECT
examples
Retrieves a list of notification subscriptions for a given bucket.
SELECT
id,
custom_attributes,
etag,
event_types,
kind,
object_name_prefix,
payload_format,
selfLink,
topic
FROM google.storage.notifications
WHERE bucket = '{{ bucket }}';
INSERT
example
Use the following StackQL query and manifest file to create a new notifications
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.storage.notifications (
bucket,
custom_attributes,
etag,
event_types,
object_name_prefix,
payload_format,
topic
)
SELECT
'{{ bucket }}',
'{{ custom_attributes }}',
'{{ etag }}',
'{{ event_types }}',
'{{ object_name_prefix }}',
'{{ payload_format }}',
'{{ topic }}'
;
- name: your_resource_model_name
props:
- name: custom_attributes
value: object
- name: etag
value: string
- name: event_types
value:
- string
- name: id
value: string
- name: kind
value: string
- name: object_name_prefix
value: string
- name: payload_format
value: string
- name: selfLink
value: string
- name: topic
value: string
DELETE
example
Deletes the specified notifications
resource.
/*+ delete */
DELETE FROM google.storage.notifications
WHERE bucket = '{{ bucket }}'
AND notification = '{{ notification }}';