Skip to main content

schemata

Creates, updates, deletes or gets a schema resource or lists schemata in a region

Overview

Nameschemata
TypeResource
DescriptionResource Type definition for AWS::EventSchemas::Schema
Idaws.eventschemas.schemata

Fields

NameDatatypeDescription
typestringThe type of schema. Valid types include OpenApi3 and JSONSchemaDraft4.
descriptionstringA description of the schema.
schema_versionstringThe version number of the schema.
contentstringThe source of the schema definition.
registry_namestringThe name of the schema registry.
schema_arnstringThe ARN of the schema.
schema_namestringThe name of the schema.
last_modifiedstringThe last modified time of the schema.
version_created_datestringThe date the schema version was created.
tagsarrayTags associated with the resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, Content, RegistryName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all schemata in a region.

SELECT
region,
type,
description,
schema_version,
content,
registry_name,
schema_arn,
schema_name,
last_modified,
version_created_date,
tags
FROM aws.eventschemas.schemata
WHERE region = 'us-east-1';

Gets all properties from an individual schema.

SELECT
region,
type,
description,
schema_version,
content,
registry_name,
schema_arn,
schema_name,
last_modified,
version_created_date,
tags
FROM aws.eventschemas.schemata
WHERE region = 'us-east-1' AND data__Identifier = '<SchemaArn>';

INSERT example

Use the following StackQL query and manifest file to create a new schema resource, using stack-deploy.

/*+ create */
INSERT INTO aws.eventschemas.schemata (
Type,
Content,
RegistryName,
region
)
SELECT
'{{ Type }}',
'{{ Content }}',
'{{ RegistryName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.eventschemas.schemata
WHERE data__Identifier = '<SchemaArn>'
AND region = 'us-east-1';

Permissions

To operate on the schemata resource, the following permissions are required:

Create

schemas:DescribeSchema,
schemas:CreateSchema,
schemas:TagResource

Read

schemas:DescribeSchema

Update

schemas:DescribeSchema,
schemas:UpdateSchema,
schemas:TagResource,
schemas:UntagResource,
schemas:ListTagsForResource

Delete

schemas:DescribeSchema,
schemas:DeleteSchema,
schemas:DeleteSchemaVersion

List

schemas:ListSchemas,
schemas:ListSchemaVersions