All Products
Search
Document Center

Object Storage Service:mb

Last Updated:Apr 30, 2025

A bucket is a container for objects stored in Object Storage Service (OSS). You must create a bucket before you upload an object to OSS. This topic describes how to create a bucket by using the mb command.

Usage notes

  • To create a bucket, you must have the oss:PutBucket permission. For more information, see Attach a custom policy to a RAM user.

  • From 10:00 (UTC+8) on October 13, 2025, OSS will implement a phased adjustment across all regions to enable Block Public Access by default for new buckets created using the API, OSS SDKs, or ossutil. For details about the exact times when the adjustment will take effect in each region, see [Official Announcement] Adjustment to Public Access Blocking Configurations for Newly Created Buckets. Once Block Public Access is enabled, you cannot configure public access permissions, including public ACLs (public read and public read/write) and bucket policies that allows public access. You can disable this feature after the bucket is created if your business requires public access.

Command syntax

ossutil mb oss://bucket [flags]

Option

Type

Description

--acl

string

The access control list (ACL) of the bucket. Valid values:

  • private

  • public-read

  • public-read-write

--redundancy-type

string

The redundancy type of the bucket. Valid values:

  • Locally redundant storage (LRS): LRS stores multiple copies of your data on multiple storage devices in the same zone. Your data is still accessible if two storage devices are damaged at the same time.

  • Zone-redundant storage (ZRS): ZRS stores multiple copies of your data across multiple zones in the same region. Your data is still accessible even if a zone becomes unavailable.

--resource-group-id

string

The ID of the resource group.

--storage-class

string

The storage class of the bucket. Valid values:

  • Standard: Standard

  • IA: Infrequent Access (IA)

  • Archive: Archive

  • ColdArchive: Cold Archive

  • DeepColdArchive: Deep Cold Archive

Note

For more information, see Command-line options.

Examples

  • Create a bucket named examplebucket whose ACL is private.

    ossutil mb oss://examplebucket --acl=private
  • Create a bucket named examplebucket whose ACL is private and resource group is rg-aek27tc****.

    ossutil mb oss://examplebucket --acl=private --resource-group-id rg-aek27tc****