This page describes the access control options available to you for the Cloud Asset API.
Cloud Asset Inventory uses Cloud Identity and Access Management (Cloud IAM) for access control.
In the Cloud Asset API, access control can be configured at the project level or organization level. For example, you can grant access to all Cloud Asset Inventory resources within a project to a group of developers.
Every Cloud Asset Inventory API method requires the caller to have the necessary permissions. See Permissions and roles for more information.
Permissions and roles
This section summarizes Cloud Asset API permissions and roles that Cloud IAM supports.
The following table lists the permissions that the caller must have to call each API method in the Cloud Asset API or to perform tasks using Google Cloud tools that use the API, such as Google Cloud Console or Cloud SDK.
based on the
Note that when using the
*.exportAssets API to export resource metadata of
certain asset types, if the caller has not been granted the
cloudasset.assets.exportResource permission, an alternative requirement is
that caller has the appropriate
permissions per resource type
for every asset type that's specified in the request.
Cloud Asset Inventory has one Cloud IAM role,
role grants the
cloudasset.assets.exportIamPolicy permissions, allowing the use of all
Cloud Asset API methods. The
roles/owner role can also be used to grant this permission. Note that the primitive role
owner includes permissions for other Google Cloud services as well.
Access control with the Cloud Console
You can use the Cloud Console to manage access control for your environments and projects.
To set access controls at the project level:
- Open the IAM page in the Google Cloud Console.
- Select your project, and click Continue.
- Click Add Member.
- Enter the email address of a new member to whom you have not granted any Cloud IAM role previously.
- Select the desired role from the drop-down menu.
- Click Add.
- Verify that the member is listed under the role that you granted.