CreateTenantRole
Creates a role in a specified MaxCompute tenant and optionally attaches a policy to the role.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:CreateTenantRole |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/tenants/roles/ HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| tenantId |
string |
No |
The ID of the MaxCompute tenant. If you do not specify this parameter, the tenant to which the current caller belongs is used. |
1234567890123456 |
| region |
string |
No |
The region ID. If you do not specify this parameter, the region of the current request is used. |
cn-hangzhou |
| body |
string |
No |
The JSON request body. The name field specifies the name of the new tenant role, and the policy field specifies an optional JSON string for the policy. |
{"name":"example_reader"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique ID of the API request. You can provide this ID to troubleshoot API call issues. |
0be3e0aa16667684362147582e038f |
| data |
string |
Returns success if the operation is successful. |
success |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"data": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.