# Google Cloud Iam V3 Client - Class Target (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 Target.

Target is the full resource name of the resource to which the policy will
be bound. Immutable once set.

Generated from protobuf message `google.iam.v3.PolicyBinding.Target`

## Namespace

Google \\ Cloud \\ Iam \\ V3 \\ PolicyBinding

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ principal_set` | `string` Immutable. Full Resource Name used for principal access boundary policy bindings. The principal set must be directly parented by the policy binding's parent or same as the parent if the target is a project/folder/organization. Examples: \* \* For binding's parented by an organization: \* \* Organization: `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` \* \* Workforce Identity: `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` \* \* Workspace Identity: `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` \* \* For binding's parented by a folder: \* \* Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` \* \* For binding's parented by a project: \* \* Project: \* \* `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` \* \* `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` \* \* Workload Identity Pool: `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` |

### getPrincipalSet

Immutable. Full Resource Name used for principal access boundary policy
bindings. The principal set must be directly parented by the policy
binding's parent or same as the parent if the target is a
project/folder/organization.

Examples:

- For binding's parented by an organization:
  - Organization: `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
  - Workforce Identity: `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
  - Workspace Identity: `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
- For binding's parented by a folder:
  - Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
- For binding's parented by a project:
  - Project:
    - `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
    - `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
  - Workload Identity Pool: `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`

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

### hasPrincipalSet

### setPrincipalSet

Immutable. Full Resource Name used for principal access boundary policy
bindings. The principal set must be directly parented by the policy
binding's parent or same as the parent if the target is a
project/folder/organization.

Examples:

- For binding's parented by an organization:
  - Organization: `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
  - Workforce Identity: `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
  - Workspace Identity: `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
- For binding's parented by a folder:
  - Folder: `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
- For binding's parented by a project:
  - Project:
    - `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
    - `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
  - Workload Identity Pool: `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`

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

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

### getTarget

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