update_user_data_permissions_on_dataset

DatasetsApi.update_user_data_permissions_on_dataset(userid, id, role_id, user_data_permissions, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Update user Lake Formation data permissions on a dataset

Updates fine-grained Lake Formation data permissions for the path userid on an LF dataset. Request body is UserDataPermissions (TablePermissions / DataFilterPermissions). On success the Message is “User data permissions updated successfully”. LF-only (else IPV-1058). Note: handler wiring for this PUT is light today; the documented success Message matches the intended update path.

Parameters:
  • userid (str) – User ID whose Lake Formation data permissions are updated. (required)

  • id (str) – Dataset ID. Must be an active LF dataset the target user can access. (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the caller belongs to. (required)

  • user_data_permissions (UserDataPermissions) – (required)

  • content_type (str) – Optional Content-Type header (application/json).

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

UpdateUserDataPermissionsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /datasets/{id}/users/{userid}/data-permissions

Parameter examples

Name

In

Example

userid

path

"alice@example.com"

id

path

"b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"

Request

Request / response example

{
  "TablePermissions": [
    {
      "Columns": [
        "customerid",
        "orderid"
      ],
      "ColumnCondition": "Include"
    }
  ],
  "DataFilterPermissions": [
    {
      "Name": "sales_monthly_orders_df2",
      "Columns": [
        "customerid",
        "gender"
      ],
      "ColumnCondition": "Include",
      "Rows": "All"
    }
  ]
}

Success (HTTP 200)

Permissions updated. Message is “User data permissions updated successfully”.

Request / response example

{
  "Message": "User data permissions updated successfully"
}

Errors

Documented error codes: IPV-1002, DS-1002, AUTH-1011, IPV-1058, IPV-1055, IPV-1059, IPV-1060, DS-1063, RTE-1001.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes include IPV-1002, DS-1002, AUTH-1011, IPV-1058 (non-LF), and related input validation codes when the update path is exercised (e.g. IPV-1055, IPV-1059, IPV-1060, DS-1063).

Dataset is not LF

{
  "Message": "IPV-1058 - Dataset doesnot support fine grained column permissions"
}

Dataset ID not found

{
  "Message": "IPV-1002 - Invalid DatasetID - b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f, resource not found."
}

HTTP 500

Backend/generic failure. Body is {“Message”: “<CODE> - <text>”}.

Request / response example

{
  "Message": "RTE-1001 - An error occurred."
}