CreateNamespaceCommand

Creates a namespace. A namespace is a logical grouping of tables within your table bucket, which you can use to organize tables. For more information, see Create a namespace  in the Amazon Simple Storage Service User Guide.

Permissions

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

Example Syntax

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

import { S3TablesClient, CreateNamespaceCommand } from "@aws-sdk/client-s3tables"; // ES Modules import
// const { S3TablesClient, CreateNamespaceCommand } = require("@aws-sdk/client-s3tables"); // CommonJS import
const client = new S3TablesClient(config);
const input = { // CreateNamespaceRequest
  tableBucketARN: "STRING_VALUE", // required
  namespace: [ // NamespaceList // required
    "STRING_VALUE",
  ],
};
const command = new CreateNamespaceCommand(input);
const response = await client.send(command);
// { // CreateNamespaceResponse
//   tableBucketARN: "STRING_VALUE", // required
//   namespace: [ // NamespaceList // required
//     "STRING_VALUE",
//   ],
// };

CreateNamespaceCommand Input

See CreateNamespaceCommandInput for more details

Parameter
Type
Description
namespace
Required
string[] | undefined

A name for the namespace.

tableBucketARN
Required
string | undefined

The Amazon Resource Name (ARN) of the table bucket to create the namespace in.

CreateNamespaceCommand Output

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

The name of the namespace.

tableBucketARN
Required
string | undefined

The Amazon Resource Name (ARN) of the table bucket the namespace was created in.

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.