GetAclAuthInfo

Updated at:

Checks whether the current caller identity has the ACL permissions for a specified operation on a group of objects of the same type in a specified project. Returns the check result for each object.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:GetAclAuthInfo

get

*Project

acs:odps:{#regionId}:{#accountId}:projects/{#ProjectName}

None None

Request syntax

POST /api/v1/projects/{projectName}/auth HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

projectName

string

Yes

The name of the MaxCompute project.

example_project

Request parameters

Parameter

Type

Required

Description

Example

schemaName

string

No

The name of the schema to which the object belongs.

default

objectType

string

Yes

The object type to be checked. Valid values: TABLE, FUNCTION, and RESOURCE.

TABLE

actionType

string

Yes

The operation to be checked. Valid values: SELECT and DESCRIBE.

SELECT

body

array

No

The array of object names for which permissions need to be checked. The objects in the array must belong to the same project, schema, and object type.

["sales_daily"]

string

No

The name of a single object for which permissions need to be checked.

sales_daily

Response elements

Element

Type

Description

Example

object

The API response, including the request ID and permission query results.

requestId

string

The request ID, which can be used to locate server-side call logs.

EFAB5AA9-394A-5B28-81FB-A32F03C4DD13

data

object

The object permission check results and the total number of results.

result

array<object>

The list of permission check results for the specified objects.

object

The permission check result for a single object.

objectType

string

The object type to be checked. Valid values: TABLE, FUNCTION, and RESOURCE.

TABLE

actionType

string

The operation to be checked. Valid values: SELECT and DESCRIBE.

SELECT

objectName

string

The name of the checked object.

sales_daily

isGranted

boolean

Indicates whether the caller has the permissions for the specified operation. A value of true indicates that the caller is authorized. A value of false indicates that the caller is not authorized.

true

totalCount

integer

The total number of results returned for this permission check.

1

pageNumber

integer

The page number of the results, which is fixed to 1.

1

pageSize

integer

The number of objects returned for this permission check.

1

Examples

Success response

JSON format

{
  "requestId": "EFAB5AA9-394A-5B28-81FB-A32F03C4DD13",
  "data": {
    "result": [
      {
        "objectType": "TABLE",
        "actionType": "SELECT",
        "objectName": "sales_daily",
        "isGranted": true
      }
    ],
    "totalCount": 1,
    "pageNumber": 1,
    "pageSize": 1
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.