ApplyResourceAccessPermission
Submits an application for access permissions to specific resources.
Operation description
Request description
Reason: The reason for the application. This parameter is required.
ApplyContents: The list of resource permission applications. Each item includes the resource description (Resource), grantee description (Grantee), access types (AccessTypes), and expiration time (ExpirationTime). The maximum number of items per request is 400.
Resource: The resource description. You must specify the ResourceSchema.name and version on which resource parsing depends, as well as the resource metadata (MetaData).
Grantee: The grantee description. You must specify the principal type (PrincipalType) and principal ID (PrincipalId).
AccessTypes: The list of permission types. Multiple permission combinations are supported.
ExpirationTime: The expiration time of the permissions, provided as a millisecond timestamp.
AuthMethod: The authorization method. This parameter is optional. By default, the built-in default authorization method is used.
ClientToken: The client token used to prevent duplicate requests. This parameter is optional.
Make sure that all required fields are correctly filled in and meet the corresponding constraints. For example, the DefVersion and MetaData in Resource must match the selected DefSchema.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ApplyResourceAccessPermission |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Reason |
string |
Yes |
The reason for the application. |
Business development requirements |
| ApplyContents |
array<object> |
Yes |
The list of resource permission applications. |
|
|
array<object> |
No |
|||
| Resource |
object |
No |
The resource description. |
|
| DefSchema |
string |
Yes |
The resource type. Note: The resource types supported by the system are constrained by ResourceSchema.name. Appendix: ResourceSchema documentation Valid values:
|
MaxCompute |
| DefVersion |
string |
No |
The resource parsing version is constrained by ResourceSchema.version. |
v1.0.0 |
| MetaData |
object |
No |
The resource metadata declaration. Note: The metadata is constrained by ResourceSchema.resources. A valid resource declaration must include metadata for the full resource path from level 0 through the validLeaf level. Appendix: ResourceSchema documentation |
{"workspace": "449656", "project": "sync_destination", "table": "order_table", "threeTierModel": false} |
|
any |
No |
Declares specific resources in the Map<String,Object> format, which must comply with the resource constraints of the specific resource type in ResourceSchema. Note:
|
{ "workspace": "449656", "project": "sync_destination", "table": "order_table", "threeTierModel": false } |
|
| Grantee |
object |
Yes |
The grantee description. Note: The principal types supported by the system are constrained by ResourceSchema.authPrincipal. Appendix: ResourceSchema documentation |
|
| PrincipalType |
string |
Yes |
The principal type. Valid values:
Valid values:
|
RamRole |
| PrincipalId |
string |
Yes |
The principal ID. The mapped IDs have different semantics for different principal types:
|
ROLE_32237475848545 |
| AccessTypes |
array |
Yes |
The list of requested permissions. Note: The types of permissions that can be applied for vary across resources at different levels. All are constrained by ResourceSchema.isValidLeaf, accessTypeRestrictions, and authMethodAccessTypes. Appendix: ResourceSchema documentation |
|
|
string |
No |
The resource permission. |
select |
|
| ExpirationTime |
integer |
No |
The expiration time of the permissions, specified as a millisecond timestamp. |
1785835708000 |
| AuthMethod |
string |
No |
The authorization method. Currently, only SEVERLESS_STARROCKS supports specifying the authorization method: ranger and starrocksManager. Note: The authorization methods supported vary across resources. All are constrained by ResourceSchema.authMethods. Appendix: ResourceSchema documentation Valid values:
|
ranger |
| ClientToken |
string |
No |
The idempotency token used to prevent duplicate operations caused by multiple calls. |
ABFUOEUOTRTRJKE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| RequestId |
string |
The request ID. Used to locate logs and troubleshoot issues. |
0bc5df3a17***903790e8e8a |
| Data |
array |
The list of application IDs. |
|
|
string |
The application or approval process ID. |
332066440109224007 |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17***903790e8e8a",
"Data": [
"332066440109224007"
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.