<br />

To try out the methods for this resource, see [Methods](https://docs.cloud.google.com/storage/docs/json_api/v1/notifications.md.txt#methods).

## Resource representations

A subscription to receive [Pub/Sub
notifications](https://docs.cloud.google.com/storage/docs/pubsub-notifications).

```
{
  "id": string,
  "topic": string,
  "event_types": [
    string
  ],
  "custom_attributes": {
    (key): string
  },
  "payload_format": string,
  "object_name_prefix": string,
  "etag": string,
  "selfLink": string,
  "kind": "storage#notification"
}
```

| Property name | Value | Description | Notes |
|---|---|---|---|
| `custom_attributes` | `object` | An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription. | writable |
| `custom_attributes.(key)` | `string` |   |   |
| `etag` | `string` | HTTP 1.1 [Entity tag](https://datatracker.ietf.org/doc/html/rfc7232#section-2.3) for this subscription notification. |   |
| `event_types[]` | `list` | If present, only send notifications about listed [event types](https://docs.cloud.google.com/storage/docs/pubsub-notifications.md.txt#events). If empty, send notifications for all event types. | writable |
| `id` | `string` | The ID of the notification. |   |
| `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. | writable |
| `payload_format` | `string` | The desired content of the Payload. <br /> Acceptable values are: - `"JSON_API_V1"` - `"NONE"` | writable |
| `selfLink` | `string` | The canonical URL of this notification. |   |
| `topic` | `string` | The Pub/Sub topic to which this subscription publishes. Formatted as: `"//pubsub.googleapis.com/projects/PROJECT-IDENTIFIER/topics/TOPIC-NAME"` | writable |

## Methods

[delete](https://docs.cloud.google.com/storage/docs/json_api/v1/notifications/delete.md.txt)
:   Permanently deletes a notification subscription.

[get](https://docs.cloud.google.com/storage/docs/json_api/v1/notifications/get.md.txt)
:   View a notification configuration.

[insert](https://docs.cloud.google.com/storage/docs/json_api/v1/notifications/insert.md.txt)
:   Creates a notification subscription for a given bucket.

[list](https://docs.cloud.google.com/storage/docs/json_api/v1/notifications/list.md.txt)
:   Retrieves a list of notification subscriptions for a given bucket.