Cloud Asset Inventory uses Identity and Access Management (IAM) for access control. Every Cloud Asset Inventory API method requires the caller to have the necessary permissions.
Roles
To get the permissions that you need to work with asset metadata, ask your administrator to grant you the following IAM roles on the organization, folder, or project:
-
To view asset metadata:
-
Cloud Asset Viewer (
roles/cloudasset.viewer
) -
Service Usage Consumer (
roles/serviceusage.serviceUsageConsumer
)
-
Cloud Asset Viewer (
-
To view asset metadata and work with feeds:
-
Cloud Asset Owner (
roles/cloudasset.owner
) -
Service Usage Consumer (
roles/serviceusage.serviceUsageConsumer
)
-
Cloud Asset Owner (
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to work with asset metadata. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to work with asset metadata:
-
To view asset metadata:
-
cloudasset.assets.*
-
recommender.cloudAssetInsights.get
-
recommender.cloudAssetInsights.list
-
serviceusage.services.use
-
-
To view asset metadata and work with feeds:
-
cloudasset.*
-
recommender.cloudAssetInsights.*
-
serviceusage.services.use
-
You might also be able to get these permissions with custom roles or other predefined roles.
Permissions
The following table lists the permissions that the caller must have to call each API method in Cloud Asset Inventory, or to perform tasks using Google Cloud tools that use Cloud Asset Inventory such as the Google Cloud console or gcloud CLI.
The Cloud Asset Viewer (roles/cloudasset.viewer
) and Cloud Asset Owner
(roles/cloudasset.owner
) roles include many of these
permissions. If the caller has been granted one of these roles and the
Service Usage Consumer (roles/serviceusage.serviceUsageConsumer
) role, they
might already have the permissions they need to use Cloud Asset Inventory.
RPC
Method | Required permissions |
---|---|
All APIs | |
All Cloud Asset Inventory calls |
All Cloud Asset Inventory calls require the |
Analysis APIs | |
|
All of the following permissions:
|
|
cloudasset. |
|
All of the following permissions:
|
|
All of the following permissions:
|
Inventory APIs | |
|
One of the following permissions, depending on the content type:
When exporting metadata of an unspecified or |
|
One of the following permissions, depending on the content type:
|
|
One of the following permissions, depending on the content type:
|
Feed APIs | |
|
You also need one of the following permissions, depending on the content type:
|
|
cloudasset. |
|
cloudasset. |
|
cloudasset. |
|
You also need one of the following permissions, depending on the content type:
|
Search APIs | |
|
cloudasset. |
|
You also need
|
REST
Method | Required permissions |
---|---|
All APIs | |
All Cloud Asset Inventory calls |
All Cloud Asset Inventory calls require the |
Analysis APIs | |
|
All of the following permissions:
|
|
cloudasset. |
|
All of the following permissions:
|
|
All of the following permissions:
|
Inventory APIs | |
|
One of the following permissions, depending on the content type:
When exporting metadata of an unspecified or |
|
One of the following permissions, depending on the content type:
|
|
One of the following permissions, depending on the content type:
|
Feed APIs | |
|
You also need one of the following permissions, depending on the content type:
|
|
cloudasset. |
|
cloudasset. |
|
cloudasset. |
|
You also need one of the following permissions, depending on the content type:
|
Search APIs | |
|
cloudasset. |
|
You also need
|
gcloud
Positional statement | Required permissions |
---|---|
All APIs | |
All Cloud Asset Inventory calls |
All Cloud Asset Inventory calls require the |
Analysis APIs | |
|
All of the following permissions:
|
|
cloudasset. |
|
All of the following permissions:
|
|
All of the following permissions:
|
Inventory APIs | |
|
One of the following permissions, depending on the content type:
When exporting metadata of an unspecified or |
|
One of the following permissions, depending on the content type:
|
|
One of the following permissions, depending on the content type:
|
Feed APIs | |
|
You also need one of the following permissions, depending on the content type:
|
|
cloudasset. |
|
cloudasset. |
|
cloudasset. |
|
You also need one of the following permissions, depending on the content type:
|
Search APIs | |
|
cloudasset. |
|
You also need
|
Export permissions for each resource type
Granting the cloudasset.assets.exportResource
permission to a user allows them
to export all resource types. To restrict what resource types a user can export,
you can grant permissions for each resource type instead.
For example, granting a user cloudasset.assets.exportComputeDisks
means they
can't export anything except the resource type compute.googleapis.com/Disk
.
Resource export permissions only apply to RESOURCE
and unspecified
content types.
Service | Resource type | Resource export permission |
---|---|---|
App Engine |
appengine. |
cloudasset. |
appengine. |
cloudasset. |
|
appengine. |
cloudasset. |
|
BigQuery |
bigquery. |
cloudasset. |
bigquery. |
cloudasset. |
|
Bigtable |
bigtableadmin. |
cloudasset. |
bigtableadmin. |
cloudasset. |
|
bigtableadmin. |
cloudasset. |
|
Cloud Billing |
cloudbilling. |
cloudasset.
|
Cloud DNS |
dns. |
cloudasset. |
dns. |
cloudasset. |
|
Cloud Key Management Service |
cloudkms. |
cloudasset. |
cloudkms. |
cloudasset.
|
|
cloudkms. |
cloudasset. |
|
cloudkms. |
cloudasset. |
|
Cloud OS Config |
osconfig. |
cloudasset. |
Spanner |
spanner. |
cloudasset. |
spanner. |
cloudasset. |
|
spanner. |
cloudasset. |
|
Cloud SQL |
sqladmin. |
cloudasset. |
Cloud Storage |
storage. |
cloudasset. |
Compute Engine |
compute. |
cloudasset. |
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset.
|
|
compute. |
cloudasset. |
|
compute. |
cloudasset. |
|
Dataproc |
dataproc. |
cloudasset. |
dataproc. |
cloudasset. |
|
Google Kubernetes Engine |
container. |
cloudasset. |
container. |
cloudasset. |
|
k8s. |
cloudasset. |
|
k8s. |
cloudasset. |
|
k8s. |
cloudasset. |
|
rbac. |
cloudasset. |
|
rbac. |
cloudasset.
|
|
rbac. |
cloudasset. |
|
rbac. |
cloudasset. |
|
IAM |
iam. |
cloudasset. |
iam. |
cloudasset. |
|
Pub/Sub |
pubsub. |
cloudasset. |
pubsub. |
cloudasset. |
|
Resource Manager |
cloudresourcemanager. |
cloudasset.
|
cloudresourcemanager.
|
cloudasset.
|
|
cloudresourcemanager. |
cloudasset.
|
VPC Service Controls
VPC Service Controls can be used with Cloud Asset Inventory to provide additional security for your assets. To learn more about VPC Service Controls, see the Overview of VPC Service Controls.
To learn about the limitations in using Cloud Asset Inventory with VPC Service Controls, see the supported products and limitations.