mb - Make buckets
gsutil mb [-c class] [-l location] [-p proj_id] url...
The mb command creates a new bucket. Google Cloud Storage has a single namespace, so you are not allowed to create a bucket with a name already in use by another user. You can, however, carve out parts of the bucket name space corresponding to your company’s domain name (see “gsutil help naming”).
If you don’t specify a project ID using the -p option, the bucket is created using the default project ID specified in your gsutil configuration file (see gsutil help config). For more details about projects see gsutil help projects.
The -c and -l options specify the storage class and location, respectively, for the bucket. Once a bucket is created in a given location and with a given storage class, it cannot be moved to a different location, and the storage class cannot be changed. Instead, you would need to create a new bucket and move the data over and then delete the original bucket.
Bucket Storage Classes
You can specify one of the storage classes for a bucket with the -c option.
gsutil mb -c nearline gs://some-bucket
If you don’t specify a -c option, the bucket is created with the default (Standard) storage class.
You can specify one of the ‘available locations <https://cloud.google.com/storage/docs/bucket-locations>`_ for a bucket with the -l option.
gsutil mb -l asia gs://some-bucket gsutil mb -c dra -l us-east1 gs://some-bucket
If you don’t specify a -l option, the bucket is created in the default location (US).
|-c class||Specifies the storage class for the bucket and all objects in the bucket. Default is “Standard”.|
|-l location||Can be any multi-regional or regional location. See https://cloud.google.com/storage/docs/storage-classes for a discussion of this distinction. Default is US. Locations are case insensitive.|
|-p proj_id||Specifies the project ID under which to create the bucket.|