- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- OrgPolicyResult
- Try it!
Analyzes organization policies under a scope.
HTTP request
GET https://cloudasset.googleapis.com/v1/{scope=*/*}:analyzeOrgPolicies
The URL uses gRPC Transcoding syntax.
Path parameters
scope
string
Required. The organization to scope the request. Only organization policies within the scope will be analyzed.
- organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
Authorization requires one or more of the following IAM
permissions on the specified resource scope
:
-
cloudasset.assets.searchAllResources -
cloudasset.assets.analyzeOrgPolicy
Query parameters
| Parameters | |
|---|---|
constraint
|
Required. The name of the constraint to analyze organization policies for. The response only contains analyzed organization policies for the provided constraint. |
filter
|
The expression to filter When filtering by a specific field, the only supported operator is |
pageToken
|
The pagination token to retrieve the next page. |
pageSize
|
The maximum number of items to return per page. If unspecified, |
Request body
The request body must be empty.
Response body
The response message for AssetService.AnalyzeOrgPolicies
.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "orgPolicyResults" : [ { object ( |
| Fields | |
|---|---|
orgPolicyResults[]
|
The organization policies under the |
constraint
|
The definition of the constraint in the request. |
nextPageToken
|
The page token to fetch the next page for |
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
OrgPolicyResult
The organization policy result to the query.
| JSON representation |
|---|
{ "consolidatedPolicy" : { object ( |
| Fields | |
|---|---|
consolidatedPolicy
|
The consolidated organization policy for the analyzed resource. The consolidated organization policy is computed by merging and evaluating |
policyBundle[]
|
The ordered list of all organization policies from the If the constraint is defined with default policy, it will also appear in the list. |
project
|
The project that this consolidated policy belongs to, in the format of projects/{PROJECT_NUMBER}. This field is available when the consolidated policy belongs to a project. |
folders[]
|
The folder(s) that this consolidated policy belongs to, in the format of folders/{FOLDER_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to one or more folders. |
organization
|
The organization that this consolidated policy belongs to, in the format of organizations/{ORGANIZATION_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to an organization. |

