ADD USER
Adds an Alibaba Cloud account, RAM user, or RAM role to a MaxCompute project.
Limitations
You can only add RAM users that belong to your own Alibaba Cloud account. RAM users from other Alibaba Cloud accounts cannot be added.
Run this statement on MaxCompute client or MaxCompute Studio.
Syntax
add user <user_name>;Parameters
| Parameter | Required | Description |
|---|---|---|
user_name | Yes | The identity to add. The format depends on the identity type — see the table below. |
user_name formats
MaxCompute supports three identity types. Use the format that matches the identity you are adding:
| Identity type | Format | Reference |
|---|---|---|
| Alibaba Cloud account | ALIYUN$<account_id> | |
| RAM user | RAM$<account_id>:<RAM_user_id> | |
| RAM role | `RAM$<account_id>:role/<role_name>` | Backticks are required |
To look up an existing user's name, run list users; on the MaxCompute client.
Examples
Add an Alibaba Cloud account
Add the Alibaba Cloud account test_user@aliyun.com (account ID: 5527xxxxxxxx5788) to the project:
add user ALIYUN$5527xxxxxxxx5788;Add a RAM user
Add the RAM user ram_test_user (user ID: 5527xxxxxxxx5788:2763xxxxxxxxxx1649) to the project:
add user RAM$5527xxxxxxxx5788:2763xxxxxxxxxx1649;Add a RAM role
Add the RAM role ram_role, which belongs to test_user@aliyun.com (account ID: 5527xxxxxxxx5788), to the project:
add user `RAM$5527xxxxxxxx5788:role/ram_role`;The backticks (`) surrounding the RAM role identifier are required.
Related statements
LIST USERS: View all users in the project.
REMOVE USER: Remove a user from the project.