Grants operation permissions on resources to DLF users or roles in batches.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dlf:BatchGrantPermissions |
update |
*All Resource
|
None | None |
Request syntax
POST /api/metastore/auth/permissions/batchgrant HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Body |
object |
No |
The HTTP request body. The content is in JSON format. |
|
| Type |
string |
Yes |
The type of authorization. Only Hive is supported. Valid values:
|
Hive |
| GrantRevokeEntries |
array |
No |
The list of authorizations to be granted. |
|
| GrantRevokeEntry |
No |
The details of the authorization entry. |
||
| CatalogId |
string |
No |
The ID of the catalog. |
1344371 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| Code |
string |
The description of the status code. |
OK |
| Message |
string |
The returned message. |
. |
| RequestId |
string |
The ID of the request. |
B7F4B621-E41E-4C84-B97F-42B5380A32BB |
| Success |
boolean |
Indicates whether the call is successful. Valid values:
|
true |
| BatchGrantRevokeFailureResult |
BatchGrantRevokeFailureResult |
The result when a batch authorization error occurs. |
Refer to the BatchGrantRevokeFailureResult structure |
Examples
Success response
JSON format
{
"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": "CRW-7A1EC3D73BF419AF"
},
"ErrorDetail": {
"Code": "401",
"Message": "auth failed"
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.