subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | confluent.notifications.subscriptions |
Fields
The following fields are returned by SELECT queries:
- get_notifications_v1_subscription
- list_notifications_v1_subscriptions
Subscription.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (notifications/v1) |
current_state | string | Denotes the state of the subscription. When the subscription is ENABLED, the user will receive notification on the configured Integrations. If the subscription is DISABLED, the user will not recieve any notification for the configured notification type. Note that, you cannot disable a subscription for REQUIRED notification type. (example: ENABLED) |
integrations | array | Integrations to which notifications are to be sent. |
kind | string | Kind defines the object this REST resource represents. (Subscription) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
notification_type | object | The type of notification to subscribe to. |
Subscription.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (notifications/v1) |
current_state | string | Denotes the state of the subscription. When the subscription is ENABLED, the user will receive notification on the configured Integrations. If the subscription is DISABLED, the user will not recieve any notification for the configured notification type. Note that, you cannot disable a subscription for REQUIRED notification type. (example: ENABLED) |
integrations | array | Integrations to which notifications are to be sent. |
kind | string | Kind defines the object this REST resource represents. (Subscription) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
notification_type | object | The type of notification to subscribe to. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_notifications_v1_subscription | select | id | Make a request to read a subscription. | |
list_notifications_v1_subscriptions | select | page_size, page_token | Retrieve a sorted, filtered, paginated list of all subscriptions. | |
create_notifications_v1_subscription | insert | notification_type, integrations | Make a request to create a subscription. | |
update_notifications_v1_subscription | update | id | Make a request to update a subscription. | |
delete_notifications_v1_subscription | delete | id | Make a request to delete a subscription. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for the subscription. |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
SELECT examples
- get_notifications_v1_subscription
- list_notifications_v1_subscriptions
Make a request to read a subscription.
SELECT
id,
api_version,
current_state,
integrations,
kind,
metadata,
notification_type
FROM confluent.notifications.subscriptions
WHERE id = '{{ id }}' -- required
;
Retrieve a sorted, filtered, paginated list of all subscriptions.
SELECT
id,
api_version,
current_state,
integrations,
kind,
metadata,
notification_type
FROM confluent.notifications.subscriptions
WHERE page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_notifications_v1_subscription
- Manifest
Make a request to create a subscription.
INSERT INTO confluent.notifications.subscriptions (
current_state,
notification_type,
integrations
)
SELECT
'{{ current_state }}',
'{{ notification_type }}' /* required */,
'{{ integrations }}' /* required */
RETURNING
id,
api_version,
current_state,
integrations,
kind,
metadata,
notification_type
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: current_state
value: "{{ current_state }}"
description: |
Denotes the state of the subscription. When the subscription is ENABLED, the user will receive
notification on the configured Integrations. If the subscription is DISABLED, the user will not
recieve any notification for the configured notification type. Note that, you cannot disable
a subscription for `REQUIRED` notification type.
- name: notification_type
description: |
The type of notification to subscribe to.
value:
id: "{{ id }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
- name: integrations
description: |
Integrations to which notifications are to be sent.
value:
- id: "{{ id }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
UPDATE examples
- update_notifications_v1_subscription
Make a request to update a subscription.
UPDATE confluent.notifications.subscriptions
SET
current_state = '{{ current_state }}',
notification_type = '{{ notification_type }}',
integrations = '{{ integrations }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
api_version,
current_state,
integrations,
kind,
metadata,
notification_type;
DELETE examples
- delete_notifications_v1_subscription
Make a request to delete a subscription.
DELETE FROM confluent.notifications.subscriptions
WHERE id = '{{ id }}' --required
;