ListSchemasCommand

Returns a list of schemas with minimal details. Schemas in Deleting status will not be included in the results. Empty results will be returned if there are no schemas available.

When the RegistryId is not provided, all the schemas across registries will be part of the API response.

Example Syntax

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

import { GlueClient, ListSchemasCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, ListSchemasCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // ListSchemasInput
  RegistryId: { // RegistryId
    RegistryName: "STRING_VALUE",
    RegistryArn: "STRING_VALUE",
  },
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListSchemasCommand(input);
const response = await client.send(command);
// { // ListSchemasResponse
//   Schemas: [ // SchemaListDefinition
//     { // SchemaListItem
//       RegistryName: "STRING_VALUE",
//       SchemaName: "STRING_VALUE",
//       SchemaArn: "STRING_VALUE",
//       Description: "STRING_VALUE",
//       SchemaStatus: "AVAILABLE" || "PENDING" || "DELETING",
//       CreatedTime: "STRING_VALUE",
//       UpdatedTime: "STRING_VALUE",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListSchemasCommand Input

See ListSchemasCommandInput for more details

Parameter
Type
Description
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.

RegistryId
RegistryId | undefined

A wrapper structure that may contain the registry name and Amazon Resource Name (ARN).

ListSchemasCommand Output

See ListSchemasCommandOutput for details

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
SchemaListItem[] | undefined

An array of SchemaListItem objects containing details of each schema.

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.