Skip to main content

schemas

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

Overview

Nameschemas
TypeResource
DescriptionThis resource represents a schema of Glue Schema Registry.
Idawscc.glue.schemas

Fields

NameDatatypeDescription
arnstringAmazon Resource Name for the Schema.
registryobjectIdentifier for the registry which the schema is part of.
namestringName of the schema.
descriptionstringA description of the schema. If description is not provided, there will not be any default value for this.
data_formatstringData format name to use for the schema. Accepted values: 'AVRO', 'JSON', 'PROTOBUF'
compatibilitystringCompatibility setting for the schema.
schema_definitionstringDefinition for the initial schema version in plain-text.
checkpoint_versionobjectSpecify checkpoint version for update. This is only required to update the Compatibility.
tagsarrayList of tags to tag the schema
initial_schema_version_idstringRepresents the version ID associated with the initial schema version.
regionstringAWS region.

For more information, see AWS::Glue::Schema.

Methods

NameResourceAccessible byRequired Params
create_resourceschemasINSERTName, DataFormat, Compatibility, region
delete_resourceschemasDELETEIdentifier, region
update_resourceschemasUPDATEIdentifier, PatchDocument, region
list_resourcesschemas_list_onlySELECTregion
get_resourceschemasSELECTIdentifier, region

SELECT examples

Gets all properties from an individual schema.

SELECT
region,
arn,
registry,
name,
description,
data_format,
compatibility,
schema_definition,
checkpoint_version,
tags,
initial_schema_version_id
FROM awscc.glue.schemas
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.glue.schemas (
Name,
DataFormat,
Compatibility,
region
)
SELECT
'{{ name }}',
'{{ data_format }}',
'{{ compatibility }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.glue.schemas
SET PatchDocument = string('{{ {
"Description": description,
"Compatibility": compatibility,
"CheckpointVersion": checkpoint_version,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.glue.schemas
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

glue:CreateSchema,
glue:TagResource