Method: resources.searchAll

Searches all the resources within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the resources within a scope, even if they don't have .get permission of all the resources. Callers should have cloudasset.assets.searchAllResources permission on the requested scope, otherwise the request will be rejected.

HTTP request

GET https://cloudasset.googleapis.com/v1p1beta1/{scope=*/*}/resources:searchAll

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
scope

string

Required. The relative name of an asset. The search is limited to the resources within the scope . The allowed value must be:

  • Organization number (such as "organizations/123")
  • Folder number (such as "folders/1234")
  • Project number (such as "projects/12345")
  • Project ID (such as "projects/abc")

Authorization requires the following IAM permission on the specified resource scope :

  • cloudasset.assets.searchAllResources

Query parameters

Parameters
query

string

Optional. The query statement.

assetTypes[]

string

Optional. A list of asset types that this request searches for. If empty, it will search all the supported asset types.

pageSize

integer

Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as nextPageToken is returned.

pageToken

string

Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of all other method parameters, must be identical to those in the previous call.

orderBy

string

Optional. A comma separated list of fields specifying the sorting order of the results. The default order is ascending. Add DESC after the field name to indicate descending order. Redundant space characters are ignored. For example, location DESC , name .

Request body

The request body must be empty.

Response body

Search all resources response.

If successful, the response body contains data with the following structure:

JSON representation
 { 
 "results" 
 : 
 [ 
 { 
 object (  StandardResourceMetadata 
 
) 
 } 
 ] 
 , 
 "nextPageToken" 
 : 
 string 
 } 
Fields
results[]

object ( StandardResourceMetadata )

A list of resource that match the search query.

nextPageToken

string

If there are more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call this method again using the value of nextPageToken as pageToken .

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview .

Create a Mobile Website
View Site in Mobile | Classic
Share by: