Before you upload data to Cloud Storage, you need to create one or more buckets. The command to know is mb:
gsutil mb [-c class] [-l location] [-p project_id] url…The
–c
, –l
, and –p
flags are particularly important:
-c
: The bucket's storage class:multi_regional
,regional
,nearline
, andcoldline
. (Default:multi_regional
orregional
).-l
: The bucket's multi-regional location or regional location. (Default: us).-p
: The project's ID. (Default: the ID in the gsutil configuration file).
gs://dummies123-tfbook/example
and associates it with the us-central1
region.
gsutil mb -c regional -l us-central1 gs://dummies123-tfbook/example