- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IamPolicySearchResult
- Explanation
- Permissions
- Try it!
Searches all the IAM policies within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM policies within a scope, even if they don't have .getIamPolicy
permission of all the IAM policies. Callers should have cloudasset.assets.searchAllIamPolicies
permission on the requested scope, otherwise the request will be rejected.
HTTP request
GET https://cloudasset.googleapis.com/v1p1beta1/{scope=*/*}/iamPolicies:searchAll
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
scope |
Required. The relative name of an asset. The search is limited to the resources within the
Authorization requires the following IAM permission on the specified resource
|
Query parameters
Parameters | |
---|---|
query |
Optional. The query statement. Examples:
|
pageSize |
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 |
pageToken |
Optional. If present, retrieve the next batch of results from the preceding call to this method. |
Request body
The request body must be empty.
Response body
Search all IAM policies response.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"results": [
{
object ( |
Fields | |
---|---|
results[] |
A list of IAM policies that match the search query. Related information such as the associated resource is returned along with the policy. |
nextPageToken |
Set if there are more results than those appearing in this response; to get the next set of results, call this method again, using this value as the |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IamPolicySearchResult
The result for an IAM policy search.
JSON representation |
---|
{ "resource": string, "project": string, "policy": { object ( |
Fields | |
---|---|
resource |
The full resource name of the resource associated with this IAM policy. |
project |
The project that the associated Google Cloud resource belongs to, in the form of |
policy |
The IAM policy attached to the specified resource. Note that the original IAM policy can contain multiple bindings. This only contains the bindings that match the given query. For queries that don't contain a constraint on policies (e.g. an empty query), this contains all the bindings. |
explanation |
Explanation about the IAM policy search result. It contains additional information that explains why the search result matches the query. |
Explanation
Explanation about the IAM policy search result.
JSON representation |
---|
{
"matchedPermissions": {
string: {
object ( |
Fields | |
---|---|
matchedPermissions |
The map from roles to their included permission matching the permission query (e.g. containing An object containing a list of |
Permissions
IAM permissions.
JSON representation |
---|
{ "permissions": [ string ] } |
Fields | |
---|---|
permissions[] |
A list of permissions. Example permission string: "compute.disk.get". |