All Products
Search
Document Center

:BatchGrantPermissions

Last Updated:Nov 15, 2024

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

There is currently no authorization information disclosed in the API.

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
BodyobjectNo
CatalogIdstringNo

catalogId

1344371

Response parameters

ParameterTypeDescriptionExample
object

Response Object

Codestring

Response Code

OK
Messagestring

Message

.
RequestIdstring

RequestId

B7F4B621-E41E-4C84-B97F-42B5380A32BB
Successboolean

Success

true
BatchGrantRevokeFailureResultBatchGrantRevokeFailureResult

result

Examples

Sample success responses

JSONformat

{
  "Code": "OK",
  "Message": ".",
  "RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
  "Success": true,
  "BatchGrantRevokeFailureResult": [
    {
      "GrantRevokeEntry": {
        "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."
        ],
        "Principal": {
          "PrincipalArn": "acs:ram::[AliyunAccountId]:user/username_abc"
        },
        "Id": ""
      },
      "ErrorDetail": {
        "Code": "401",
        "Message": "auth failed"
      }
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history