Google Cloud Platform · Schema
AnalyzeIamPolicyResponse
A response message for AssetService.AnalyzeIamPolicy.
API ManagementCloud ComputingInfrastructurePlatform-as-a-ServiceA2A
Properties
| Name | Type | Description |
|---|---|---|
| serviceAccountImpersonationAnalysis | array | The service account impersonation analysis if IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation is enabled. |
| fullyExplored | boolean | Represents whether all entries in the main_analysis and service_account_impersonation_analysis have been fully explored to answer the query in the request. |
| mainAnalysis | object | The main analysis that matches the original request. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/google-cloud-platform/json-schema/google-cloud-platform-analyze-iam-policy-response-schema.json",
"title": "AnalyzeIamPolicyResponse",
"description": "A response message for AssetService.AnalyzeIamPolicy.",
"x-generated": "2026-11-12",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/google-cloud-platform-cloudasset-v1-api-openapi.yml#/components/schemas/AnalyzeIamPolicyResponse",
"properties": {
"serviceAccountImpersonationAnalysis": {
"description": "The service account impersonation analysis if IamPolicyAnalysisQuery.Options.analyze_service_account_impersonation is enabled.",
"type": "array",
"items": {
"$ref": "#/$defs/IamPolicyAnalysis"
}
},
"fullyExplored": {
"description": "Represents whether all entries in the main_analysis and service_account_impersonation_analysis have been fully explored to answer the query in the request.",
"type": "boolean"
},
"mainAnalysis": {
"$ref": "#/$defs/IamPolicyAnalysis",
"description": "The main analysis that matches the original request."
}
},
"type": "object",
"$defs": {
"AccessSelector": {
"properties": {
"roles": {
"items": {
"type": "string"
},
"type": "array",
"description": "Optional. The roles to appear in result."
},
"permissions": {
"items": {
"type": "string"
},
"description": "Optional. The permissions to appear in result.",
"type": "array"
}
},
"type": "object",
"description": "Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10."
},
"Binding": {
"type": "object",
"description": "Associates `members`, or principals, with a `role`.",
"properties": {
"condition": {
"$ref": "#/$defs/Expr",
"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)."
},
"members": {
"description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.",
"items": {
"type": "string"
},
"type": "array"
},
"role": {
"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).",
"type": "string"
}
}
},
"ConditionContext": {
"description": "The IAM conditions context.",
"properties": {
"accessTime": {
"format": "google-datetime",
"description": "The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.",
"type": "string"
}
},
"type": "object"
},
"ConditionEvaluation": {
"properties": {
"evaluationValue": {
"enum": [
"EVALUATION_VALUE_UNSPECIFIED",
"TRUE",
"FALSE",
"CONDITIONAL"
],
"description": "The evaluation result.",
"type": "string"
}
},
"type": "object",
"description": "The condition evaluation."
},
"Expr": {
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.",
"type": "object",
"properties": {
"title": {
"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.",
"type": "string"
},
"description": {
"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.",
"type": "string"
},
"location": {
"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",
"type": "string"
},
"expression": {
"description": "Textual representation of an expression in Common Expression Language syntax.",
"type": "string"
}
}
},
"GoogleCloudAssetV1Access": {
"type": "object",
"description": "An IAM role or permission under analysis.",
"properties": {
"permission": {
"description": "The permission.",
"type": "string"
},
"analysisState": {
"$ref": "#/$defs/IamPolicyAnalysisState",
"description": "The analysis state of this access."
},
"role": {
"type": "string",
"description": "The role."
}
}
},
"GoogleCloudAssetV1AccessControlList": {
"description": "An access control list, derived from the above IAM policy binding, which contains a set of resources and accesses. May include one item from each set to compose an access control entry. NOTICE that there could be multiple access control lists for one IAM policy binding. The access control lists are created based on resource and access combinations. For example, assume we have the following cases in one IAM policy binding: - Permission P1 and P2 apply to resource R1 and R2; - Permission P3 applies to resource R2 and R3; This will result in the following access control lists: - AccessControlList 1: [R1, R2], [P1, P2] - AccessControlList 2: [R2, R3], [P3]",
"properties": {
"accesses": {
"description": "The accesses that match one of the following conditions: - The access_selector, if it is specified in request; - Otherwise, access specifiers reachable from the policy binding's role.",
"type": "array",
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1Access"
}
},
"resourceEdges": {
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1Edge"
},
"type": "array",
"description": "Resource edges of the graph starting from the policy attached resource to any descendant resources. The Edge.source_node contains the full resource name of a parent resource and Edge.target_node contains the full resource name of a child resource. This field is present only if the output_resource_edges option is enabled in request."
},
"resources": {
"description": "The resources that match one of the following conditions: - The resource_selector, if it is specified in request; - Otherwise, resources reachable from the policy attached resource.",
"type": "array",
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1Resource"
}
},
"conditionEvaluation": {
"$ref": "#/$defs/ConditionEvaluation",
"description": "Condition evaluation for this AccessControlList, if there is a condition defined in the above IAM policy binding."
}
},
"type": "object"
},
"GoogleCloudAssetV1Edge": {
"description": "A directional edge.",
"type": "object",
"properties": {
"sourceNode": {
"type": "string",
"description": "The source node of the edge. For example, it could be a full resource name for a resource node or an email of an identity."
},
"targetNode": {
"type": "string",
"description": "The target node of the edge. For example, it could be a full resource name for a resource node or an email of an identity."
}
}
},
"GoogleCloudAssetV1Identity": {
"properties": {
"analysisState": {
"$ref": "#/$defs/IamPolicyAnalysisState",
"description": "The analysis state of this identity."
},
"name": {
"description": "The identity of members, formatted as appear in an [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). For example, they might be formatted like the following: - user:foo@google.com - group:group1@google.com - serviceAccount:s1@prj1.iam.gserviceaccount.com - projectOwner:some_project_id - domain:google.com - allUsers",
"type": "string"
}
},
"type": "object",
"description": "An identity under analysis."
},
"GoogleCloudAssetV1IdentityList": {
"description": "The identities and group edges.",
"properties": {
"identities": {
"description": "Only the identities that match one of the following conditions will be presented: - The identity_selector, if it is specified in request; - Otherwise, identities reachable from the policy binding's members.",
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1Identity"
},
"type": "array"
},
"groupEdges": {
"description": "Group identity edges of the graph starting from the binding's group members to any node of the identities. The Edge.source_node contains a group, such as `group:parent@google.com`. The Edge.target_node contains a member of the group, such as `group:child@google.com` or `user:foo@google.com`. This field is present only if the output_group_edges option is enabled in request.",
"type": "array",
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1Edge"
}
}
},
"type": "object"
},
"GoogleCloudAssetV1Resource": {
"properties": {
"fullResourceName": {
"description": "The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format)",
"type": "string"
},
"analysisState": {
"$ref": "#/$defs/IamPolicyAnalysisState",
"description": "The analysis state of this resource."
}
},
"type": "object",
"description": "A Google Cloud resource under analysis."
},
"IamPolicyAnalysis": {
"properties": {
"analysisQuery": {
"$ref": "#/$defs/IamPolicyAnalysisQuery",
"description": "The analysis query."
},
"nonCriticalErrors": {
"type": "array",
"description": "A list of non-critical errors happened during the query handling.",
"items": {
"$ref": "#/$defs/IamPolicyAnalysisState"
}
},
"analysisResults": {
"items": {
"$ref": "#/$defs/IamPolicyAnalysisResult"
},
"type": "array",
"description": "A list of IamPolicyAnalysisResult that matches the analysis query, or empty if no result is found."
},
"fullyExplored": {
"description": "Represents whether all entries in the analysis_results have been fully explored to answer the query.",
"type": "boolean"
}
},
"type": "object",
"description": "An analysis message to group the query and results."
},
"IamPolicyAnalysisQuery": {
"description": "IAM policy analysis query message.",
"type": "object",
"properties": {
"accessSelector": {
"$ref": "#/$defs/AccessSelector",
"description": "Optional. Specifies roles or permissions for analysis. This is optional."
},
"identitySelector": {
"$ref": "#/$defs/IdentitySelector",
"description": "Optional. Specifies an identity for analysis."
},
"scope": {
"description": "Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as \"organizations/123\"), a folder number (such as \"folders/123\"), a project ID (such as \"projects/my-project-id\"), or a project number (such as \"projects/12345\"). To know how to get organization ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project ID, visit [here ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).",
"type": "string"
},
"options": {
"$ref": "#/$defs/Options",
"description": "Optional. The query options."
},
"conditionContext": {
"$ref": "#/$defs/ConditionContext",
"description": "Optional. The hypothetical context for IAM conditions evaluation."
},
"resourceSelector": {
"$ref": "#/$defs/ResourceSelector",
"description": "Optional. Specifies a resource for analysis."
}
}
},
"IamPolicyAnalysisResult": {
"description": "IAM Policy analysis result, consisting of one IAM policy binding and derived access control lists.",
"type": "object",
"properties": {
"identityList": {
"$ref": "#/$defs/GoogleCloudAssetV1IdentityList",
"description": "The identity list derived from members of the iam_binding that match or potentially match identity selector specified in the request."
},
"fullyExplored": {
"type": "boolean",
"description": "Represents whether all analyses on the iam_binding have successfully finished."
},
"accessControlLists": {
"items": {
"$ref": "#/$defs/GoogleCloudAssetV1AccessControlList"
},
"type": "array",
"description": "The access control lists derived from the iam_binding that match or potentially match resource and access selectors specified in the request."
},
"attachedResourceFullName": {
"description": "The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of the resource to which the iam_binding policy attaches.",
"type": "string"
},
"iamBinding": {
"$ref": "#/$defs/Binding",
"description": "The IAM policy binding under analysis."
}
}
},
"IamPolicyAnalysisState": {
"properties": {
"code": {
"type": "string",
"description": "The Google standard error code that best describes the state. For example: - OK means the analysis on this entity has been successfully finished; - PERMISSION_DENIED means an access denied error is encountered; - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started in time;",
"enum": [
"OK",
"CANCELLED",
"UNKNOWN",
"INVALID_ARGUMENT",
"DEADLINE_EXCEEDED",
"NOT_FOUND",
"ALREADY_EXISTS",
"PERMISSION_DENIED",
"UNAUTHENTICATED",
"RESOURCE_EXHAUSTED",
"FAILED_PRECONDITION",
"ABORTED",
"OUT_OF_RANGE",
"UNIMPLEMENTED",
"INTERNAL",
"UNAVAILABLE",
"DATA_LOSS"
]
},
"cause": {
"description": "The human-readable description of the cause of failure.",
"type": "string"
}
},
"type": "object",
"description": "Represents the detailed state of an entity under analysis, such as a resource, an identity or an access."
},
"IdentitySelector": {
"properties": {
"identity": {
"type": "string",
"description": "Required. The identity appear in the form of principals in [IAM policy binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\". Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity."
}
},
"description": "Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly.",
"type": "object"
},
"Options": {
"type": "object",
"description": "Contains query options.",
"properties": {
"outputResourceEdges": {
"type": "boolean",
"description": "Optional. If true, the result will output the relevant parent/child relationships between resources. Default is false."
},
"expandResources": {
"description": "Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a Google Cloud folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resources cannot be used together with this option. For example, if the request analyzes for which users have permission P on a Google Cloud project with this option enabled, the results will include all users who have permission P on that project or any lower resource. If true, the default max expansion per resource is 1000 for AssetService.AnalyzeIamPolicy][] and 100000 for AssetService.AnalyzeIamPolicyLongrunning][]. Default is false.",
"type": "boolean"
},
"analyzeServiceAccountImpersonation": {
"description": "Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning RPC instead. For example, if the request analyzes for which resources user A has permission P, and there's an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there's another IAM policy states service account SA has permission P to a Google Cloud folder F, then user A potentially has access to the Google Cloud folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a Google Cloud folder F, and there's an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there's another IAM policy states service account SA has permission P to the Google Cloud folder F, then user A potentially has access to the Google Cloud folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Only the following permissions are considered in this analysis: * `iam.serviceAccounts.actAs` * `iam.serviceAccounts.signBlob` * `iam.serviceAccounts.signJwt` * `iam.serviceAccounts.getAccessToken` * `iam.serviceAccounts.getOpenIdToken` * `iam.serviceAccounts.implicitDelegation` Default is false.",
"type": "boolean"
},
"expandGroups": {
"type": "boolean",
"description": "Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. If true, the default max expansion per group is 1000 for AssetService.AnalyzeIamPolicy][]. Default is false."
},
"expandRoles": {
"description": "Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.",
"type": "boolean"
},
"outputGroupEdges": {
"description": "Optional. If true, the result will output the relevant membership relationships between groups and other groups, and between groups and principals. Default is false.",
"type": "boolean"
}
}
},
"ResourceSelector": {
"type": "object",
"description": "Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects.",
"properties": {
"fullResourceName": {
"type": "string",
"description": "Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of [supported resource types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types)."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/google-cloud-platform-analyze-iam-policy-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.