# Google Cloud Asset V1 Client - Class EffectiveIamPolicy (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 EffectiveIamPolicy.

The effective IAM policies on one resource.

Generated from protobuf message `google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy`

## Namespace

Google \\ Cloud \\ Asset \\ V1 \\ BatchGetEffectiveIamPoliciesResponse

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ full_resource_name` | `string` The [full_resource_name](https://cloud.google.com/asset-inventory/docs/resource-name-format) for which the [policies](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getPolicies__) are computed. This is one of the [BatchGetEffectiveIamPoliciesRequest.names](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getNames__) the caller provides in the request. |
| `↳ policies` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo>` The effective policies for the [full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__). These policies include the policy set on the [full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__) and those set on its parents and ancestors up to the [BatchGetEffectiveIamPoliciesRequest.scope](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getScope__). Note that these policies are not filtered according to the resource type of the [full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__). These policies are hierarchically ordered by [PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__) starting from [full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__) itself to its parents and ancestors, such that policies\[i\]'s [PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__) is the child of policies\[i+1\]'s [PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__), if policies\[i+1\] exists. |

### getFullResourceName

The [full_resource_name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
for which the
[policies](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getPolicies__)
are computed. This is one of the
[BatchGetEffectiveIamPoliciesRequest.names](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getNames__)
the caller provides in the request.

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

### setFullResourceName

The [full_resource_name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
for which the
[policies](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getPolicies__)
are computed. This is one of the
[BatchGetEffectiveIamPoliciesRequest.names](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getNames__)
the caller provides in the request.

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

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

### getPolicies

The effective policies for the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__).

These policies include the policy set on the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__)
and those set on its parents and ancestors up to the
[BatchGetEffectiveIamPoliciesRequest.scope](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getScope__).
Note that these policies are not filtered according to the resource type
of the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__).
These policies are hierarchically ordered by
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__)
starting from
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__)
itself to its parents and ancestors, such that policies\[i\]'s
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__)
is the child of policies\[i+1\]'s
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__),
if policies\[i+1\] exists.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo>` |   |

### setPolicies

The effective policies for the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__).

These policies include the policy set on the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__)
and those set on its parents and ancestors up to the
[BatchGetEffectiveIamPoliciesRequest.scope](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesRequest#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesRequest__getScope__).
Note that these policies are not filtered according to the resource type
of the
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__).
These policies are hierarchically ordered by
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__)
starting from
[full_resource_name](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy__getFullResourceName__)
itself to its parents and ancestors, such that policies\[i\]'s
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__)
is the child of policies\[i+1\]'s
[PolicyInfo.attached_resource](https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo#_Google_Cloud_Asset_V1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo__getAttachedResource__),
if policies\[i+1\] exists.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo>` |

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