UpdateTableMetadataLocationCommand

Updates the metadata location for a table. The metadata location of a table must be an S3 URI that begins with the table's warehouse location. The metadata location for an Apache Iceberg table must end with .metadata.json, or if the metadata file is Gzip-compressed, .metadata.json.gz.

Permissions

You must have the s3tables:UpdateTableMetadataLocation permission to use this operation.

Example Syntax

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

import { S3TablesClient, UpdateTableMetadataLocationCommand } from "@aws-sdk/client-s3tables"; // ES Modules import
// const { S3TablesClient, UpdateTableMetadataLocationCommand } = require("@aws-sdk/client-s3tables"); // CommonJS import
const client = new S3TablesClient(config);
const input = { // UpdateTableMetadataLocationRequest
  tableBucketARN: "STRING_VALUE", // required
  namespace: "STRING_VALUE", // required
  name: "STRING_VALUE", // required
  versionToken: "STRING_VALUE", // required
  metadataLocation: "STRING_VALUE", // required
};
const command = new UpdateTableMetadataLocationCommand(input);
const response = await client.send(command);
// { // UpdateTableMetadataLocationResponse
//   name: "STRING_VALUE", // required
//   tableARN: "STRING_VALUE", // required
//   namespace: [ // NamespaceList // required
//     "STRING_VALUE",
//   ],
//   versionToken: "STRING_VALUE", // required
//   metadataLocation: "STRING_VALUE", // required
// };

UpdateTableMetadataLocationCommand Input

Parameter
Type
Description
metadataLocation
Required
string | undefined

The new metadata location for the table.

name
Required
string | undefined

The name of the table.

namespace
Required
string | undefined

The namespace of the table.

tableBucketARN
Required
string | undefined

The Amazon Resource Name (ARN) of the table bucket.

versionToken
Required
string | undefined

The version token of the table.

UpdateTableMetadataLocationCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
metadataLocation
Required
string | undefined

The metadata location of the table.

name
Required
string | undefined

The name of the table.

namespace
Required
string[] | undefined

The namespace the table is associated with.

tableARN
Required
string | undefined

The Amazon Resource Name (ARN) of the table.

versionToken
Required
string | undefined

The version token of the table.

Throws

Name
Fault
Details
BadRequestException
client

The request is invalid or malformed.

ConflictException
client

The request failed because there is a conflict with a previous write. You can retry the request.

ForbiddenException
client

The caller isn't authorized to make the request.

InternalServerErrorException
server

The request failed due to an internal server error.

NotFoundException
client

The request was rejected because the specified resource could not be found.

TooManyRequestsException
client

The limit on the number of requests per second was exceeded.

S3TablesServiceException
Base exception class for all service exceptions from S3Tables service.