Google Cloud Platform
Cloud Storage

Using Projects

Google Cloud Storage is available as a service for Google Cloud Platform Console projects. You can have many projects and many instances of the Google Cloud Storage service. This page discusses how projects work with the Google Cloud Storage service.

Contents

  1. Identifying projects
  2. When to specify a Project ID
  3. Project members and permissions

Identifying projects

Each project has the following attributes:

  • A human-readable Project Name specified on creation.
  • A Project ID which can be specified on creation or auto-generated by Google Cloud Platform Console.
  • A Project Number that Google Cloud Platform Console assigns on creation.

Here is an example of a project as viewed in the Google Cloud Platform Console.

In this example, the Project Name is example-project, the Project ID is example-id, and the Project Number is 123456789012.

The Project Name is a user-friendly name, while the Project ID and Project Number are what you need to specify for certain requests sent to Google Cloud Storage as described in the next section.

To find a project's ID and number:

  1. In the Cloud Platform Console, select a project.
  2. The associated ID and number will be listed in the project's Dashboard page.

When to specify a Project ID

Certain Google Cloud Storage operations require you to specify a project as described below. In those cases, Project ID and Project Number can be used interchangeably.

Google Cloud Platform Console

When you create a bucket or list buckets using Google Cloud Platform Console, you must select a project before you can complete either of these actions. For more information, see Creating a bucket.

gsutil

The gsutil mb and gsutil ls commands require a project but will use the default project if previously established by gsutil config. If not, or if you would like to use a different project, you can use the -p flag to specify it. No other gsutil commands require you to specify a project.

JSON API

Only the list buckets and insert bucket methods require you to specify the project. The project is sent as a parameter in the request URL like the following:

GET https://www.googleapis.com/storage/v1/b?project=<project-identifier>

The Google APIs Client Libraries use the JSON API to sent requests to Google Cloud Storage, so a project is required when using the libraries' utilities for creating and listing buckets.

XML API

The project associated with every XML API request must be specified in the x-goog-project-id header.

x-goog-project-id: <project-identifier>

The exception is when you are using the XML API for interoperable access with other storage systems. For more information, see Migrating from Amazon S3 to Google Cloud Storage.

Project members and permissions

For each project, you can add team members to manage and work on your project and specify a role as an owner, editor, or viewer. Project team members are given the following permissions based on their roles:

  • All Project Team Members

    All project team members can list buckets within a project.

  • Project Editors

    All project editors can list, create, and delete buckets.

  • Project Owners

    All project owners can list, create, and delete buckets, and can also perform administrative tasks like adding and removing team members and changing billing. The project owners group is the owner of all buckets within a project, regardless of who may be the original bucket creator.

For more information, see Manage Project Members.

When you create a bucket without specifying an ACL, the project-private ACL is applied to the bucket automatically. This ACL provides additional permissions to team members, as described in default bucket ACLs.

Back to top