- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetSchemaVersionCommand
Get the specified schema by its unique ID assigned when a version of the schema is created or registered. Schema versions in Deleted status will not be included in the results.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, GetSchemaVersionCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetSchemaVersionCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetSchemaVersionInput
SchemaId: { // SchemaId
SchemaArn: "STRING_VALUE",
SchemaName: "STRING_VALUE",
RegistryName: "STRING_VALUE",
},
SchemaVersionId: "STRING_VALUE",
SchemaVersionNumber: { // SchemaVersionNumber
LatestVersion: true || false,
VersionNumber: Number("long"),
},
};
const command = new GetSchemaVersionCommand(input);
const response = await client.send(command);
// { // GetSchemaVersionResponse
// SchemaVersionId: "STRING_VALUE",
// SchemaDefinition: "STRING_VALUE",
// DataFormat: "AVRO" || "JSON" || "PROTOBUF",
// SchemaArn: "STRING_VALUE",
// VersionNumber: Number("long"),
// Status: "AVAILABLE" || "PENDING" || "FAILURE" || "DELETING",
// CreatedTime: "STRING_VALUE",
// };
GetSchemaVersionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SchemaId | SchemaId | undefined | This is a wrapper structure to contain schema identity fields. The structure contains:
|
SchemaVersionId | string | undefined | The |
SchemaVersionNumber | SchemaVersionNumber | undefined | The version number of the schema. |
GetSchemaVersionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CreatedTime | string | undefined | The date and time the schema version was created. |
DataFormat | DataFormat | undefined | The data format of the schema definition. Currently |
SchemaArn | string | undefined | The Amazon Resource Name (ARN) of the schema. |
SchemaDefinition | string | undefined | The schema definition for the schema ID. |
SchemaVersionId | string | undefined | The |
Status | SchemaVersionStatus | undefined | The status of the schema version. |
VersionNumber | number | undefined | The version number of the schema. |
Throws
Name | Fault | Details |
---|
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. |