Authorize RAM users for the Data Subscription SDK
Data Transmission Service (DTS) integrates with Resource Access Management (RAM). You can use a RAM user to create and manage DTS tasks. You can also use the RAM user's AccessKey ID and AccessKey Secret to track data changes in real time.
Prerequisites
The RAM user must have permissions to access cloud resources under your Alibaba Cloud account, such as ApsaraDB RDS and ECS instances. This allows DTS to retrieve related resource information when you configure a DTS task. For more information, see Authorize DTS to access cloud resources.
Supported policies
DTS provides a read-write policy and a read-only policy.
-
Read-write policy: AliyunDTSFullAccess.
This policy grants all read and write permissions on DTS. A RAM user with this policy can purchase, configure, and manage DTS instances.
ts all read and write permissions on DTS. A RAM user with this policy can purchase, configure, and manage DTS instances. -
Read-only policy: AliyunDTSReadOnlyAccess. This policy grants all read permissions on DTS. A RAM user with this policy can view details and configurations of all DTS tasks under the Alibaba Cloud account, but cannot perform change operations.
he Alibaba Cloud account, but cannot perform change operations.NoteChange operations include purchasing, configuring, and managing DTS instances.
NoteChange operations include purchasing, configuring, and managing DTS instances.
Procedure
-
Log on to the RAM console with your Alibaba Cloud account.
e with your Alibaba Cloud account. -
Create a RAM user.
For more information, see Create a RAM user.
ntrol_ozh_hzf_py1">Permanent AccessKey.Note-
When you create the RAM user, set Access Mode to Permanent AccessKey.
-
After you create the RAM user, save their AccessKey ID and AccessKey Secret.
-
-
After you create the RAM user, save their AccessKey ID and AccessKey Secret.
ID and AccessKey Secret. -
In the left-side navigation pane, choose .
iew.Card.IdentityAuth.User">. -
On the User page, find the target RAM user and click Add Permissions in the Operation column.
t resource groups. For more information, see Cloud services that support resource groups. For an example of resource group authorization, see Use resource groups to restrict a RAM user to manage specified ECS instances. -
From the Select Policy drop-down list, select System Policy.
b> drop-down list, select System Policy. -
In the search box, enter dts to find DTS-related system policies.
o find DTS-related system policies. -
Click the AliyunDTSFullAccess policy to add it to the Selected list on the right.
comment data-tag="draftComment" id="b3f96c8f05h0x">Selected Policy
Click Cancel to grant the permissions.
For more information, see Manage the permissions of a RAM user.
Data subscription with a RAM user
After you create a RAM user and grant it permissions, you can use the DTS SDKs to track data changes. For more information about how to use the SDKs, see Use an SDK to consume tracked data and Use an SDK to consume tracked data from a PolarDB-X 1.0 instance.
If you use an SDK to consume tracked data from a PolarDB-X 1.0 instance, you must replace the AccessKey ID and AccessKey Secret in the SDK demo with the RAM user's AccessKey ID and AccessKey Secret.