Buckets

Buckets are containers that hold your data. They are like directories in the computer file system and are basic containers where you put your data. The only difference is that you can't nest the buckets, unlike directories. Everything that you put in Cloud Storage must be inside a bucket. Buckets allow you to organize your data and also allow you to control access permissions to your data. When designing your application, you should plan fewer buckets and more objects in most cases due to some imposed rate limits of bucket creation and deletion. It is approximately 1 operation every 2 seconds per project.

You need to specify three things when you create a bucket: a globally unique name, a default storage class, and a geographic location where the bucket and its contents are stored. The default storage class you choose applies to the objects inside that bucket if you don't specify an object class explicitly while storing the objects.

Once the bucket is created, you can't change the name of the bucket and its location, unless you delete and recreate it. However, you can change its default storage class to any other class available in the bucket's location.

Bucket names should be globally unique and can be used with CNAME redirect.

Your bucket names must meet the following requirements:

  • It must contain only lowercase letters, numbers, and special characters: dashes (-), underscores (_), and dots (.). Names containing dots require verification.
  • It must start and end with a number or letter.
  • It must be 3 to 63 characters long. Names containing dots can be 222 characters long, but each dot-separated component must not be longer than 63 characters.
  • It must not represent an IP address, such as 192.168.1.1.
  • It cannot begin with the "goog" prefix and cannot contain google or misspellings of google.

Apart from names, you can also associate key-value metadata pairs called bucket labels to your buckets. Bucket labels allow you to group your buckets with other Google Cloud Platform services, such as Virtual Machine Instances and Persistent Disks. You can have a maximum of 64 buckets labels per bucket.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset