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 permissionssection:
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
All Cloud Asset Inventory calls require the serviceusage.services.use
permission.
BatchGetAssetsHistory
ExportAssets
One of the following permissions, depending on the content type :
-
cloudasset.assets. exportAccessPolicy When using the
ACCESS_POLICYcontent type. -
cloudasset.assets. exportIamPolicy When using the
IAM_POLICYcontent type. -
cloudasset.assets. exportOrgPolicy When using the
ORG_POLICYcontent type. -
cloudasset.assets. exportOSInventories When using the
OS_INVENTORYcontent type. -
cloudasset.assets. exportResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.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, you can grant theassets. exportResource cloudasset.assets.exportComputeDiskspermission by itself to allow a user to only export thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.export*permissions .
ListAssets
One of the following permissions, depending on the content type :
-
cloudasset.assets. listAccessPolicy -
cloudasset.assets. listIamPolicy -
cloudasset.assets. listOrgPolicy -
cloudasset.assets. listOSInventories -
cloudasset.assets. listResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.permission to a user allows them to list all resource types. To restrict what resource types a user can list, you can grant permissions for each resource type instead. For example, you can grant theassets. listResource cloudasset.assets.listComputeDiskspermission by itself to allow a user to only list thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.list*permissions .
SearchAllIamPolicies
cloudasset.
assets.
searchAllIamPolicies
SearchAllResources
cloudasset.
You also need cloudasset.
if
searching for resource owner enrichment.
REST
All Cloud Asset Inventory calls require the serviceusage.services.use
permission.
batchGetAssetsHistory
exportAssets
One of the following permissions, depending on the content type :
-
cloudasset.assets. exportAccessPolicy When using the
ACCESS_POLICYcontent type. -
cloudasset.assets. exportIamPolicy When using the
IAM_POLICYcontent type. -
cloudasset.assets. exportOrgPolicy When using the
ORG_POLICYcontent type. -
cloudasset.assets. exportOSInventories When using the
OS_INVENTORYcontent type. -
cloudasset.assets. exportResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.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, you can grant theassets. exportResource cloudasset.assets.exportComputeDiskspermission by itself to allow a user to only export thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.export*permissions .
assets.list
One of the following permissions, depending on the content type :
-
cloudasset.assets. listAccessPolicy -
cloudasset.assets. listIamPolicy -
cloudasset.assets. listOrgPolicy -
cloudasset.assets. listOSInventories -
cloudasset.assets. listResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.permission to a user allows them to list all resource types. To restrict what resource types a user can list, you can grant permissions for each resource type instead. For example, you can grant theassets. listResource cloudasset.assets.listComputeDiskspermission by itself to allow a user to only list thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.list*permissions .
searchAllIamPolicies
cloudasset.
assets.
searchAllIamPolicies
searchAllResources
cloudasset.
You also need cloudasset.
if
searching for resource owner enrichment.
gcloud
All Cloud Asset Inventory calls require the serviceusage.services.use
permission.
export
get-history
One of the following permissions, depending on the content type :
-
cloudasset.assets. exportAccessPolicy When using the
ACCESS_POLICYcontent type. -
cloudasset.assets. exportIamPolicy When using the
IAM_POLICYcontent type. -
cloudasset.assets. exportOrgPolicy When using the
ORG_POLICYcontent type. -
cloudasset.assets. exportOSInventories When using the
OS_INVENTORYcontent type. -
cloudasset.assets. exportResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.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, you can grant theassets. exportResource cloudasset.assets.exportComputeDiskspermission by itself to allow a user to only export thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.export*permissions .
list
One of the following permissions, depending on the content type :
-
cloudasset.assets. listAccessPolicy -
cloudasset.assets. listIamPolicy -
cloudasset.assets. listOrgPolicy -
cloudasset.assets. listOSInventories -
cloudasset.assets. listResource When using the
RESOURCEcontent type.Limiting resource access
Granting the
cloudasset.permission to a user allows them to list all resource types. To restrict what resource types a user can list, you can grant permissions for each resource type instead. For example, you can grant theassets. listResource cloudasset.assets.listComputeDiskspermission by itself to allow a user to only list thecompute.googleapis.com/Diskresource type.These granular permissions only apply to
RESOURCEand unspecified content types .View the list of granular
cloudasset.assets.list*permissions .
search-all-iam-policies
cloudasset.
assets.
searchAllIamPolicies
search-all-resources
cloudasset.
You also need cloudasset.
if
searching for resource owner enrichment.
Console
The Google Cloud console uses the SearchAllResources
API to
request data. To use Cloud Asset Inventory in the Google Cloud console, grant the
following permissions:
-
cloudasset.assets. searchAllResources -
serviceusage.services. use
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 .

