Google Cloud Storage is available as a service for Google Developers 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
Identifying projects
Projects have the following pieces of information that identify them:
- A Project Name that you specify when you create the project.
- A Project ID that you can specify when you create a project. You can also let Google Developers Console auto-generate a name for you.
- A Project Number that Google Developers Console assigns when you create a project.
Here is an example of project as viewed in the Google Developers 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 some requests sent to Google Cloud Storage as described in the next section.
To find the Project ID and Project Number:
- Go to the Google Developers Console .
- Select a project.
- In the project Overview page, you can find your Project ID and Project Number.
When to specify a Project ID
When to specify a project ID depends on how you are accessing Google Cloud Storage and for what operations. The different scenarios are listed below. Project ID and Project Number can be used interchangeably when you need to identify a project.
- Google Developers Console
-
When you create a bucket or list buckets using Google Developers 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
andgsutil ls
commands use the default project, for example, if you usedgsutil config
to create credentials. Or, you can use the-p
flag with these commands to specify a project. All othergsutil
commands do not require you to specify a project. - JSON API
-
Only the bucket get method and insert methods require you to specify the project. The project is sent as a parameter in the request URL. For example, the request URL to list buckets is:
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. Therefore, when you use these libraries, you only need to specify a project with create and list bucket requests.
- XML API
-
In all your requests, identify the project with 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 as an owner, editor, or viewer. Team membership provides team members with access to buckets and objects in a project as described by their role. For more information about project team members, see Managing projects and applications in the Google Developers Console Help.
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.
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.