# Google Cloud Asset V1 Client - Class IamPolicyAnalysisQuery (2.3.3)

2.3.3 (latest) 2.3.2 2.2.3 2.1.3 2.0.1 1.16.4 1.14.1 1.13.2 1.12.2 1.11.3 1.10.2 1.9.2 Reference documentation and code samples for the Google Cloud Asset V1 Client class IamPolicyAnalysisQuery.

IAM policy analysis query message.

Generated from protobuf message `google.cloud.asset.v1.IamPolicyAnalysisQuery`

## Namespace

Google \\ Cloud \\ Asset \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ scope` | `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 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). |
| `↳ resource_selector` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ResourceSelector` Optional. Specifies a resource for analysis. |
| `↳ identity_selector` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.IdentitySelector` Optional. Specifies an identity for analysis. |
| `↳ access_selector` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.AccessSelector` Optional. Specifies roles or permissions for analysis. This is optional. |
| `↳ options` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.Options` Optional. The query options. |
| `↳ condition_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ConditionContext` Optional. The hypothetical context for IAM conditions evaluation. |

### getScope

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).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setScope

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).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getResourceSelector

Optional. Specifies a resource for analysis.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ResourceSelector|null` |   |

### hasResourceSelector

### clearResourceSelector

### setResourceSelector

Optional. Specifies a resource for analysis.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ResourceSelector` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIdentitySelector

Optional. Specifies an identity for analysis.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.IdentitySelector|null` |   |

### hasIdentitySelector

### clearIdentitySelector

### setIdentitySelector

Optional. Specifies an identity for analysis.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.IdentitySelector` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccessSelector

Optional. Specifies roles or permissions for analysis. This is optional.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.AccessSelector|null` |   |

### hasAccessSelector

### clearAccessSelector

### setAccessSelector

Optional. Specifies roles or permissions for analysis. This is optional.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.AccessSelector` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOptions

Optional. The query options.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.Options|null` |   |

### hasOptions

### clearOptions

### setOptions

Optional. The query options.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConditionContext

Optional. The hypothetical context for IAM conditions evaluation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ConditionContext|null` |   |

### hasConditionContext

### clearConditionContext

### setConditionContext

Optional. The hypothetical context for IAM conditions evaluation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.IamPolicyAnalysisQuery.ConditionContext` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |