A RAM user can use ROS to add a new user to DMS.
Create a RAM user and grant permissions
-
Create a RAM user.
-
Go to the Users page and click Create User.
-
Set Logon Name to
dms_testand for Access Mode, select Programmatic Access. -
Click OK. Record the UID of the RAM user.
-
-
Grant permissions to the RAM user.
-
Go to the Users page. In the Actions column of the target RAM user, click Add Permissions.
-
Search for the
AliyunDMSFullAccessandAliyunROSFullAccesspolicies.NoteThis example uses the AliyunDMSFullAccess policy, which grants permission to manage DMS resources.
In production, select only the required permissions or create custom fine-grained policies. For more information, see identity management.
-
Click Confirm to grant the permissions.
-
Procedure
-
Log on to the ROS console. In the top navigation bar, select a region from the region drop-down list.
-
In the left-side navigation pane, click Stacks. Then, choose .
-
Specify Template: Select Select an Existing Template.
-
Template Import Method: Select Enter Template Content.
-
-
In the Template Content section, select ROS and enter the following code.
This example includes only a few key parameters, such as Uid, UserName, and RoleNames. For a full list of template parameters, see ALIYUN::DMS::User.
-
Click Create to deploy the stack.
-
After the stack is created, go to the Stack Information and Outputs tabs to view the stack status and outputs.
-
After the stack is created, you can view the user in DMS using the DMS console, OpenAPI, or an SDK. For information about how to view users in the DMS console, see User management.
The created user dms_testuser appears in the user list with the Standard User and DBA roles.