get_schema_by_definition

Glue.Client.get_schema_by_definition(**kwargs)

Retrieves a schema by the SchemaDefinition . The schema definition is sent to the Schema Registry, canonicalized, and hashed. If the hash is matched within the scope of the SchemaName or ARN (or the default registry, if none is supplied), that schema’s metadata is returned. Otherwise, a 404 or NotFound error is returned. Schema versions in Deleted statuses will not be included in the results.

See also: AWS API Documentation

Request Syntax

response = client.get_schema_by_definition(
    SchemaId={
        'SchemaArn': 'string',
        'SchemaName': 'string',
        'RegistryName': 'string'
    },
    SchemaDefinition='string'
)
Parameters
  • SchemaId (dict) --

    [REQUIRED]

    This is a wrapper structure to contain schema identity fields. The structure contains:

    • SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.
    • SchemaId$SchemaName: The name of the schema. One of SchemaArn or SchemaName has to be provided.
    • SchemaArn (string) --

      The Amazon Resource Name (ARN) of the schema. One of SchemaArn or SchemaName has to be provided.

    • SchemaName (string) --

      The name of the schema. One of SchemaArn or SchemaName has to be provided.

    • RegistryName (string) --

      The name of the schema registry that contains the schema.

  • SchemaDefinition (string) --

    [REQUIRED]

    The definition of the schema for which schema details are required.

Return type

dict

Returns

Response Syntax

{
    'SchemaVersionId': 'string',
    'SchemaArn': 'string',
    'DataFormat': 'AVRO'|'JSON'|'PROTOBUF',
    'Status': 'AVAILABLE'|'PENDING'|'FAILURE'|'DELETING',
    'CreatedTime': 'string'
}

Response Structure

  • (dict) --

    • SchemaVersionId (string) --

      The schema ID of the schema version.

    • SchemaArn (string) --

      The Amazon Resource Name (ARN) of the schema.

    • DataFormat (string) --

      The data format of the schema definition. Currently AVRO , JSON and PROTOBUF are supported.

    • Status (string) --

      The status of the schema version.

    • CreatedTime (string) --

      The date and time the schema was created.

Exceptions

  • Glue.Client.exceptions.InvalidInputException
  • Glue.Client.exceptions.AccessDeniedException
  • Glue.Client.exceptions.EntityNotFoundException
  • Glue.Client.exceptions.InternalServiceException