modes
Creates, updates, deletes, gets or lists a modes resource.
Overview
| Name | modes |
| Type | Resource |
| Id | confluent.schema_registry.modes |
Fields
The following fields are returned by SELECT queries:
- get_mode
- get_top_level_mode
The subject mode.
| Name | Datatype | Description |
|---|---|---|
mode | string | Schema Registry operating mode (example: READWRITE) |
The global mode
| Name | Datatype | Description |
|---|---|---|
mode | string | Schema Registry operating mode (example: READWRITE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_mode | select | subject | defaultToGlobal | Retrieves the subject mode. |
get_top_level_mode | select | Retrieves global mode. | ||
update_mode | replace | subject | force | Update mode for the specified subject. On success, echoes the original request back to the client. |
update_top_level_mode | replace | force | Update global mode. On success, echoes the original request back to the client. | |
delete_subject_mode | delete | subject | Deletes the specified subject-level mode and reverts to the global default. |
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 |
|---|---|---|
subject | string | Name of the subject |
defaultToGlobal | boolean | Whether to return the global mode if subject mode not found |
force | boolean | Whether to force update if setting mode to IMPORT and schemas currently exist |
SELECT examples
- get_mode
- get_top_level_mode
Retrieves the subject mode.
SELECT
mode
FROM confluent.schema_registry.modes
WHERE subject = '{{ subject }}' -- required
AND defaultToGlobal = '{{ defaultToGlobal }}'
;
Retrieves global mode.
SELECT
mode
FROM confluent.schema_registry.modes
;
REPLACE examples
- update_mode
- update_top_level_mode
Update mode for the specified subject. On success, echoes the original request back to the client.
REPLACE confluent.schema_registry.modes
SET
mode = '{{ mode }}'
WHERE
subject = '{{ subject }}' --required
AND force = {{ force}}
RETURNING
mode;
Update global mode. On success, echoes the original request back to the client.
REPLACE confluent.schema_registry.modes
SET
mode = '{{ mode }}'
WHERE
force = {{ force}}
RETURNING
mode;
DELETE examples
- delete_subject_mode
Deletes the specified subject-level mode and reverts to the global default.
DELETE FROM confluent.schema_registry.modes
WHERE subject = '{{ subject }}' --required
;