Use Resource Access Management (RAM) to grant RAM users scoped access to Classic Load Balancer (CLB) instances. Attach system policies for broad access or create custom policies to restrict access to specific instances or operations.
Before you begin
-
CLB provides the following system policies for common access patterns:
AliyunSLBFullAccess: grants full management permissions on CLB instances.
AliyunSLBReadOnlyAccess: grants read-only access to CLB instances.
If these system policies do not meet your requirements, create a custom policy. See the policy examples in this topic for common scenarios.
Review the CLB permissions reference before creating custom policies. For more information, see Authorize a RAM user.
Grant CLB permissions to a RAM user
-
Create a RAM user.
For more information, see Create a RAM user.
-
Create a custom policy.
For more information, see Create custom policies and Policy examples.
-
Attach the policy to the RAM user.
For more information, see Grant permissions to RAM users.
Policy examples
-
Example 1: Grant a RAM user management access to two specific CLB instances.
The following policy grants full management access to CLB instances
lb-abcdxxxx001andlb-abcdxxxx002, while allowing the RAM user to view all CLB instances in the console.{ "Statement": [ { "Effect": "Allow", "Action": "slb:*", "Resource": [ "acs:slb:*:*:loadbalancer/lb-abcdxxxx001", "acs:slb:*:*:loadbalancer/lb-abcdxxxx002" ] }, { "Effect": "Allow", "Action": "slb:Describe*", "Resource": "*" } ], "Version": "1" }NoteThe RAM user can view all CLB instances in the console but can only manage
lb-abcdxxxx001andlb-abcdxxxx002.The
Describe*statement is required. Without it, the RAM user cannot view instances in the CLB console — though they can still call API operations or use a CLI or SDK to manage the two specified CLB instances.
-
Example 2: Grant a RAM user permission to add a specific Elastic Compute Service (ECS) instance as a backend server of CLB instance
slb-001. The ECS instance ID islb-abcdxxxx001.{ "Statement": [ { "Effect": "Allow", "Action": "slb:AddBackendServers", "Resource": ["acs:slb:*:*:loadbalancer/slb-001"] }, { "Effect": "Allow", "Action": "slb:AddBackendServers", "Resource": ["acs:ecs:*:*:instance/lb-abcdxxxx001"] }, { "Effect": "Allow", "Action": "slb:DescribeLoadBalancers", "Resource": "acs:slb:*:*:loadbalancer/*" } ], "Version": "1" }NoteTo add or remove ECS instances or configure instance weights, the RAM user needs both of the following permissions:
Permissions on CLB instances
Permissions on ECS instances
-
Example 3: Grant a RAM user permission to perform ECS-related operations on specific CLB instances.
{ "Statement": [{ "Effect": "Allow", "Action": "slb:*", "Resource": [ "acs:slb:*:*:loadbalancer/lb-abcdxxxx001", "acs:slb:*:*:loadbalancer/lb-abcdxxxx002" ] }, { "Effect": "Allow", "Action": "slb:Describe*", "Resource": "*" }, { "Effect": "Allow", "Action": "ecs:DescribeInstances", "Resource": "*" }, { "Effect": "Allow", "Action": "slb:*", "Resource": [ "acs:ecs:*:*:instance/i-instance001", "acs:ecs:*:*:instance/i-instance002" ] } ], "Version": "1" }NoteThis policy grants the RAM user management access to CLB instances
lb-abcdxxxx001andabcdxxxx002and allows the RAM user to perform all ECS-related operations on those instances — for example, adding ECS instancesi-instance001andi-instance002as backend servers and configuring their weights. The RAM user can also view the ECS instance list when selecting backend servers.