Skip to main content

schema_versions

Creates, updates, deletes or gets a schema_version resource or lists schema_versions in a region

Overview

Nameschema_versions
TypeResource
DescriptionThis resource represents an individual schema version of a schema defined in Glue Schema Registry.
Idaws.glue.schema_versions

Fields

NameDatatypeDescription
schemaobjectIdentifier for the schema where the schema version will be created.
schema_definitionstringComplete definition of the schema in plain-text.
version_idstringRepresents the version ID associated with the schema version.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTSchema, SchemaDefinition, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all schema_versions in a region.

SELECT
region,
schema,
schema_definition,
version_id
FROM aws.glue.schema_versions
WHERE region = 'us-east-1';

Gets all properties from an individual schema_version.

SELECT
region,
schema,
schema_definition,
version_id
FROM aws.glue.schema_versions
WHERE region = 'us-east-1' AND data__Identifier = '<VersionId>';

INSERT example

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

/*+ create */
INSERT INTO aws.glue.schema_versions (
Schema,
SchemaDefinition,
region
)
SELECT
'{{ Schema }}',
'{{ SchemaDefinition }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.glue.schema_versions
WHERE data__Identifier = '<VersionId>'
AND region = 'us-east-1';

Permissions

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

Create

glue:RegisterSchemaVersion,
glue:GetSchemaVersion,
glue:GetSchemaByDefinition

Read

glue:GetSchemaVersion

Delete

glue:DeleteSchemaVersions,
glue:GetSchemaVersion

List

glue:ListSchemaVersions