All Products
Search
Document Center

Object Storage Service:Create a namespace

Last Updated:Jun 23, 2026

Creates a namespace in a specified table bucket.

Notes

  • A namespace name can contain only lowercase letters, digits, and underscores (_). It must start and end with a lowercase letter or a digit.

Syntax

ossutil tables-api create-namespace --table-bucket-arn value --namespace value [flags]

Parameter

Type

Description

--namespace

string

The name of the namespace to create. Specify a single namespace name, or a path prefixed with file:// to a local JSON file that contains an array of namespace names.

--table-bucket-arn

string

The ARN of the table bucket in the format acs:osstables:{region}:{uid}:bucket/{bucket-name}.

Note

Examples

  • Create a namespace named my_namespace in a table bucket.

    ossutil tables-api create-namespace --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace "my_namespace"
  • Create multiple namespaces from a local JSON file such as namespaces.json. Use the file:// prefix to specify the file path.

    ossutil tables-api create-namespace --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace file://namespaces.json