# Google Cloud Iam V3 Client - Class PrincipalAccessBoundaryPolicyRule (1.3.0)

1.3.0 (latest) 1.2.2 1.1.1 1.0.3 0.5.5 0.4.2 0.3.1 0.2.0 0.1.7 Reference documentation and code samples for the Google Cloud Iam V3 Client class PrincipalAccessBoundaryPolicyRule.

Principal access boundary policy rule that defines the resource boundary.

Generated from protobuf message `google.iam.v3.PrincipalAccessBoundaryPolicyRule`

## Namespace

Google \\ Cloud \\ Iam \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ description` | `string` Optional. The description of the principal access boundary policy rule. Must be less than or equal to 256 characters. |
| `↳ resources` | `string[]` Required. A list of Resource Manager resources. If a resource is listed in the rule, then the rule applies for that resource and its descendants. The number of resources in a policy is limited to 500 across all rules in the policy. The following resource types are supported: \* \* Organizations, such as `//cloudresourcemanager.googleapis.com/organizations/123`. \* \* Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. \* \* Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. |
| `↳ effect` | `int` Required. The access relationship of principals to the resources in this rule. |

### getDescription

Optional. The description of the principal access boundary policy rule.

Must be less than or equal to 256 characters.

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

### setDescription

Optional. The description of the principal access boundary policy rule.

Must be less than or equal to 256 characters.

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

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

### getResources

Required. A list of Resource Manager resources. If a resource is listed in
the rule, then the rule applies for that resource and its descendants. The
number of resources in a policy is limited to 500 across all rules in the
policy.

The following resource types are supported:

- Organizations, such as `//cloudresourcemanager.googleapis.com/organizations/123`.
- Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
- Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setResources

Required. A list of Resource Manager resources. If a resource is listed in
the rule, then the rule applies for that resource and its descendants. The
number of resources in a policy is limited to 500 across all rules in the
policy.

The following resource types are supported:

- Organizations, such as `//cloudresourcemanager.googleapis.com/organizations/123`.
- Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
- Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.

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

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

### getEffect

Required. The access relationship of principals to the resources in this
rule.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Effect](https://docs.cloud.google.com/php/docs/reference/cloud-iam/latest/V3.PrincipalAccessBoundaryPolicyRule.Effect). |

### setEffect

Required. The access relationship of principals to the resources in this
rule.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Effect](https://docs.cloud.google.com/php/docs/reference/cloud-iam/latest/V3.PrincipalAccessBoundaryPolicyRule.Effect). |

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