This page describes how to find the email address of a project's Cloud Storage service agent, which is a specialized service account created and managed by Cloud Storage. For an overview of Cloud Storage service agents, including when they're created and how they're used, see Service Accounts for Cloud Storage . For a general overview of service accounts in Google Cloud, see Service Accounts .
Before you begin
In order to get the required permissions for finding the email address of a
project's service agent, ask your administrator to grant you the View Service
Accounts ( roles/iam.serviceAccountViewer
) role on the project.
This predefined role contains the resourcemanager.projects.get
permission,
which is required to access the service agent of a project. You can also get
this permission with other predefined roles
. To see which roles are
associated with which permissions, refer to IAM roles for
Cloud Storage
.
For instructions on using roles to control access to projects, see Manage access .
Get the email address of a project's Cloud Storage service agent
Console
- In the Google Cloud console, go to the Cloud Storage Settings
page.
-
In the Project Accesstab, the email address appears in the Cloud Storage Service Accountsection.
Command line
Use the gcloud storage service-agent
command:
gcloud storage service-agent --project= PROJECT_IDENTIFIER
where PROJECT_IDENTIFIER
is the ID or number of
the relevant project. For example, my-project
.
Client libraries
C++
For more information, see the Cloud Storage C++ API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
C#
For more information, see the Cloud Storage C# API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
Go
For more information, see the Cloud Storage Go API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
Java
For more information, see the Cloud Storage Java API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
Node.js
For more information, see the Cloud Storage Node.js API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
PHP
For more information, see the Cloud Storage PHP API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
Python
For more information, see the Cloud Storage Python API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .
Ruby
For more information, see the Cloud Storage Ruby API reference documentation .
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries .