DeleteTableVersionCommand

Deletes a specified version of a table.

Example Syntax

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

import { GlueClient, DeleteTableVersionCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, DeleteTableVersionCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // DeleteTableVersionRequest
  CatalogId: "STRING_VALUE",
  DatabaseName: "STRING_VALUE", // required
  TableName: "STRING_VALUE", // required
  VersionId: "STRING_VALUE", // required
};
const command = new DeleteTableVersionCommand(input);
const response = await client.send(command);
// {};

DeleteTableVersionCommand Input

See DeleteTableVersionCommandInput for more details

Parameter
Type
Description
DatabaseName
Required
string | undefined

The database in the catalog in which the table resides. For Hive compatibility, this name is entirely lowercase.

TableName
Required
string | undefined

The name of the table. For Hive compatibility, this name is entirely lowercase.

VersionId
Required
string | undefined

The ID of the table version to be deleted. A VersionID is a string representation of an integer. Each version is incremented by 1.

CatalogId
string | undefined

The ID of the Data Catalog where the tables reside. If none is provided, the Amazon Web Services account ID is used by default.

DeleteTableVersionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
EntityNotFoundException
client

A specified entity does not exist

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

GlueServiceException
Base exception class for all service exceptions from Glue service.