ListDataCatalogsCommand

Lists the data catalogs in the current Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Example Syntax

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

import { AthenaClient, ListDataCatalogsCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, ListDataCatalogsCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // ListDataCatalogsInput
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
  WorkGroup: "STRING_VALUE",
};
const command = new ListDataCatalogsCommand(input);
const response = await client.send(command);
// { // ListDataCatalogsOutput
//   DataCatalogsSummary: [ // DataCatalogSummaryList
//     { // DataCatalogSummary
//       CatalogName: "STRING_VALUE",
//       Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED",
//       Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
//       ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
//       Error: "STRING_VALUE",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListDataCatalogsCommand Input

See ListDataCatalogsCommandInput for more details

Parameter
Type
Description
MaxResults
number | undefined

Specifies the maximum number of data catalogs to return.

NextToken
string | undefined

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

WorkGroup
string | undefined

The name of the workgroup. Required if making an IAM Identity Center request.

ListDataCatalogsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DataCatalogsSummary
DataCatalogSummary[] | undefined

A summary list of data catalogs.

NextToken
string | undefined

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

Throws

Name
Fault
Details
InternalServerException
server

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException
client

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

AthenaServiceException
Base exception class for all service exceptions from Athena service.