- 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.
ListSchemaVersionsCommand
Returns a list of schema versions that you have created, with minimal information. Schema versions in Deleted status will not be included in the results. Empty results will be returned if there are no schema versions available.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, ListSchemaVersionsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, ListSchemaVersionsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // ListSchemaVersionsInput
SchemaId: { // SchemaId
SchemaArn: "STRING_VALUE",
SchemaName: "STRING_VALUE",
RegistryName: "STRING_VALUE",
},
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListSchemaVersionsCommand(input);
const response = await client.send(command);
// { // ListSchemaVersionsResponse
// Schemas: [ // SchemaVersionList
// { // SchemaVersionListItem
// SchemaArn: "STRING_VALUE",
// SchemaVersionId: "STRING_VALUE",
// VersionNumber: Number("long"),
// Status: "AVAILABLE" || "PENDING" || "FAILURE" || "DELETING",
// CreatedTime: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListSchemaVersionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SchemaId Required | SchemaId | undefined | This is a wrapper structure to contain schema identity fields. The structure contains:
|
MaxResults | number | undefined | Maximum number of results required per page. If the value is not supplied, this will be defaulted to 25 per page. |
NextToken | string | undefined | A continuation token, if this is a continuation call. |
ListSchemaVersionsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last. |
Schemas | SchemaVersionListItem[] | undefined | An array of |
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. |