Skip to main content

modes

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

Overview

Namemodes
TypeResource
Idconfluent.schema_registry.modes

Fields

The following fields are returned by SELECT queries:

The subject mode.

NameDatatypeDescription
modestringSchema Registry operating mode (example: READWRITE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_modeselectsubjectdefaultToGlobalRetrieves the subject mode.
get_top_level_modeselectRetrieves global mode.
update_modereplacesubjectforceUpdate mode for the specified subject. On success, echoes the original request back to the client.
update_top_level_modereplaceforceUpdate global mode. On success, echoes the original request back to the client.
delete_subject_modedeletesubjectDeletes 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.

NameDatatypeDescription
subjectstringName of the subject
defaultToGlobalbooleanWhether to return the global mode if subject mode not found
forcebooleanWhether to force update if setting mode to IMPORT and schemas currently exist

SELECT examples

Retrieves the subject mode.

SELECT
mode
FROM confluent.schema_registry.modes
WHERE subject = '{{ subject }}' -- required
AND defaultToGlobal = '{{ defaultToGlobal }}'
;

REPLACE examples

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;

DELETE examples

Deletes the specified subject-level mode and reverts to the global default.

DELETE FROM confluent.schema_registry.modes
WHERE subject = '{{ subject }}' --required
;