Skip to main content

subscriptions

Creates, updates, deletes, gets or lists a subscriptions resource.

Overview

Namesubscriptions
TypeResource
Idconfluent.notifications.subscriptions

Fields

NameDatatypeDescription
idstringID 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").
api_versionstringAPIVersion defines the schema version of this representation of a resource.
current_statestringDenotes 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.
integrationsarrayIntegrations to which notifications are to be sent.
kindstringKind defines the object this REST resource represents.
metadata``ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
notification_typeobjectThe type of notification to subscribe to.

Methods

NameAccessible byRequired ParamsDescription
get_notifications_v1subscriptionSELECTidGeneral Availability Make a request to read a subscription.
list_notifications_v1subscriptionsSELECTGeneral Availability Retrieve a sorted, filtered, paginated list of all subscriptions.
create_notifications_v1subscriptionINSERTGeneral Availability Make a request to create a subscription.
delete_notifications_v1subscriptionDELETEidGeneral Availability Make a request to delete a subscription.
update_notifications_v1subscriptionUPDATEidGeneral Availability Make a request to update a subscription.

SELECT examples

General Availability Retrieve a sorted, filtered, paginated list of all subscriptions.

SELECT
id,
api_version,
current_state,
integrations,
kind,
metadata,
notification_type
FROM confluent.notifications.subscriptions
;

INSERT example

Use the following StackQL query and manifest file to create a new subscriptions resource.

/*+ create */
INSERT INTO confluent.notifications.subscriptions (
data__current_state,
data__notification_type,
data__integrations
)
SELECT
'{{ current_state }}',
'{{ notification_type }}',
'{{ integrations }}'
;

UPDATE example

Updates a subscriptions resource.

/*+ update */
UPDATE confluent.notifications.subscriptions
SET
current_state = '{{ current_state }}',
integrations = '{{ integrations }}'
WHERE
id = '{{ id }}';

DELETE example

Deletes the specified subscriptions resource.

/*+ delete */
DELETE FROM confluent.notifications.subscriptions
WHERE id = '{{ id }}';