After you attach tags to your Server Migration Center (SMC) resources, you can use the tags to categorize and control access to the resources. This topic describes how to use tags to control the permissions of Resource Access Management (RAM) users and Security Token Service (STS) roles so that different users can be granted different access and operation permissions on cloud resources.
Prerequisites
A RAM user is created by using your Alibaba Cloud account. For more information, see Create a RAM user.
Background information
Tags are used to identify and categorize cloud resources. RAM manages the access and operation permissions of RAM users on cloud resources based on permission policies. You can use tags as conditions in RAM policies to implement fine-grained access control on resources.
Scenarios
The scenarios in this topic are used to describe how to perform tag-based authentication.
- Scenario 1: You can create migration tasks only if the
smc:test
tag is attached to the tasks. - Scenario 2: You can modify, delete, and attach tags only to the resources to which
the
smc:test
tag is attached.
Step 1: Create a custom policy and attach the policy to the RAM user
In this step, a custom policy is created in the RAM console. You can also call the CreatePolicy operation to create a custom policy. For more information, see Configure the policy.Step 2: Check whether the policy is in effect
Tag-based authentication of requests to different API operations
API operation | Authentication description |
---|---|
CreateReplicationJob | You do not need to specify the resource ID in a request. The request is matched against
the acs:RequestTag policy condition.
|
ModifyReplicationJobAttribute | You must specify the resource ID in a request. The request is matched against the
acs:ResourceTag policy condition.
|
StartReplicationJob, StopReplicationJob, and DeleteSourceServer | You must specify the resource ID in a request. The request is matched against the
acs:ResourceTag policy condition.
|