# Public Cloud › Analytics › Lakehouse › Roles API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 15 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/public-cloud/analytics/lakehouse/roles.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/analytics/lakehouse/roles.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role` — List the roles of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}` — Get a role of your lakehouse
- `POST /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role` — Create a custom role in your lakehouse
- `DELETE /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}` — Delete a custom role of your lakehouse
- `PUT /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}` — Update a custom role of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/event` — List the events of a role of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task` — List the tasks of a role of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task/{taskId}` — Get a task of a role of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment` — List the role assignments of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}` — Get a role assignment of your lakehouse
- `POST /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment` — Assign a role to an identity of your lakehouse
- `DELETE /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}` — Delete a role assignment of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/event` — List the events of a role assignment of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task` — List the tasks of a role assignment of your lakehouse
- `GET /publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task/{taskId}` — Get a task of a role assignment of your lakehouse

## List the roles of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getAllLakehouseRoles

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/get`

Lists the six predefined roles first, then the custom roles. Every lakehouse holds the six predefined roles from its creation: LAKEHOUSE_ADMIN, USER_ADMIN, DATA_OWNER, DATA_EDITOR, DATA_VIEWER and METADATA_VIEWER. They cannot be changed or deleted, and are not counted in the role quota.

Roles give data access only, through the Apache Iceberg catalog, the SQL engines and the storage of the lakehouse. The calls to this API are authorized by OVHcloud IAM, whatever the roles of the lakehouse.

With the S3 key of one of its credentials, a user whose roles, its own or its groups', let it read the data of a catalog or schema can also list the object names, sizes and dates of the whole storage of the lakehouse, other catalogs included. It can read or change only the objects of the catalogs and schemas its roles reach.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Role[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role. Send it back on update to make sure nobody changed the role in between. |
| `createdAt` | string (date-time) | read-only | Date the role was created |
| `currentState` | publicCloud.lakehouse.RoleCurrentState | read-only | Current state of the role, computed by the service |
| `currentState.assignmentCount` | integer | read-only | Number of role assignments of the role that are not being deleted |
| `currentState.description` | string | read-only | Description of the role. Null when it has none. |
| `currentState.kind` | publicCloud.lakehouse.RoleKindEnum | read-only | Whether the role is predefined or custom — one of `CUSTOM`, `PREDEFINED` |
| `currentState.name` | string | read-only | Name of the role |
| `currentState.permissions` | publicCloud.lakehouse.RolePermissionState[] | read-only | Permissions of the role, each with the state of its target |
| `currentState.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | read-only | Privileges given on the target |
| `currentState.permissions[].target` | publicCloud.lakehouse.PermissionTarget | read-only | What the privileges apply to |
| `currentState.permissions[].targetState` | publicCloud.lakehouse.PermissionTargetStateEnum | read-only | Whether the target still exists. A permission whose target was deleted gives nothing. — one of `ACTIVE`, `TARGET_DELETED` |
| `currentState.predefinedKey` | publicCloud.lakehouse.PredefinedRoleEnum | read-only | Stable key of a predefined role. Null on a custom role. — one of `DATA_EDITOR`, `DATA_OWNER`, `DATA_VIEWER`, `LAKEHOUSE_ADMIN`, `METADATA_VIEWER`, `USER_ADMIN` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role, and its last failed task while the role is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role. A change is accepted only in READY or ERROR. A deletion is also accepted in CREATING and UPDATING and replaces the change in progress. The predefined roles are always READY. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | read-only | Last requested specification of the role |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "assignmentCount": 0,
      "description": "string",
      "kind": "CUSTOM",
      "name": "string",
      "permissions": [
        {
          "privileges": [
            "ALTER"
          ],
          "target": {
            "catalogId": "00000000-0000-0000-0000-000000000000",
            "schemaId": "00000000-0000-0000-0000-000000000000",
            "type": "CATALOG"
          },
          "targetState": "ACTIVE"
        }
      ],
      "predefinedKey": "DATA_EDITOR",
      "statusReason": {
        "code": "CANCELED",
        "message": "string"
      }
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "description": "string",
      "name": "string",
      "permissions": [
        {
          "privileges": [
            "ALTER"
          ],
          "target": {
            "catalogId": "00000000-0000-0000-0000-000000000000",
            "schemaId": "00000000-0000-0000-0000-000000000000",
            "type": "CATALOG"
          }
        }
      ]
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role");

print_r($result);
?>
```

## Get a role of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRole

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Role | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role. Send it back on update to make sure nobody changed the role in between. |
| `createdAt` | string (date-time) | read-only | Date the role was created |
| `currentState` | publicCloud.lakehouse.RoleCurrentState | read-only | Current state of the role, computed by the service |
| `currentState.assignmentCount` | integer | read-only | Number of role assignments of the role that are not being deleted |
| `currentState.description` | string | read-only | Description of the role. Null when it has none. |
| `currentState.kind` | publicCloud.lakehouse.RoleKindEnum | read-only | Whether the role is predefined or custom — one of `CUSTOM`, `PREDEFINED` |
| `currentState.name` | string | read-only | Name of the role |
| `currentState.permissions` | publicCloud.lakehouse.RolePermissionState[] | read-only | Permissions of the role, each with the state of its target |
| `currentState.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | read-only | Privileges given on the target |
| `currentState.permissions[].target` | publicCloud.lakehouse.PermissionTarget | read-only | What the privileges apply to |
| `currentState.permissions[].targetState` | publicCloud.lakehouse.PermissionTargetStateEnum | read-only | Whether the target still exists. A permission whose target was deleted gives nothing. — one of `ACTIVE`, `TARGET_DELETED` |
| `currentState.predefinedKey` | publicCloud.lakehouse.PredefinedRoleEnum | read-only | Stable key of a predefined role. Null on a custom role. — one of `DATA_EDITOR`, `DATA_OWNER`, `DATA_VIEWER`, `LAKEHOUSE_ADMIN`, `METADATA_VIEWER`, `USER_ADMIN` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role, and its last failed task while the role is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role. A change is accepted only in READY or ERROR. A deletion is also accepted in CREATING and UPDATING and replaces the change in progress. The predefined roles are always READY. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | read-only | Last requested specification of the role |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "assignmentCount": 0,
    "description": "string",
    "kind": "CUSTOM",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        },
        "targetState": "ACTIVE"
      }
    ],
    "predefinedKey": "DATA_EDITOR",
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}");

print_r($result);
?>
```

## Create a custom role in your lakehouse

`POST /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#createLakehouseRole

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/create`

Creates the custom role asynchronously. The response is the role in CREATING, with the creation task in `currentTasks`: follow it on the task routes of the role, or read the role until its `resourceStatus` is READY or ERROR. A role gives nothing until it is assigned: see the role assignment routes.

Each permission gives privileges on one target: the whole lakehouse (every catalog, including catalogs created later), one catalog and everything in it, or one schema of a catalog. A role holds at most 50 permissions, and at most one per target. The privileges of a permission must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. Any other combination is refused with a 400 that lists the missing privileges.

The name is unique among the roles of the lakehouse, and the names of the predefined roles are reserved. The creation is refused with a 409 while the lakehouse, or a catalog or schema a permission targets, is being deleted.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.lakehouse.RoleCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | yes | Specification of the role to create |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |

```json
{
  "targetSpec": {
    "description": "string",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Role | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role. Send it back on update to make sure nobody changed the role in between. |
| `createdAt` | string (date-time) | read-only | Date the role was created |
| `currentState` | publicCloud.lakehouse.RoleCurrentState | read-only | Current state of the role, computed by the service |
| `currentState.assignmentCount` | integer | read-only | Number of role assignments of the role that are not being deleted |
| `currentState.description` | string | read-only | Description of the role. Null when it has none. |
| `currentState.kind` | publicCloud.lakehouse.RoleKindEnum | read-only | Whether the role is predefined or custom — one of `CUSTOM`, `PREDEFINED` |
| `currentState.name` | string | read-only | Name of the role |
| `currentState.permissions` | publicCloud.lakehouse.RolePermissionState[] | read-only | Permissions of the role, each with the state of its target |
| `currentState.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | read-only | Privileges given on the target |
| `currentState.permissions[].target` | publicCloud.lakehouse.PermissionTarget | read-only | What the privileges apply to |
| `currentState.permissions[].targetState` | publicCloud.lakehouse.PermissionTargetStateEnum | read-only | Whether the target still exists. A permission whose target was deleted gives nothing. — one of `ACTIVE`, `TARGET_DELETED` |
| `currentState.predefinedKey` | publicCloud.lakehouse.PredefinedRoleEnum | read-only | Stable key of a predefined role. Null on a custom role. — one of `DATA_EDITOR`, `DATA_OWNER`, `DATA_VIEWER`, `LAKEHOUSE_ADMIN`, `METADATA_VIEWER`, `USER_ADMIN` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role, and its last failed task while the role is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role. A change is accepted only in READY or ERROR. A deletion is also accepted in CREATING and UPDATING and replaces the change in progress. The predefined roles are always READY. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | read-only | Last requested specification of the role |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "assignmentCount": 0,
    "description": "string",
    "kind": "CUSTOM",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        },
        "targetState": "ACTIVE"
      }
    ],
    "predefinedKey": "DATA_EDITOR",
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.lakehouse.RoleCreation
result = client.post("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role",
	targetSpec = None, # Specification of the role to create (type: publicCloud.lakehouse.RoleTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.lakehouse.RoleCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role", array(
	targetSpec => null, // Specification of the role to create (type: publicCloud.lakehouse.RoleTargetSpec)
));

print_r($result);
?>
```

## Delete a custom role of your lakehouse

`DELETE /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#deleteLakehouseRole

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/delete`

Deletes the custom role asynchronously. The response is the role in DELETING, with the deletion task in `currentTasks`. Once the deletion completes, the role and every route under it, its tasks included, answer 404. Deleting a role also deletes its role assignments: the identities that held it lose the access it gave them.

A predefined role cannot be deleted: the deletion is refused with a 409.

A deletion is accepted in READY and ERROR, and also in CREATING and UPDATING, where it replaces the change in progress. A new deletion while one is running is refused with a 409.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Role | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role. Send it back on update to make sure nobody changed the role in between. |
| `createdAt` | string (date-time) | read-only | Date the role was created |
| `currentState` | publicCloud.lakehouse.RoleCurrentState | read-only | Current state of the role, computed by the service |
| `currentState.assignmentCount` | integer | read-only | Number of role assignments of the role that are not being deleted |
| `currentState.description` | string | read-only | Description of the role. Null when it has none. |
| `currentState.kind` | publicCloud.lakehouse.RoleKindEnum | read-only | Whether the role is predefined or custom — one of `CUSTOM`, `PREDEFINED` |
| `currentState.name` | string | read-only | Name of the role |
| `currentState.permissions` | publicCloud.lakehouse.RolePermissionState[] | read-only | Permissions of the role, each with the state of its target |
| `currentState.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | read-only | Privileges given on the target |
| `currentState.permissions[].target` | publicCloud.lakehouse.PermissionTarget | read-only | What the privileges apply to |
| `currentState.permissions[].targetState` | publicCloud.lakehouse.PermissionTargetStateEnum | read-only | Whether the target still exists. A permission whose target was deleted gives nothing. — one of `ACTIVE`, `TARGET_DELETED` |
| `currentState.predefinedKey` | publicCloud.lakehouse.PredefinedRoleEnum | read-only | Stable key of a predefined role. Null on a custom role. — one of `DATA_EDITOR`, `DATA_OWNER`, `DATA_VIEWER`, `LAKEHOUSE_ADMIN`, `METADATA_VIEWER`, `USER_ADMIN` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role, and its last failed task while the role is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role. A change is accepted only in READY or ERROR. A deletion is also accepted in CREATING and UPDATING and replaces the change in progress. The predefined roles are always READY. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | read-only | Last requested specification of the role |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "assignmentCount": 0,
    "description": "string",
    "kind": "CUSTOM",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        },
        "targetState": "ACTIVE"
      }
    ],
    "predefinedKey": "DATA_EDITOR",
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}");

print_r($result);
?>
```

## Update a custom role of your lakehouse

`PUT /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#editLakehouseRole

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/edit`

Replaces the role's target specification as a whole. The body carries the complete desired state of every field `publicCloud.lakehouse.RoleUpdateTargetSpec` exposes — `description` and `permissions` — so read the role first and restate every value you want to keep: a field left out of `targetSpec` is cleared, and `permissions` replaces the whole list of permissions, it is not merged with it. The permissions follow the rules of the creation.

The create-only field `name` cannot be changed once the role exists. It is deliberately absent from the update model, and sending it is rejected with a 400. A predefined role cannot be changed: the update is refused with a 409.

A permission whose catalog or schema was deleted (`targetState` TARGET_DELETED) can be sent back unchanged, so a body built from a read always succeeds. A new permission on a deleted catalog or schema is refused with a 404.

When only the description changes, or when the role has no role assignment, the change is applied at once: the response is 200 with the role READY. When the permissions of an assigned role change, or when the role is in ERROR, the change is applied asynchronously: the response is 202 with the role UPDATING and the new task in `currentTasks`. The update is refused with a 409 while the role is CREATING, UPDATING or DELETING.

The optional `checksum` guards against a lost update: when supplied it must match the role's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |

### Request body (required)

Type: `publicCloud.lakehouse.RoleUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Checksum of the role as you last read it. When set, the update is refused with a 409 checksum-mismatch conflict if the role changed since. When omitted or empty, no check is made. |
| `targetSpec` | publicCloud.lakehouse.RoleUpdateTargetSpec | yes | New specification of the role. It replaces the whole current specification: an optional field you omit is reset to its default, and `permissions` replaces the whole list. Send only the fields of this model: a field that can only be set at creation is refused. |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. A permission whose catalog or schema was deleted can be sent back unchanged. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |

```json
{
  "checksum": "string",
  "targetSpec": {
    "description": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.Role | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role. Send it back on update to make sure nobody changed the role in between. |
| `createdAt` | string (date-time) | read-only | Date the role was created |
| `currentState` | publicCloud.lakehouse.RoleCurrentState | read-only | Current state of the role, computed by the service |
| `currentState.assignmentCount` | integer | read-only | Number of role assignments of the role that are not being deleted |
| `currentState.description` | string | read-only | Description of the role. Null when it has none. |
| `currentState.kind` | publicCloud.lakehouse.RoleKindEnum | read-only | Whether the role is predefined or custom — one of `CUSTOM`, `PREDEFINED` |
| `currentState.name` | string | read-only | Name of the role |
| `currentState.permissions` | publicCloud.lakehouse.RolePermissionState[] | read-only | Permissions of the role, each with the state of its target |
| `currentState.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | read-only | Privileges given on the target |
| `currentState.permissions[].target` | publicCloud.lakehouse.PermissionTarget | read-only | What the privileges apply to |
| `currentState.permissions[].targetState` | publicCloud.lakehouse.PermissionTargetStateEnum | read-only | Whether the target still exists. A permission whose target was deleted gives nothing. — one of `ACTIVE`, `TARGET_DELETED` |
| `currentState.predefinedKey` | publicCloud.lakehouse.PredefinedRoleEnum | read-only | Stable key of a predefined role. Null on a custom role. — one of `DATA_EDITOR`, `DATA_OWNER`, `DATA_VIEWER`, `LAKEHOUSE_ADMIN`, `METADATA_VIEWER`, `USER_ADMIN` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role, and its last failed task while the role is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role. A change is accepted only in READY or ERROR. A deletion is also accepted in CREATING and UPDATING and replaces the change in progress. The predefined roles are always READY. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleTargetSpec | read-only | Last requested specification of the role |
| `targetSpec.description` | string |  | Description of the role. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the role, unique in the lakehouse. Same rules as the lakehouse name. The names of the predefined roles (`lakehouse_admin`, `user_admin`, `data_owner`, `data_editor`, `data_viewer`, `metadata_viewer`) are reserved. Immutable after creation. |
| `targetSpec.permissions` | publicCloud.lakehouse.RolePermission[] | yes | Permissions of the role, at most 50 and at most one per target. They replace the whole list on update. An empty list gives nothing. |
| `targetSpec.permissions[].privileges` | publicCloud.lakehouse.PrivilegeEnum[] | yes | Privileges given on the target, at least one, each at most once. They must form a combination the region can enforce: every privilege requires BROWSE. INSERT, UPDATE and DELETE come together and require SELECT and ALTER. ALTER requires SELECT. DROP requires INSERT, UPDATE and DELETE. |
| `targetSpec.permissions[].target` | publicCloud.lakehouse.PermissionTarget | yes | What the privileges apply to |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "assignmentCount": 0,
    "description": "string",
    "kind": "CUSTOM",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        },
        "targetState": "ACTIVE"
      }
    ],
    "predefinedKey": "DATA_EDITOR",
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "name": "string",
    "permissions": [
      {
        "privileges": [
          "ALTER"
        ],
        "target": {
          "catalogId": "00000000-0000-0000-0000-000000000000",
          "schemaId": "00000000-0000-0000-0000-000000000000",
          "type": "CATALOG"
        }
      }
    ]
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.lakehouse.RoleUpdate
result = client.put("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}",
	checksum = None, # Checksum of the role as you last read it. When set, the update is refused with a 409 checksum-mismatch conflict if the role changed since. When omitted or empty, no check is made. (type: string, nullable)
	targetSpec = None, # New specification of the role. It replaces the whole current specification: an optional field you omit is reset to its default, and `permissions` replaces the whole list. Send only the fields of this model: a field that can only be set at creation is refused. (type: publicCloud.lakehouse.RoleUpdateTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.lakehouse.RoleUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}", array(
	checksum => null, // Checksum of the role as you last read it. When set, the update is refused with a 409 checksum-mismatch conflict if the role changed since. When omitted or empty, no check is made. (type: string, nullable)
	targetSpec => null, // New specification of the role. It replaces the whole current specification: an optional field you omit is reset to its default, and `permissions` replaces the whole list. Send only the fields of this model: a field that can only be set at creation is refused. (type: publicCloud.lakehouse.RoleUpdateTargetSpec)
));

print_r($result);
?>
```

## List the events of a role of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/event`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRoleEvents

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/event/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |
| `taskId` | query | string (uuid) |  | Return only the events of this task |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Event[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the event |
| `kind` | string | read-only | Nature of the event |
| `link` | string | read-only | Link to the event related resource |
| `message` | string | read-only | Description of what happened on the event |
| `type` | common.EventTypeEnum | read-only | Type of the event — one of `TARGET_SPEC_UPDATE`, `TASK_ERROR`, `TASK_START`, `TASK_SUCCESS` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "kind": "string",
    "link": "string",
    "message": "string",
    "type": "TARGET_SPEC_UPDATE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/event" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/event")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/event");

print_r($result);
?>
```

## List the tasks of a role of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getAllLakehouseRoleTasks

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "errors": [
      {
        "message": "string"
      }
    ],
    "finishedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "link": "string",
    "message": "string",
    "progress": [
      {
        "name": "string",
        "status": "DONE"
      }
    ],
    "startedAt": "2024-01-01T12:00:00Z",
    "status": "DONE",
    "type": "string",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task");

print_r($result);
?>
```

## Get a task of a role of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRoleTask

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/role/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleId` | path | string (uuid) | yes | Role ID |
| `taskId` | path | string (uuid) | yes | Task ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task/{taskId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task/{taskId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/role/{roleId}/task/{taskId}");

print_r($result);
?>
```

## List the role assignments of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getAllLakehouseRoleAssignments

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/get`

Lists every role assignment of the lakehouse, for every role and identity. To show the roles of one user, service account or group, or the identities holding one role, select the role assignments on `targetSpec.identity` or `targetSpec.roleId`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.RoleAssignment[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role assignment, which never changes after creation |
| `createdAt` | string (date-time) | read-only | Date the role assignment was created |
| `currentState` | publicCloud.lakehouse.RoleAssignmentCurrentState | read-only | Current state of the role assignment, computed by the service |
| `currentState.identity` | publicCloud.lakehouse.IdentityReference | read-only | User, service account or group that holds the role |
| `currentState.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `currentState.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `currentState.identityName` | string | read-only | Name of the user, service account or group that holds the role |
| `currentState.roleId` | string (uuid) | read-only | Role assigned |
| `currentState.roleName` | string | read-only | Name of the role assigned |
| `currentState.scope` | publicCloud.lakehouse.RoleAssignmentScope | read-only | Catalog the role is narrowed to. Null when the identity holds the role as it is defined. |
| `currentState.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `currentState.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role assignment is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role assignment, and its last failed task while the role assignment is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role assignment |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role assignment. The role assignment cannot be changed: delete it and create it again. A deletion is accepted in READY, ERROR and CREATING, and replaces the change in progress. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleAssignmentTargetSpec | read-only | Last requested specification of the role assignment |
| `targetSpec.identity` | publicCloud.lakehouse.IdentityReference | yes | User, service account or group that holds the role. Immutable after creation. |
| `targetSpec.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `targetSpec.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `targetSpec.roleId` | string (uuid) | yes | Role assigned. Immutable after creation. |
| `targetSpec.scope` | publicCloud.lakehouse.RoleAssignmentScope |  | Narrows the role to one catalog. Omit it, or set it to null, to hold the role as it is defined. Not accepted on the LAKEHOUSE_ADMIN and USER_ADMIN predefined roles. Immutable after creation. |
| `targetSpec.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `targetSpec.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role assignment |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "identity": {
        "id": "string",
        "type": "GROUP"
      },
      "identityName": "string",
      "roleId": "00000000-0000-0000-0000-000000000000",
      "roleName": "string",
      "scope": {
        "catalogId": "00000000-0000-0000-0000-000000000000",
        "type": "CATALOG"
      },
      "statusReason": {
        "code": "CANCELED",
        "message": "string"
      }
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "identity": {
        "id": "string",
        "type": "GROUP"
      },
      "roleId": "00000000-0000-0000-0000-000000000000",
      "scope": {
        "catalogId": "00000000-0000-0000-0000-000000000000",
        "type": "CATALOG"
      }
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment");

print_r($result);
?>
```

## Get a role assignment of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRoleAssignment

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleAssignmentId` | path | string (uuid) | yes | Role assignment ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.RoleAssignment | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role assignment, which never changes after creation |
| `createdAt` | string (date-time) | read-only | Date the role assignment was created |
| `currentState` | publicCloud.lakehouse.RoleAssignmentCurrentState | read-only | Current state of the role assignment, computed by the service |
| `currentState.identity` | publicCloud.lakehouse.IdentityReference | read-only | User, service account or group that holds the role |
| `currentState.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `currentState.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `currentState.identityName` | string | read-only | Name of the user, service account or group that holds the role |
| `currentState.roleId` | string (uuid) | read-only | Role assigned |
| `currentState.roleName` | string | read-only | Name of the role assigned |
| `currentState.scope` | publicCloud.lakehouse.RoleAssignmentScope | read-only | Catalog the role is narrowed to. Null when the identity holds the role as it is defined. |
| `currentState.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `currentState.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role assignment is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role assignment, and its last failed task while the role assignment is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role assignment |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role assignment. The role assignment cannot be changed: delete it and create it again. A deletion is accepted in READY, ERROR and CREATING, and replaces the change in progress. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleAssignmentTargetSpec | read-only | Last requested specification of the role assignment |
| `targetSpec.identity` | publicCloud.lakehouse.IdentityReference | yes | User, service account or group that holds the role. Immutable after creation. |
| `targetSpec.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `targetSpec.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `targetSpec.roleId` | string (uuid) | yes | Role assigned. Immutable after creation. |
| `targetSpec.scope` | publicCloud.lakehouse.RoleAssignmentScope |  | Narrows the role to one catalog. Omit it, or set it to null, to hold the role as it is defined. Not accepted on the LAKEHOUSE_ADMIN and USER_ADMIN predefined roles. Immutable after creation. |
| `targetSpec.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `targetSpec.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role assignment |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "identityName": "string",
    "roleId": "00000000-0000-0000-0000-000000000000",
    "roleName": "string",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    },
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "roleId": "00000000-0000-0000-0000-000000000000",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}");

print_r($result);
?>
```

## Assign a role to an identity of your lakehouse

`POST /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#createLakehouseRoleAssignment

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/create`

Creates the role assignment asynchronously. The response is the role assignment in CREATING, with the creation task in `currentTasks`: follow it on the task routes of the role assignment, or read the role assignment until its `resourceStatus` is READY or ERROR.

The identity is a user, a service account or a group of the lakehouse, and `identity.type` must match it, or the creation is refused with a 400. A role assigned to a group applies to every member of the group. Without `scope`, the identity holds the role as it is defined. With a CATALOG scope, it holds the permissions of the role only within that catalog. The predefined roles LAKEHOUSE_ADMIN and USER_ADMIN cover the whole lakehouse and refuse a scope with a 400.

The same role cannot be assigned twice to the same identity with the same scope. The creation is refused with a 409 while the lakehouse, the role, the identity or the scope catalog is being deleted, or while the same role assignment is still being removed. A role assignment cannot be changed after creation: delete it and assign the role again.

Assigning a role gives data access: whoever may call this route can give any role of the lakehouse to any of its identities. Management rights, granted in OVHcloud IAM, are not affected.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.lakehouse.RoleAssignmentCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.lakehouse.RoleAssignmentTargetSpec | yes | Specification of the role assignment to create |
| `targetSpec.identity` | publicCloud.lakehouse.IdentityReference | yes | User, service account or group that holds the role. Immutable after creation. |
| `targetSpec.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `targetSpec.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `targetSpec.roleId` | string (uuid) | yes | Role assigned. Immutable after creation. |
| `targetSpec.scope` | publicCloud.lakehouse.RoleAssignmentScope |  | Narrows the role to one catalog. Omit it, or set it to null, to hold the role as it is defined. Not accepted on the LAKEHOUSE_ADMIN and USER_ADMIN predefined roles. Immutable after creation. |
| `targetSpec.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `targetSpec.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |

```json
{
  "targetSpec": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "roleId": "00000000-0000-0000-0000-000000000000",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    }
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.RoleAssignment | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role assignment, which never changes after creation |
| `createdAt` | string (date-time) | read-only | Date the role assignment was created |
| `currentState` | publicCloud.lakehouse.RoleAssignmentCurrentState | read-only | Current state of the role assignment, computed by the service |
| `currentState.identity` | publicCloud.lakehouse.IdentityReference | read-only | User, service account or group that holds the role |
| `currentState.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `currentState.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `currentState.identityName` | string | read-only | Name of the user, service account or group that holds the role |
| `currentState.roleId` | string (uuid) | read-only | Role assigned |
| `currentState.roleName` | string | read-only | Name of the role assigned |
| `currentState.scope` | publicCloud.lakehouse.RoleAssignmentScope | read-only | Catalog the role is narrowed to. Null when the identity holds the role as it is defined. |
| `currentState.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `currentState.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role assignment is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role assignment, and its last failed task while the role assignment is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role assignment |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role assignment. The role assignment cannot be changed: delete it and create it again. A deletion is accepted in READY, ERROR and CREATING, and replaces the change in progress. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleAssignmentTargetSpec | read-only | Last requested specification of the role assignment |
| `targetSpec.identity` | publicCloud.lakehouse.IdentityReference | yes | User, service account or group that holds the role. Immutable after creation. |
| `targetSpec.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `targetSpec.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `targetSpec.roleId` | string (uuid) | yes | Role assigned. Immutable after creation. |
| `targetSpec.scope` | publicCloud.lakehouse.RoleAssignmentScope |  | Narrows the role to one catalog. Omit it, or set it to null, to hold the role as it is defined. Not accepted on the LAKEHOUSE_ADMIN and USER_ADMIN predefined roles. Immutable after creation. |
| `targetSpec.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `targetSpec.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role assignment |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "identityName": "string",
    "roleId": "00000000-0000-0000-0000-000000000000",
    "roleName": "string",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    },
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "roleId": "00000000-0000-0000-0000-000000000000",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.lakehouse.RoleAssignmentCreation
result = client.post("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment",
	targetSpec = None, # Specification of the role assignment to create (type: publicCloud.lakehouse.RoleAssignmentTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.lakehouse.RoleAssignmentCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment", array(
	targetSpec => null, // Specification of the role assignment to create (type: publicCloud.lakehouse.RoleAssignmentTargetSpec)
));

print_r($result);
?>
```

## Delete a role assignment of your lakehouse

`DELETE /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#deleteLakehouseRoleAssignment

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/delete`

Deletes the role assignment asynchronously. The response is the role assignment in DELETING, with the deletion task in `currentTasks`. Once the deletion completes, the role assignment and every route under it, its tasks included, answer 404, and the identity no longer holds the role.

The last Lakehouse Admin assignment of the lakehouse cannot be deleted: the deletion is refused with a 409 while it is the only role assignment of LAKEHOUSE_ADMIN that is not being deleted. Assign the Lakehouse Admin role to another identity first. The rule counts role assignments, not the people they reach: an assignment to an empty group counts.

A deletion is accepted in READY and ERROR, and also in CREATING, where it replaces the change in progress. A new deletion while one is running is refused with a 409.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleAssignmentId` | path | string (uuid) | yes | Role assignment ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.lakehouse.RoleAssignment | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the target specification of the role assignment, which never changes after creation |
| `createdAt` | string (date-time) | read-only | Date the role assignment was created |
| `currentState` | publicCloud.lakehouse.RoleAssignmentCurrentState | read-only | Current state of the role assignment, computed by the service |
| `currentState.identity` | publicCloud.lakehouse.IdentityReference | read-only | User, service account or group that holds the role |
| `currentState.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `currentState.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `currentState.identityName` | string | read-only | Name of the user, service account or group that holds the role |
| `currentState.roleId` | string (uuid) | read-only | Role assigned |
| `currentState.roleName` | string | read-only | Name of the role assigned |
| `currentState.scope` | publicCloud.lakehouse.RoleAssignmentScope | read-only | Catalog the role is narrowed to. Null when the identity holds the role as it is defined. |
| `currentState.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `currentState.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `currentState.statusReason` | publicCloud.lakehouse.StatusReason | read-only | Why the role assignment is in ERROR. Null in any other status. |
| `currentState.statusReason.code` | publicCloud.lakehouse.StatusReasonCodeEnum | read-only | Stable code of the reason, for programs — one of `CANCELED`, `CATALOG_NOT_EMPTY`, `DEDICATED_COMPUTE_POOL_EXISTS`, `DEDICATED_UNAVAILABLE`, `INVALID_SHAPE`, `LAKEHOUSE_NOT_EMPTY`, `OPERATION_FAILED`, `QUOTA_EXCEEDED`, `RECONCILE_FAILED`, `REGION_UNAVAILABLE`, `SCHEMA_NOT_EMPTY`, `TIMED_OUT` |
| `currentState.statusReason.message` | string | read-only | Explanation of the reason, for people. It may change. Do not parse it. |
| `currentTasks` | common.CurrentTask[] | read-only | Tasks in progress on the role assignment, and its last failed task while the role assignment is in ERROR. Always an array. Empty when there is none. |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the role assignment |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness status of the role assignment. The role assignment cannot be changed: delete it and create it again. A deletion is accepted in READY, ERROR and CREATING, and replaces the change in progress. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.lakehouse.RoleAssignmentTargetSpec | read-only | Last requested specification of the role assignment |
| `targetSpec.identity` | publicCloud.lakehouse.IdentityReference | yes | User, service account or group that holds the role. Immutable after creation. |
| `targetSpec.identity.id` | string | yes | Identifier of the identity: the `id` of the lakehouse user, service account or group |
| `targetSpec.identity.type` | publicCloud.lakehouse.IdentityTypeEnum | yes | Kind of identity. It must match the identity referenced by `id`. — one of `GROUP`, `SERVICE_ACCOUNT`, `USER` |
| `targetSpec.roleId` | string (uuid) | yes | Role assigned. Immutable after creation. |
| `targetSpec.scope` | publicCloud.lakehouse.RoleAssignmentScope |  | Narrows the role to one catalog. Omit it, or set it to null, to hold the role as it is defined. Not accepted on the LAKEHOUSE_ADMIN and USER_ADMIN predefined roles. Immutable after creation. |
| `targetSpec.scope.catalogId` | string (uuid) | yes | Catalog the role is narrowed to. It must exist and not be being deleted. |
| `targetSpec.scope.type` | publicCloud.lakehouse.RoleAssignmentScopeTypeEnum | yes | Kind of scope — one of `CATALOG` |
| `updatedAt` | string (date-time) | read-only | Date of the last change to the role assignment |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "identityName": "string",
    "roleId": "00000000-0000-0000-0000-000000000000",
    "roleName": "string",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    },
    "statusReason": {
      "code": "CANCELED",
      "message": "string"
    }
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "identity": {
      "id": "string",
      "type": "GROUP"
    },
    "roleId": "00000000-0000-0000-0000-000000000000",
    "scope": {
      "catalogId": "00000000-0000-0000-0000-000000000000",
      "type": "CATALOG"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}");

print_r($result);
?>
```

## List the events of a role assignment of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/event`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRoleAssignmentEvents

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/event/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleAssignmentId` | path | string (uuid) | yes | Role assignment ID |
| `taskId` | query | string (uuid) |  | Return only the events of this task |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Event[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the event |
| `kind` | string | read-only | Nature of the event |
| `link` | string | read-only | Link to the event related resource |
| `message` | string | read-only | Description of what happened on the event |
| `type` | common.EventTypeEnum | read-only | Type of the event — one of `TARGET_SPEC_UPDATE`, `TASK_ERROR`, `TASK_START`, `TASK_SUCCESS` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "kind": "string",
    "link": "string",
    "message": "string",
    "type": "TARGET_SPEC_UPDATE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/event" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/event")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/event");

print_r($result);
?>
```

## List the tasks of a role assignment of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getAllLakehouseRoleAssignmentTasks

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleAssignmentId` | path | string (uuid) | yes | Role assignment ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task[] | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "errors": [
      {
        "message": "string"
      }
    ],
    "finishedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "link": "string",
    "message": "string",
    "progress": [
      {
        "name": "string",
        "status": "DONE"
      }
    ],
    "startedAt": "2024-01-01T12:00:00Z",
    "status": "DONE",
    "type": "string",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task");

print_r($result);
?>
```

## Get a task of a role assignment of your lakehouse

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/lakehouse/roles/#getLakehouseRoleAssignmentTask

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:analytics/lakehouse/roleAssignment/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lakehouseId` | path | string (uuid) | yes | Lakehouse ID |
| `projectId` | path | string | yes | Project ID |
| `roleAssignmentId` | path | string (uuid) | yes | Role assignment ID |
| `taskId` | path | string (uuid) | yes | Task ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task/{taskId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task/{taskId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/managedAnalytics/lakehouse/{lakehouseId}/roleAssignment/{roleAssignmentId}/task/{taskId}");

print_r($result);
?>
```
