GetSchemaCommand

Describes the specified schema in detail.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { GlueClient, GetSchemaCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetSchemaCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetSchemaInput
  SchemaId: { // SchemaId
    SchemaArn: "STRING_VALUE",
    SchemaName: "STRING_VALUE",
    RegistryName: "STRING_VALUE",
  },
};
const command = new GetSchemaCommand(input);
const response = await client.send(command);
// { // GetSchemaResponse
//   RegistryName: "STRING_VALUE",
//   RegistryArn: "STRING_VALUE",
//   SchemaName: "STRING_VALUE",
//   SchemaArn: "STRING_VALUE",
//   Description: "STRING_VALUE",
//   DataFormat: "AVRO" || "JSON" || "PROTOBUF",
//   Compatibility: "NONE" || "DISABLED" || "BACKWARD" || "BACKWARD_ALL" || "FORWARD" || "FORWARD_ALL" || "FULL" || "FULL_ALL",
//   SchemaCheckpoint: Number("long"),
//   LatestSchemaVersion: Number("long"),
//   NextSchemaVersion: Number("long"),
//   SchemaStatus: "AVAILABLE" || "PENDING" || "DELETING",
//   CreatedTime: "STRING_VALUE",
//   UpdatedTime: "STRING_VALUE",
// };

GetSchemaCommand Input

See GetSchemaCommandInput for more details

Parameter
Type
Description
SchemaId
Required
SchemaId | undefined

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

  • SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either SchemaArn or SchemaName and RegistryName has to be provided.

  • SchemaId$SchemaName: The name of the schema. Either SchemaArn or SchemaName and RegistryName has to be provided.

GetSchemaCommand Output

See GetSchemaCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Compatibility
Compatibility | undefined

The compatibility mode of the schema.

CreatedTime
string | undefined

The date and time the schema was created.

DataFormat
DataFormat | undefined

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

Description
string | undefined

A description of schema if specified when created

LatestSchemaVersion
number | undefined

The latest version of the schema associated with the returned schema definition.

NextSchemaVersion
number | undefined

The next version of the schema associated with the returned schema definition.

RegistryArn
string | undefined

The Amazon Resource Name (ARN) of the registry.

RegistryName
string | undefined

The name of the registry.

SchemaArn
string | undefined

The Amazon Resource Name (ARN) of the schema.

SchemaCheckpoint
number | undefined

The version number of the checkpoint (the last time the compatibility mode was changed).

SchemaName
string | undefined

The name of the schema.

SchemaStatus
SchemaStatus | undefined

The status of the schema.

UpdatedTime
string | undefined

The date and time the schema was updated.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to a resource was denied.

EntityNotFoundException
client

A specified entity does not exist

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

GlueServiceException
Base exception class for all service exceptions from Glue service.