resource_preferences
Creates, updates, deletes, gets or lists a resource_preferences resource.
Overview
| Name | resource_preferences |
| Type | Resource |
| Id | confluent.notifications.resource_preferences |
Fields
The following fields are returned by SELECT queries:
- get_notifications_v1_resource_preference
- get_notifications_v1_resource_preference_by_filter
Resource Preference.
| 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 resource preference. When the resource preference is ENABLED, the user will receive notifications for the Confluent Cloud resource. If the resource preference is DISABLED, the user will not receive any notification for the resource. Note that, you will still receive notifications for REQUIRED notification type even when it is DISABLED. (example: ENABLED) |
kind | string | Kind defines the object this REST resource represents. (ResourcePreference) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
resource | string | Denotes the Confluent Cloud resource definition. (example: environment=env-456xy/cloud-cluster=lkc-df123/connector=my_datagen_connector) |
resource_type | string | Denotes the Confluent Cloud resource type. (example: CONNECTOR) |
Resource Preference.
| 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 resource preference. When the resource preference is ENABLED, the user will receive notifications for the Confluent Cloud resource. If the resource preference is DISABLED, the user will not receive any notification for the resource. Note that, you will still receive notifications for REQUIRED notification type even when it is DISABLED. (example: ENABLED) |
kind | string | Kind defines the object this REST resource represents. (ResourcePreference) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
resource | string | Denotes the Confluent Cloud resource definition. (example: environment=env-456xy/cloud-cluster=lkc-df123/connector=my_datagen_connector) |
resource_type | string | Denotes the Confluent Cloud resource type. (example: CONNECTOR) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_notifications_v1_resource_preference | select | id | Make a request to read a resource preference. | |
get_notifications_v1_resource_preference_by_filter | select | resource, resource_type | page_size, page_token | Make a request to read_by_filter a resource preference. |
create_notifications_v1_resource_preference | insert | resource, resource_type | Make a request to create a resource preference. | |
update_notifications_v1_resource_preference | update | id | Make a request to update a resource preference. | |
delete_notifications_v1_resource_preference | delete | id | Make a request to delete a resource preference. |
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 resource preference. |
resource | string | Confluent Cloud resource definition |
resource_type | string | Confluent Cloud resource type |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
SELECT examples
- get_notifications_v1_resource_preference
- get_notifications_v1_resource_preference_by_filter
Make a request to read a resource preference.
SELECT
id,
api_version,
current_state,
kind,
metadata,
resource,
resource_type
FROM confluent.notifications.resource_preferences
WHERE id = '{{ id }}' -- required
;
Make a request to read_by_filter a resource preference.
SELECT
id,
api_version,
current_state,
kind,
metadata,
resource,
resource_type
FROM confluent.notifications.resource_preferences
WHERE resource = '{{ resource }}' -- required
AND resource_type = '{{ resource_type }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_notifications_v1_resource_preference
- Manifest
Make a request to create a resource preference.
INSERT INTO confluent.notifications.resource_preferences (
resource,
resource_type,
current_state
)
SELECT
'{{ resource }}' /* required */,
'{{ resource_type }}' /* required */,
'{{ current_state }}'
RETURNING
id,
api_version,
current_state,
kind,
metadata,
resource,
resource_type
;
# Description fields are for documentation purposes
- name: resource_preferences
props:
- name: resource
value: "{{ resource }}"
description: |
Denotes the Confluent Cloud resource definition.
- name: resource_type
value: "{{ resource_type }}"
description: |
Denotes the Confluent Cloud resource type.
- name: current_state
value: "{{ current_state }}"
description: |
Denotes the state of the resource preference. When the resource preference is ENABLED, the user will receive
notifications for the Confluent Cloud resource. If the resource preference is DISABLED, the user will not
receive any notification for the resource.
Note that, you will still receive notifications for `REQUIRED` notification type even when it is DISABLED.
UPDATE examples
- update_notifications_v1_resource_preference
Make a request to update a resource preference.
UPDATE confluent.notifications.resource_preferences
SET
resource = '{{ resource }}',
resource_type = '{{ resource_type }}',
current_state = '{{ current_state }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
api_version,
current_state,
kind,
metadata,
resource,
resource_type;
DELETE examples
- delete_notifications_v1_resource_preference
Make a request to delete a resource preference.
DELETE FROM confluent.notifications.resource_preferences
WHERE id = '{{ id }}' --required
;