# The WorkspaceAssignment object

The direct assignment of a provisioned account-level principal (user, service
 principal, or group) to a workspace, together with the entitlements that
 assignment grants in the workspace.

 This resource covers only principals assigned directly to the workspace.
 Principals that inherit workspace access through a group are not represented
 here. See WorkspaceAccessDetail and WorkspaceIdentityDetail for the effective,
 direct-or-indirect view. Creating the resource assigns the principal to the
 workspace, and deleting it removes the assignment.

 `entitlements` is the only client-settable field. It holds the entitlements
 granted directly on this assignment, including any the principal also holds
 through a group. `effective_entitlements` is the read-only union of those and
 any granted through group membership.

 A direct assignment always carries at least one directly-assigned entitlement,
 because the assignment is what grants it. Create and update both reject an
 empty `entitlements` set. To remove a principal's assignment entirely, delete
 the resource.

 This resource replaces workspace assignment previously managed through the
 workspace SCIM and permission-assignment APIs, and is intended for account
 and workspace admins.

## Attributes

- `principal_type` (string, Beta)
  The type of the principal (user/service principal/group) that is assigned.
  Possible values: `PRINCIPAL_TYPE_UNSPECIFIED`, `USER`, `SERVICE_PRINCIPAL`, `GROUP`
- `principal_id` (int64, Beta)
  The internal ID of the principal (user/sp/group) in <Databricks>.
- `workspace_id` (int64, Beta)
  The workspace ID where the principal is assigned.
- `account_id` (string, Beta)
  The account ID parent of the workspace where the principal is assigned
- `entitlements` (array of string, Beta)
  Entitlements granted directly to the principal on this workspace. This is the only
   client-settable field. Create and update manage exactly this set, including entitlements the
   principal also holds through a group.
   List responses leave this field empty. Get a single principal to read its entitlements.
  Possible values: `ENTITLEMENT_UNSPECIFIED`, `WORKSPACE_ACCESS`, `WORKSPACE_CONSUME`, `DATABRICKS_SQL_ACCESS`, `WORKSPACE_ADMIN`, `ALLOW_CLUSTER_CREATE`, `ALLOW_INSTANCE_POOL_CREATE`
- `effective_entitlements` (array of string, Beta)
  Every entitlement the principal holds in this workspace, whether granted directly or through
   group membership. Get responses populate this field. List responses leave it empty.
  Possible values: `ENTITLEMENT_UNSPECIFIED`, `WORKSPACE_ACCESS`, `WORKSPACE_CONSUME`, `DATABRICKS_SQL_ACCESS`, `WORKSPACE_ADMIN`, `ALLOW_CLUSTER_CREATE`, `ALLOW_INSTANCE_POOL_CREATE`

## Example

```json
{
  "principal_type": "string",
  "principal_id": 0,
  "workspace_id": 0,
  "account_id": "string",
  "entitlements": [
    "string"
  ],
  "effective_entitlements": [
    "string"
  ]
}
```


