schema_versions
Creates, updates, deletes or gets a schema_version
resource or lists schema_versions
in a region
Overview
Name | schema_versions |
Type | Resource |
Description | This resource represents an individual schema version of a schema defined in Glue Schema Registry. |
Id | aws.glue.schema_versions |
Fields
Name | Datatype | Description |
---|---|---|
schema | object | Identifier for the schema where the schema version will be created. |
schema_definition | string | Complete definition of the schema in plain-text. |
version_id | string | Represents the version ID associated with the schema version. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Schema, SchemaDefinition, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.glue.schema_versions (
Schema,
SchemaDefinition,
region
)
SELECT
'{{ Schema }}',
'{{ SchemaDefinition }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.glue.schema_versions (
Schema,
SchemaDefinition,
region
)
SELECT
'{{ Schema }}',
'{{ SchemaDefinition }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: schema_version
props:
- name: Schema
value:
SchemaArn: '{{ SchemaArn }}'
SchemaName: '{{ SchemaName }}'
RegistryName: '{{ RegistryName }}'
- name: SchemaDefinition
value: '{{ SchemaDefinition }}'
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