- 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.
GetSchemaVersionsDiffCommand
Fetches the schema version difference in the specified difference type between two stored schema versions in the Schema Registry.
This API allows you to compare two schema versions between two schema definitions under the same schema.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, GetSchemaVersionsDiffCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetSchemaVersionsDiffCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetSchemaVersionsDiffInput
SchemaId: { // SchemaId
SchemaArn: "STRING_VALUE",
SchemaName: "STRING_VALUE",
RegistryName: "STRING_VALUE",
},
FirstSchemaVersionNumber: { // SchemaVersionNumber
LatestVersion: true || false,
VersionNumber: Number("long"),
},
SecondSchemaVersionNumber: {
LatestVersion: true || false,
VersionNumber: Number("long"),
},
SchemaDiffType: "SYNTAX_DIFF", // required
};
const command = new GetSchemaVersionsDiffCommand(input);
const response = await client.send(command);
// { // GetSchemaVersionsDiffResponse
// Diff: "STRING_VALUE",
// };
GetSchemaVersionsDiffCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
FirstSchemaVersionNumber Required | SchemaVersionNumber | undefined | The first of the two schema versions to be compared. |
SchemaDiffType Required | SchemaDiffType | undefined | Refers to |
SchemaId Required | SchemaId | undefined | This is a wrapper structure to contain schema identity fields. The structure contains:
|
SecondSchemaVersionNumber Required | SchemaVersionNumber | undefined | The second of the two schema versions to be compared. |
GetSchemaVersionsDiffCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Diff | string | undefined | The difference between schemas as a string in JsonPatch format. |
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. |