Google Cloud Storage is an Internet service to store data in Google's cloud.
Google Cloud Storage allows world-wide storing and retrieval of any amount of data and at any time. It provides a simple programming interface which enables developers to take advantage of Google's own reliable and fast networking infrastructure to perform data operations in a secure and cost effective manner. If expansion needs arise, developers can benefit from the scalability provided by Google's infrastructure.
If you are not a software developer, use Google Drive to store your personal data in the cloud and share it with others.
Google Cloud Storage enables application developers to store their data on Google’s infrastructure with very high reliability, performance and availability, and can be used to distribute large data objects to users via direct download. If your application needs to store files to be viewed and managed in the cloud by end users or if you want to integrate with Drive applications, you can do so using the Google Drive SDK . For more information about the differences between Google Cloud Storage and Google Drive, see the FAQ .
Contents
- Building Blocks
- Features
- How to Use Google Cloud Storage
- Getting Started with Google Cloud Storage
- Tools
Building Blocks
-
Projects
All data in Google Cloud Storage belongs inside a project. A project consists of a set of users, a set of APIs, billing, authentication, and monitoring settings for those APIs. You can have one project or multiple projects.
-
Buckets
Buckets are the basic containers that hold your data. Everything that you store in Google Cloud Storage must be contained in a bucket. You can use buckets to organize your data and control access to your data, but unlike directories and folders, you cannot nest buckets. Buckets belong to a project and cannot be shared among projects. There is no limit on the number of buckets that you can create in a project.
-
Objects
Objects are the individual pieces of data that you store in Google Cloud Storage. Objects have two components: object data and object metadata. The object data component is usually a file that you want to store in Google Cloud Storage. The object metadata component is a collection of name-value pairs that describe various object qualities. Objects belong to a bucket and cannot be shared among buckets.
Features
Google Cloud Storage provides several features and capabilities that make storing, sharing, and managing data efficient and reliable.
-
High Capacity and Scalability
Google Cloud Storage supports objects that can be terabytes in size. It also supports a large number of buckets per account.
-
Strong Data Consistency
Google Cloud Storage provides strong read-after-write consistency for all upload and delete operations. This means that after you upload an object successfully you can immediately download it, delete it, or get its metadata. Likewise, any attempt to access an object immediately after you successfully delete it results in a 404 Not Found status code. List operations are eventually consistent from anywhere on the Internet.
From an availability standpoint, upload operations to Google Cloud Storage are atomic. When you upload an object, the object is not available until it is completely uploaded. Uploaded objects are never available in a corrupted state or as partial objects. Objects are either available or they are not.
For more information, see Consistency .
-
Google Developers Console Projects
Google Cloud Storage is available as a service in the Google Developers Console where you can add project members, handle billing, manage authentication, and work with other APIs. You can have many projects and each project can have its own Google Cloud Storage instance.
-
Bucket Locations
Google Cloud Storage provides the ability to specify where your buckets are geographically stored. It is possible to specify that buckets are stored in Europe or in the US. For more information, see Specifying Bucket Locations .
-
REST APIS
Google Cloud Storage provides two RESTful programming interfaces (the XML API and the JSON API) so you don't have to rely on SOAP toolkits or RPC programming to create applications that store, share, and manage data on Google Cloud Storage. Instead, you can use standard HTTP methods, such as PUT, GET, POST, HEAD, and DELETE.
-
OAuth 2.0 Authentication
Google Cloud Storage uses OAuth 2.0 authentication and authorization to interact with the API. OAuth 2.0 authentication is a token-based authentication where you can issue tokens to applications to act on your behalf. You can set up OAuth 2.0 authentication for your applications by visiting the OAuth 2.0 authentication and authorization guide and reading about OAuth 2.0 authentication specific to Google Cloud Storage .
-
Authenticated Browser Downloads
Google Cloud Storage lets you provide browser-based authenticated downloads to individual Google account holders. You can provide authenticated browser-based downloads by first applying Google account-based ACLs to an object and then sending users a URL that is scoped to the object. The URL for authenticated browser downloads is:
https://storage.cloud.google.com/ bucket / object
For more information, see Cookie-based Authentication in Authentication.
-
Google Account Support for Sharing
Google Cloud Storage uses ACLs to control access to objects and buckets. By configuring ACLs you can share your objects and buckets with the entire world, a Google group, a Google-hosted domain, or specific Google account holders. For more information, see Access Control .
How to Use Google Cloud Storage
You can interface with Google Cloud Storage using the provided tools or programmatically. The tools allow you to perform data access and management operations.
-
Activating Google Cloud Storage
Before you can add buckets to your own project, you must activate the service for your project. For more information, see: Activate Google Cloud Storage .
-
Managing Google Cloud Storage
The Google Developers Console is a graphical user interface the allows you to:
- Create and manage a project.
- Enable the Google Cloud Storage service for a project.
- Enable the Google Cloud Storage JSON API for a project for programmatic access.
- Use drag-and-drop features to manage your Google Cloud Storage buckets and objects in a project.
-
Using the Service from the Command Line
The gsutil tool lets you access Google Cloud Storage service from the command line. You can use it for a wide range of bucket and object management tasks, including:
- Creating and deleting buckets.
- Uploading, downloading, and deleting objects.
- Listing buckets and objects.
- Moving, copying, and renaming objects.
- Setting object and bucket ACLs.
You can use the
gsutil
tool to access Google Cloud Storage and for your general Python development. The tool comes with a Python library (boto), an authentication client, and other libraries you can use to build Python applications.The following examples show how to use the
gsutil
tool to access Google Cloud Storage:-
Getting Started: Using the gsutil Tool
.
Using
gsutil
to perform data access operations. -
Accessing Public Data
.
Using
gsutil
to access public data.
-
Using the Service Programmatically
Google Cloud Storage gives you a range of programming languages to choose from when creating applications. These languages are supported by client libraries that allow your application to communicate with Google Cloud Storage. The libraries take care of the HTTP protocol details when using the Google Cloud Storage APIs.
Depending on the language and library you choose, your application is bound to XML API or JSON API . What API to choose depends on your requirements. The XML API was the first API supported. The JSON API has been added to be compatible with other Google products.
For more information about supported libraries and examples of using both XML and JSON API, see Overview of Client Libraries for Google Cloud Storage .
Getting Started with Google Cloud Storage
Getting started with Google Cloud Storage requires very simple steps:
-
Activating Google Cloud Storage
For instructions about activating Google Cloud Storage see: Activate Google Cloud Storage .
-
Creating a bucket
The bucket is the container for your data (objects). You can select the region where your bucket resides to reduce costs and speed-up access or satisfy local requirements.
-
Uploading data
Google Cloud Storage stores and replicates your data (objects) allowing a high level of persistence. For more information on the service, see Terms of Service .
-
Controlling access
You can control access to your data from anywhere on the Internet.
gsutil
tool. If you are a developer, you can build applications using several languages and libraries to interface
with Google Cloud Storage. For more information and details, see the API documentation.
Tools
The following are the essential tools that are used during various phases when working with Google Cloud Storage.
Tool | Description |
---|---|
Google Developers Console |
The Google Developers Console allows you to create a project, enable the Google Cloud Storage service, and start creating buckets and adding objects. You can easily manage your buckets and objects with Developers Console's drag-and-drop features. The Developers Console is an easy way to get started with Google Cloud Storage. The Google Developers Console is a graphical interface where you can activate and manage many Google APIs (like the Google Cloud Storage service) and their related settings, such as billing, activation and deactivation, authorization, and any custom API features. The Google Developers Console is made up of projects and each activated Google API or service belongs to a project. Projects can contain one or more activated APIs. When you activate Google APIs, enable billing, and perform other administrative tasks, you do so on a project basis. For more information, see Google Developers Console . |
gsutil | A command line tool that let you perform basic and advanced Google Cloud Storage tasks. You will use it in some capacity to interact with Google Cloud Storage. |