All Products
Search
Document Center

Data Lake Formation:ListPermissions

Last Updated:Sep 08, 2025

Queries permissions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dlf:ListPermissionsget
*All Resources
*
    none
none

Request syntax

POST /api/metastore/auth/permissions/list HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
BodyobjectNo

The HTTP request body, in the JSON format.

PrincipalPrincipalNo

The principle based on which permission information is filtered.

NextPageTokenstringNo

A pagination token, which is used to obtain data on the next page. If no pagination token is returned in the response, set this parameter to an empty string ("") or an empty character ('').

token!
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 1000.

100
TypestringYes

The type of permission information to be obtained. Only Hive is supported.

Hive
MetaResourceMetaResourceNo

The resource based on which permission information is filtered.

IsListUserRolePermissionsbooleanNo

Specifies whether to obtain the permissions of the role to which the user belongs. This parameter takes effect only when you specify a specific resource object.

false
MetaResourceTypestringNo

The type of the resource based on which permission information is filtered, such as database or table. If you do not specify this parameter, permission information is filtered based on both databases and tables.

DATABASE
CatalogIdstringNo

The catalog ID.

1344371

Response parameters

ParameterTypeDescriptionExample
object

The returned message body.

Codestring

The returned message.

OK
Messagestring

The response message.

.
RequestIdstring

The request ID.

745EAAE2-5010-5C9F-A95C-B8FC5C1B03BF
Successboolean

Indicates whether the request was successful. Valid values: Valid values:

  • true: The request was successful.
  • false
true
NextPageTokenstring

The page turning token, which is used to obtain the next page of data.

token!
TotalCountlong

The total number of entries returned.

PrincipalResourcePermissionsListPrincipalResourcePermissionsList

The permissions.

[]

Examples

Sample success responses

JSONformat

{
  "Code": "OK",
  "Message": ".",
  "RequestId": "745EAAE2-5010-5C9F-A95C-B8FC5C1B03BF",
  "Success": true,
  "NextPageToken": "token!",
  "TotalCount": 0,
  "PrincipalResourcePermissionsList": [
    {
      "Principal": {
        "PrincipalArn": "acs:ram::[AliyunAccountId]:user/username_abc"
      },
      "MetaResource": {
        "ResourceType": "TABLE",
        "CatalogResource": {
          "CatalogId": 1344371
        },
        "DatabaseResource": {
          "DatabaseName": "default",
          "DatabaseWildcard": "*"
        },
        "TableResource": {
          "DatabaseName": "database_test",
          "TableName": "test_parquet"
        },
        "FunctionResource": {
          "DatabaseName": "default",
          "FunctionName": "default"
        },
        "ColumnResource": {
          "DatabaseName": "default",
          "TableName": "test",
          "ColumnNames": [
            "name"
          ]
        }
      },
      "Accesses": [
        "ALTER/SELECT/CREATE, etc."
      ],
      "DelegateAccesses": [
        "ALTER/SELECT/CREATE, etc."
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.