public sealed class IamPolicyAnalysisQuery : IMessage<IamPolicyAnalysisQuery>, IEquatable<IamPolicyAnalysisQuery>, IDeepCloneable<IamPolicyAnalysisQuery>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class IamPolicyAnalysisQuery.
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").
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis page provides reference documentation for the \u003ccode\u003eIamPolicyAnalysisQuery\u003c/code\u003e class within the Google Cloud Asset Inventory v1 API, specifically for .NET development.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIamPolicyAnalysisQuery\u003c/code\u003e class is used to construct IAM policy analysis queries, offering functionalities such as specifying access, identity, and resource selectors, as well as condition contexts and options for analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes details on the latest version (3.12.0) and multiple previous versions of the API, ranging from 3.11.0 down to 2.7.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIamPolicyAnalysisQuery\u003c/code\u003e class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eScope\u003c/code\u003e property of \u003ccode\u003eIamPolicyAnalysisQuery\u003c/code\u003e allows users to specify the root asset for analysis, which can be an organization, folder, or project, and provides links on how to get those details.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class IamPolicyAnalysisQuery (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery) \n\n public sealed class IamPolicyAnalysisQuery : IMessage\u003cIamPolicyAnalysisQuery\u003e, IEquatable\u003cIamPolicyAnalysisQuery\u003e, IDeepCloneable\u003cIamPolicyAnalysisQuery\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class IamPolicyAnalysisQuery.\n\nIAM policy analysis query message. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e IamPolicyAnalysisQuery \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[IamPolicyAnalysisQuery](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[IamPolicyAnalysisQuery](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[IamPolicyAnalysisQuery](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.IamPolicyAnalysisQuery), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### IamPolicyAnalysisQuery()\n\n public IamPolicyAnalysisQuery()\n\n### IamPolicyAnalysisQuery(IamPolicyAnalysisQuery)\n\n public IamPolicyAnalysisQuery(IamPolicyAnalysisQuery other)\n\nProperties\n----------\n\n### AccessSelector\n\n public IamPolicyAnalysisQuery.Types.AccessSelector AccessSelector { get; set; }\n\nOptional. Specifies roles or permissions for analysis. This is optional.\n\n### ConditionContext\n\n public IamPolicyAnalysisQuery.Types.ConditionContext ConditionContext { get; set; }\n\nOptional. The hypothetical context for IAM conditions evaluation.\n\n### IdentitySelector\n\n public IamPolicyAnalysisQuery.Types.IdentitySelector IdentitySelector { get; set; }\n\nOptional. Specifies an identity for analysis.\n\n### Options\n\n public IamPolicyAnalysisQuery.Types.Options Options { get; set; }\n\nOptional. The query options.\n\n### ResourceSelector\n\n public IamPolicyAnalysisQuery.Types.ResourceSelector ResourceSelector { get; set; }\n\nOptional. Specifies a resource for analysis.\n\n### Scope\n\n public string Scope { get; set; }\n\nRequired. The relative name of the root asset. Only resources and IAM\npolicies within the scope will be analyzed.\n\nThis can only be an organization number (such as \"organizations/123\"), a\nfolder number (such as \"folders/123\"), a project ID (such as\n\"projects/my-project-id\"), or a project number (such as \"projects/12345\").\n\nTo know how to get organization ID, visit [here](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).\n\nTo 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)."]]