This topic describes how to use Resource Orchestration Service ROS as a Resource Access Management (RAM) user to create an ApsaraDB for Redis Enhanced Edition (Tair) instance and create a database account on the instance.
Create a RAM user and grant permissions to the RAM user
If you have created a RAM user and granted permissions to the RAM user, you can skip this step.
To create a RAM user, perform the following steps:
Go to the Users page of the RAM console, and then click Create User.
Set Logon Name to redis-ros-test and Access Mode to OpenAPI Access.
Click OK. After the RAM user is created, save the AccessKey ID and AccessKey secret of the RAM user.
To grant permissions to the RAM user, perform the following steps:
Go to the Users page, find the RAM user that you created, and then click Add Permissions in the Actions column.
Search for
AliyunKvstore
in the Policy search box and select the AliyunKvstoreFullAccess policy.NoteIn this example, the AliyunKvstoreFullAccess policy is used for demonstration purposes. This policy grants full permissions to query and modify ApsaraDB for Redis instances.
In actual projects, you can select policies as needed or customize more fine-grained policies. For more information, see Identity management.
Click Grant permissions.
Procedure
Go to the Create Stack page in the ROS console.
In this example, a ROS template is added to the sample file. You can make the following configurations:
In the top navigation bar, select a region.
On the Create Stack page, enter a stack name.
Configure the following template parameters. Use the default values for other parameters. For more information about how to create a stack, see Use a ROS template to create a stack.
Select a zone, a virtual private cloud (VPC), and a vSwitch.
Enter the name of the account that you want to create and the account password.
Click Next.
The order information and estimated costs are displayed on the page. In this example, a pay-as-you-go Tair DRAM-based cluster instance is created. The instance has 2 GB of memory and contains two shards.
Confirm the order information and click Create.
When the status changes to Created on the Stack Information tab, the task is completed.
After the stack is created, click the Outputs tab to view the ID of the new instance and the account name.
You can call an API operation, use an SDK, or log on to the ApsaraDB for Redis console to view the newly created instance.
What to do next
For information about how to release a pay-as-you-go instance, see Release pay-as-you-go instances.