ListNamespacesCommand

Lists the namespaces within a table bucket. For more information, see Table namespaces  in the Amazon Simple Storage Service User Guide.

Permissions

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

Example Syntax

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

import { S3TablesClient, ListNamespacesCommand } from "@aws-sdk/client-s3tables"; // ES Modules import
// const { S3TablesClient, ListNamespacesCommand } = require("@aws-sdk/client-s3tables"); // CommonJS import
const client = new S3TablesClient(config);
const input = { // ListNamespacesRequest
  tableBucketARN: "STRING_VALUE", // required
  prefix: "STRING_VALUE",
  continuationToken: "STRING_VALUE",
  maxNamespaces: Number("int"),
};
const command = new ListNamespacesCommand(input);
const response = await client.send(command);
// { // ListNamespacesResponse
//   namespaces: [ // NamespaceSummaryList // required
//     { // NamespaceSummary
//       namespace: [ // NamespaceList // required
//         "STRING_VALUE",
//       ],
//       createdAt: new Date("TIMESTAMP"), // required
//       createdBy: "STRING_VALUE", // required
//       ownerAccountId: "STRING_VALUE", // required
//       namespaceId: "STRING_VALUE",
//       tableBucketId: "STRING_VALUE",
//     },
//   ],
//   continuationToken: "STRING_VALUE",
// };

ListNamespacesCommand Input

See ListNamespacesCommandInput for more details

Parameter
Type
Description
tableBucketARN
Required
string | undefined

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

continuationToken
string | undefined

ContinuationToken indicates to Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key. You can use this ContinuationToken for pagination of the list results.

maxNamespaces
number | undefined

The maximum number of namespaces to return in the list.

prefix
string | undefined

The prefix of the namespaces.

ListNamespacesCommand Output

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

A list of namespaces.

continuationToken
string | undefined

The ContinuationToken for pagination of the list results.

Throws

Name
Fault
Details
AccessDeniedException
client

The action cannot be performed because you do not have the required permission.

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.