- 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.
DeleteDataCatalogCommand
Deletes a data catalog.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { AthenaClient, DeleteDataCatalogCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, DeleteDataCatalogCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // DeleteDataCatalogInput
Name: "STRING_VALUE", // required
DeleteCatalogOnly: true || false,
};
const command = new DeleteDataCatalogCommand(input);
const response = await client.send(command);
// { // DeleteDataCatalogOutput
// DataCatalog: { // DataCatalog
// Name: "STRING_VALUE", // required
// Description: "STRING_VALUE",
// Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
// Parameters: { // ParametersMap
// "<keys>": "STRING_VALUE",
// },
// 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",
// },
// };
DeleteDataCatalogCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Name Required | string | undefined | The name of the data catalog to delete. |
DeleteCatalogOnly | boolean | undefined | Deletes the Athena Data Catalog. You can only use this with the |
DeleteDataCatalogCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DataCatalog | DataCatalog | undefined | Contains information about a data catalog in an 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. |
Throws
Name | Fault | Details |
---|
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. |