(::String) — 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 folder or project ID, visit here
.
#scope=
defscope=(value)->::String
Parameter
value (::String) — 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 folder or project ID, visit here
.
Returns
(::String) — 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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Asset V1 API - Class Google::Cloud::Asset::V1::IamPolicyAnalysisQuery (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [1.4.0](/ruby/docs/reference/google-cloud-asset-v1/1.4.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [1.3.1](/ruby/docs/reference/google-cloud-asset-v1/1.3.1/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [1.2.0](/ruby/docs/reference/google-cloud-asset-v1/1.2.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [1.1.0](/ruby/docs/reference/google-cloud-asset-v1/1.1.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [1.0.2](/ruby/docs/reference/google-cloud-asset-v1/1.0.2/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.32.0](/ruby/docs/reference/google-cloud-asset-v1/0.32.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.31.0](/ruby/docs/reference/google-cloud-asset-v1/0.31.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.30.0](/ruby/docs/reference/google-cloud-asset-v1/0.30.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.29.3](/ruby/docs/reference/google-cloud-asset-v1/0.29.3/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.28.1](/ruby/docs/reference/google-cloud-asset-v1/0.28.1/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.27.0](/ruby/docs/reference/google-cloud-asset-v1/0.27.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.26.1](/ruby/docs/reference/google-cloud-asset-v1/0.26.1/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.25.0](/ruby/docs/reference/google-cloud-asset-v1/0.25.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.24.0](/ruby/docs/reference/google-cloud-asset-v1/0.24.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.23.0](/ruby/docs/reference/google-cloud-asset-v1/0.23.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.22.0](/ruby/docs/reference/google-cloud-asset-v1/0.22.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.21.1](/ruby/docs/reference/google-cloud-asset-v1/0.21.1/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.20.1](/ruby/docs/reference/google-cloud-asset-v1/0.20.1/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.19.0](/ruby/docs/reference/google-cloud-asset-v1/0.19.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.18.0](/ruby/docs/reference/google-cloud-asset-v1/0.18.0/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery)\n- [0.17.3](/ruby/docs/reference/google-cloud-asset-v1/0.17.3/Google-Cloud-Asset-V1-IamPolicyAnalysisQuery) \nReference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::IamPolicyAnalysisQuery.\n\nIAM policy analysis query message. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #access_selector\n\n def access_selector() -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector\n\n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-AccessSelector)) --- Optional. Specifies roles or permissions for analysis. This is optional.\n\n### #access_selector=\n\n def access_selector=(value) -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-AccessSelector)) --- Optional. Specifies roles or permissions for analysis. This is optional. \n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::AccessSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-AccessSelector)) --- Optional. Specifies roles or permissions for analysis. This is optional.\n\n### #condition_context\n\n def condition_context() -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext\n\n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ConditionContext)) --- Optional. The hypothetical context for IAM conditions evaluation.\n\n### #condition_context=\n\n def condition_context=(value) -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ConditionContext)) --- Optional. The hypothetical context for IAM conditions evaluation. \n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ConditionContext](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ConditionContext)) --- Optional. The hypothetical context for IAM conditions evaluation.\n\n### #identity_selector\n\n def identity_selector() -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector\n\n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-IdentitySelector)) --- Optional. Specifies an identity for analysis.\n\n### #identity_selector=\n\n def identity_selector=(value) -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-IdentitySelector)) --- Optional. Specifies an identity for analysis. \n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::IdentitySelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-IdentitySelector)) --- Optional. Specifies an identity for analysis.\n\n### #options\n\n def options() -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options\n\n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-Options)) --- Optional. The query options.\n\n### #options=\n\n def options=(value) -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-Options)) --- Optional. The query options. \n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::Options](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-Options)) --- Optional. The query options.\n\n### #resource_selector\n\n def resource_selector() -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector\n\n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ResourceSelector)) --- Optional. Specifies a resource for analysis.\n\n### #resource_selector=\n\n def resource_selector=(value) -\u003e ::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ResourceSelector)) --- Optional. Specifies a resource for analysis. \n**Returns**\n\n- ([::Google::Cloud::Asset::V1::IamPolicyAnalysisQuery::ResourceSelector](./Google-Cloud-Asset-V1-IamPolicyAnalysisQuery-ResourceSelector)) --- Optional. Specifies a resource for analysis.\n\n### #scope\n\n def scope() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed.\n\n This can only be an organization number (such as \"organizations/123\"), a\n folder number (such as \"folders/123\"), a project ID (such as\n \"projects/my-project-id\"), or a project number (such as \"projects/12345\").\n\n To know how to get organization ID, visit [here](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).\n\n 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).\n\n### #scope=\n\n def scope=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed.\n\n\n This can only be an organization number (such as \"organizations/123\"), a\n folder number (such as \"folders/123\"), a project ID (such as\n \"projects/my-project-id\"), or a project number (such as \"projects/12345\").\n\n To 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). \n**Returns**\n\n- (::String) --- Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed.\n\n This can only be an organization number (such as \"organizations/123\"), a\n folder number (such as \"folders/123\"), a project ID (such as\n \"projects/my-project-id\"), or a project number (such as \"projects/12345\").\n\n To know how to get organization ID, visit [here](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).\n\n 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)."]]