subjects
Creates, updates, deletes, gets or lists a subjects resource.
Overview
| Name | subjects |
| Type | Resource |
| Id | google.managedkafka.subjects |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
contentType | string | The HTTP Content-Type header value specifying the content type of the body. |
data | string (byte) | The HTTP request/response body as raw binary. |
extensions | array | Application specific response metadata. Must be set in the first response for streaming APIs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | projectsId, locationsId, schemaRegistriesId, schemasId | subject, deleted | List subjects which reference a particular schema id. The response will be an array of subject names. |
delete | delete | projectsId, locationsId, schemaRegistriesId, contextsId, subjectsId | permanent | Delete a subject. The response will be an array of versions of the deleted subject. |
lookup_version | exec | projectsId, locationsId, schemaRegistriesId, contextsId, subjectsId | Lookup a schema under the specified subject. |
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 |
|---|---|---|
contextsId | string | |
locationsId | string | |
projectsId | string | |
schemaRegistriesId | string | |
schemasId | string | |
subjectsId | string | |
deleted | boolean | |
permanent | boolean | |
subject | string |
SELECT examples
- list
List subjects which reference a particular schema id. The response will be an array of subject names.
SELECT
contentType,
data,
extensions
FROM google.managedkafka.subjects
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' -- required
AND schemasId = '{{ schemasId }}' -- required
AND subject = '{{ subject }}'
AND deleted = '{{ deleted }}'
;
DELETE examples
- delete
Delete a subject. The response will be an array of versions of the deleted subject.
DELETE FROM google.managedkafka.subjects
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' --required
AND contextsId = '{{ contextsId }}' --required
AND subjectsId = '{{ subjectsId }}' --required
AND permanent = '{{ permanent }}'
;
Lifecycle Methods
- lookup_version
Lookup a schema under the specified subject.
EXEC google.managedkafka.subjects.lookup_version
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@schemaRegistriesId='{{ schemaRegistriesId }}' --required,
@contextsId='{{ contextsId }}' --required,
@subjectsId='{{ subjectsId }}' --required
@@json=
'{
"schemaType": "{{ schemaType }}",
"normalize": {{ normalize }},
"references": "{{ references }}",
"deleted": {{ deleted }},
"schema": "{{ schema }}"
}'
;