All Products
Search
Document Center

MaxCompute:ADD USER

Last Updated:Jul 18, 2023

Adds an Alibaba Cloud account or a RAM user to a MaxCompute project.

Limits

  • MaxCompute allows you to add only the RAM users that belong to your Alibaba Cloud account to a project. It does not allow you to add RAM users that belong to other Alibaba Cloud accounts.

  • You can execute the statements that are described in this topic on the following platforms:

Syntax

add user <user_name>;

Parameters

Parameter

Required

Description

user_name

Yes

The name of the Alibaba Cloud account or RAM user that you want to add. The name must meet the following format requirements:

You can run the list users; command on the MaxCompute client to query the name of the user.

Examples

  • Example 1: Add the Alibaba Cloud account test_user@aliyun.com to a MaxCompute project. The ID of the Alibaba Cloud account is 5527xxxxxxxx5788.

    add user ALIYUN$5527xxxxxxxx5788;
  • Example 2: Add the RAM user ram_test_user to a MaxCompute project. The ID of the RAM user is 5527xxxxxxxx5788:2763xxxxxxxxxx1649.

    add user RAM$5527xxxxxxxx5788:2763xxxxxxxxxx1649;
  • Example 1: Add the RAM role ram_role that is assigned to the Alibaba Cloud account test_user@aliyun.com to a MaxCompute project. The ID of the Alibaba Cloud account is 5527xxxxxxxx5788.

    add user `RAM$5527xxxxxxxx5788:role/ram_role`;
    Important

    The grave accents (`) in the preceding command are required.

Related statements

  • LIST USERS: displays the information about users in a MaxCompute project.

  • REMOVE USER: removes a user from a project if the user leaves the MaxCompute project team.