## Resource: SupportEventSubscription

A support event subscription.

You can also manage support event subscriptions using other tools:

- [`gcloud support
  support-event-subscriptions`](https://docs.cloud.google.com/sdk/gcloud/reference/support/support-event-subscriptions) (or [`gcloud
  beta`](https://docs.cloud.google.com/sdk/gcloud/reference/beta/support/support-event-subscriptions) for beta)
- [Terraform `google_cloud_support_support_event_subscription`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_support_support_event_subscription) (or [google-beta provider](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/cloud_support_support_event_subscription) for beta)

| JSON representation |
|---|
| ``` { "name": string, "pubSubTopic": string, "state": enum (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions#State`), "failureReason": enum (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions#FailureReason`), "createTime": string, "updateTime": string, "deleteTime": string, "purgeTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the support event subscription. |
| `pubSubTopic` | `string` Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic} |
| `state` | ``enum (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions#State`)`` Output only. The state of the subscription. |
| `failureReason` | ``enum (`https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions#FailureReason`)`` Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the subscription was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the subscription was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the subscription was deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `purgeTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the subscription will be purged. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## State

The state of the subscription.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `WORKING` | Subscription is active and working. |
| `FAILING` | Subscription is failing. Notifications cannot be published for some reason. |
| `DELETED` | Subscription has been deleted and is pending purge. Notifications are not sent for deleted subscriptions. Deleted subscriptions are purged after their `purgeTime` has passed. |

## FailureReason

The reason why the subscription is failing.

| Enums ||
|---|---|
| `FAILURE_REASON_UNSPECIFIED` | Unspecified failure reason. |
| `PERMISSION_DENIED` | The service account (i.e. [cloud-support-apievents@system.gserviceaccount.com](mailto:cloud-support-apievents@system.gserviceaccount.com)) lacks the permission to publish to the customer's Pub/Sub topic. |
| `TOPIC_NOT_FOUND` | The specified Pub/Sub topic does not exist. |
| `OTHER` | Message failed to publish due to a system-side error. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/create` | Creates a support event subscription for an organization. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/delete` | Soft deletes a support event subscription. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/expunge` | Expunges a support event subscription. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/get` | Gets a support event subscription. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/list` | Lists support event subscriptions. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/patch` | Updates a support event subscription. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2beta/organizations.supportEventSubscriptions/undelete` | Undeletes a support event subscription. |