Project quota
Cloud Asset Inventory enforces the rate of incoming requests based on the consumer project. The default quotas are as follows:
| Quota | Value |
|---|---|
BatchGetAssetsHistory |
100 per minute per consumer project |
ExportAssets |
60 per minute per consumer project 6000 per day per consumer project |
ListAssets |
100 per minute per consumer project |
SearchAllIamPolicies |
400 per minute per consumer project |
SearchAllResources |
400 per minute per consumer project |
You can use the APIs and services quotas dashboard to view current quotas and usage for your project.
Resource organization quota
In addition to the per-project quota, Cloud Asset Inventory also enforces rate limits on incoming requests based on resource organization. The limits are as follows:
| Quota | Value |
|---|---|
BatchGetAssetsHistory |
180 per minute per organization 195,000 per day per organization |
ExportAssets |
75 per minute per organization 13,000 per day per organization |
ListAssets |
800 per minute per organization 650,000 per day per organization |
SearchAllIamPolicies |
3,000 per minute per organization |
SearchAllResources |
1,500 per minute per organization |
Downstream services
In addition to limits enforced by Cloud Asset Inventory, the number of incoming requests is also capped by the rate and quota of the downstream services that Cloud Asset Inventory depends on.
BigQuery
Table operations: BigQuery has a quota limit for table operations, which defines the maximum number of
ExportAssetsAPI requests to the same BigQuery table that can be performed daily.ExportAssetsissues 2 table operations per table per request.Query jobs: BigQuery has a concurrent rate limit for query job, which defines the maximum number of concurrent
ExportAssetsAPI requests that can be issued per project.
Optimize API usage
To help stay within existing quotas, use the following best practices to optimize your API usage:
Reduce your query scope to the smallest possible surface.
Slow down your request rate, and implement exponential backoff.
Batch requests where possible.
The
ListAssetsandSearchAllResourcesAPIs are synchronous, which means that they return results in pages. This forces your application to make multiple sequential requests to retrieve a large inventory, which can exhaust your quota. Where appropriate, use the following asynchronous methods instead, so that only a single API request is made: