All Products
Search
Document Center

Server Load Balancer:RAM authorization

Last Updated:Aug 01, 2024
Resource Access Management (RAM) is a service provided by Alibaba Cloud to manage user identities and resource access permissions. You can use RAM to prevent RAM users from sharing the AccessKey pairs of your Alibaba Cloud account. You can also use RAM to grant minimum permissions to RAM users. RAM uses policies to define permissions.
This topic describes the elements, such as Action, Resource, and Condition, which are defined by ALB. You can use the elements to create policies in RAM. The code (RamCode) in RAM that is used to indicate ALB is alb. You can grant permissions on ALB at the RESOURCE.

General structure of a policy

Policies can be stored as JSON files. The following code provides an example on the general structure of a policy:
{
  "Version": "1",
  "Statement": [
    {
      "Effect": "<Effect>",
      "Action": "<Action>",
      "Resource": "<Resource>",
      "Condition": {
        "<Condition_operator>": {
          "<Condition_key>": [
            "<Condition_value>"
          ]
        }
      }
    }
  ]
}
The following list describes the fields in the policy:
  • Effect: specifies the authorization effect. Valid values: Allow, Deny.
  • Action: specifies one or more API operations that are allowed or denied. For more information, see the Action section of this topic.
  • Resource: specifies one or more resources to which the policy applies. You can use an Alibaba Cloud Resource Name (ARN) to specify a resource. For more information, see the Resource section of this topic.
  • Condition: specifies one or more conditions that are required for the policy to take effect. This is an optional field. For more information, see the Condition section of this topic.
    • Condition_operator: specifies the conditional operators. Different types of conditions support different conditional operators. For more information, see Policy elements.
    • Condition_key: specifies the condition keys.
    • Condition_value: specifies the condition values.

Action

ALB defines the values that you can use in the Action element of a policy statement. The following table describes the values.
  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • API operation: the API operation that you can call to perform the operation.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition key: the condition keys that are defined by the Alibaba Cloud service. The Condition key column does not list the common condition keys that are defined by Alibaba Cloud. For more information about the common condition keys, see Generic Condition Keyword.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
ActionsAPI operationAccess levelResource typeCondition keyAssociated operation
alb:DeleteServerGroupDeleteServerGroupdelete
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:AddEntriesToAclAddEntriesToAclcreate
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:LoadBalancerJoinSecurityGroupLoadBalancerJoinSecurityGroupnone
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:DisableDeletionProtectionDisableDeletionProtectionupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:UpdateLoadBalancerAttributeUpdateLoadBalancerAttributeupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListAclEntriesListAclEntriesget
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:ReplaceServersInServerGroupReplaceServersInServerGroupupdate
All Resources
*
NoneNone
alb:GetListenerAttributeGetListenerAttributeget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
acs:ResourceTag
None
alb:DissociateAdditionalCertificatesFromListenerDissociateAdditionalCertificatesFromListenerdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CreateServerGroupCreateServerGroupcreate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/*
alb:ServerGroupProtocol
None
alb:DeleteHealthCheckTemplatesDeleteHealthCheckTemplatesdelete
HealthCheckTemplate
acs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#HealthCheckTemplatesId}
NoneNone
alb:AssociateAdditionalCertificatesWithListenerAssociateAdditionalCertificatesWithListenercreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListServerGroupsListServerGroupsget
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/*
NoneNone
alb:UpdateSecurityPolicyAttributeUpdateSecurityPolicyAttributeupdate
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
NoneNone
alb:ListTagValuesListTagValueslist
All Resources
*
NoneNone
alb:DisableLoadBalancerAccessLogDisableLoadBalancerAccessLogupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CreateHealthCheckTemplateCreateHealthCheckTemplatecreate
HealthCheckTemplate
acs:alb:{#regionId}:{#accountId}:healthchecktemplate/*
NoneNone
alb:ListRulesListRulesget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:LoadBalancerLeaveSecurityGroupLoadBalancerLeaveSecurityGroupnone
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CreateSecurityPolicyCreateSecurityPolicycreate
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/*
NoneNone
alb:DetachCommonBandwidthPackageFromLoadBalancerDetachCommonBandwidthPackageFromLoadBalancerupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:CreateListenerCreateListenercreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
alb:ListenerProtocol
None
alb:UpdateLoadBalancerEditionUpdateLoadBalancerEditionupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:EnableDeletionProtectionEnableDeletionProtectionupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:AddServersToServerGroupAddServersToServerGroupcreate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Instance
acs:alb:{#regionId}:{#accountId}:ecs/{#InstanceId}
NetworkInterface
acs:alb:{#regionId}:{#accountId}:eni/{#NetworkInterfaceId}
ContainerGroup
acs:alb:{#regionId}:{#accountId}:eci/{#ContainerGroupId}
NoneNone
alb:DeleteSecurityPolicyDeleteSecurityPolicydelete
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
NoneNone
alb:DeleteListenerDeleteListenerdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:UpdateLoadBalancerAddressTypeConfigUpdateLoadBalancerAddressTypeConfigupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
alb:AddressType
None
alb:ListSecurityPolicyRelationsListSecurityPolicyRelationsget
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicy}
NoneNone
alb:CreateLoadBalancerCreateLoadBalancercreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/*
alb:AddressType
None
alb:ListListenerCertificatesListListenerCertificatesget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListSecurityPoliciesListSecurityPolicieslist
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/*
NoneNone
alb:UpdateListenerAttributeUpdateListenerAttributeupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:UpdateHealthCheckTemplateAttributeUpdateHealthCheckTemplateAttributeupdate
HealthCheckTemplate
acs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#healthchecktemplateId}
NoneNone
alb:UpdateServerGroupServersAttributeUpdateServerGroupServersAttributeupdate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Instance
acs:ecs:{#regionId}:{#accountId}:ecs/{#ecsId}
NoneNone
alb:UnTagResourcesUnTagResourcesdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#AclId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#SecurityPolicyId}
NoneNone
alb:DeleteRuleDeleteRuledelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
acs:ResourceTag
None
alb:MoveResourceGroupMoveResourceGroupupdate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:UpdateRulesAttributeUpdateRulesAttributeupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:ListServerGroupServersListServerGroupServersget
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:ListAclsListAclslist
Acl
acs:alb:{#regionId}:{#accountId}:acl/*
NoneNone
alb:GetListenerHealthStatusGetListenerHealthStatusget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CancelShiftLoadBalancerZonesCancelShiftLoadBalancerZones
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:DeleteAclDeleteAcldelete
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:AttachCommonBandwidthPackageToLoadBalancerAttachCommonBandwidthPackageToLoadBalancerupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:UpdateRuleAttributeUpdateRuleAttributeupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListTagResourcesListTagResourcesget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#securityPolicyId}
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:RemoveEntriesFromAclRemoveEntriesFromAcldelete
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:DeleteAScriptsDeleteAScriptsdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:StopListenerStopListenerupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListHealthCheckTemplatesListHealthCheckTemplateslist
HealthCheckTemplate
acs:alb:{#regionId}:{#accountId}:healthchecktemplate/*
NoneNone
alb:DeleteRulesDeleteRulesdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:UpdateListenerLogConfigUpdateListenerLogConfigupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:TagResourcesTagResourcescreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#AclId}
SecurityPolicy
acs:alb:{#regionId}:{#accountId}:securitypolicy/{#SecurityPolicyId}
NoneNone
alb:EnableLoadBalancerIpv6InternetEnableLoadBalancerIpv6Internetupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
alb:AddressType
None
alb:DisableLoadBalancerIpv6InternetDisableLoadBalancerIpv6Internetupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:UpdateServerGroupAttributeUpdateServerGroupAttributeupdate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:StartListenerStartListenerupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:AssociateAclsWithListenerAssociateAclsWithListenercreate
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListAScriptsListAScriptslist
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:CreateRuleCreateRulecreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:DissociateAclsFromListenerDissociateAclsFromListenerdelete
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ListLoadBalancersListLoadBalancersget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/*
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:UpdateLoadBalancerZonesUpdateLoadBalancerZonesupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CreateAScriptsCreateAScriptscreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:RemoveServersFromServerGroupRemoveServersFromServerGroupupdate
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Instance
acs:alb:{#regionId}:{#accountId}:ecs/{#InstanceId}
NetworkInterface
acs:alb:{#regionId}:{#accountId}:eni/{#NetworkInterfaceId}
ContainerGroup
acs:alb:{#regionId}:{#accountId}:eci/{#ContainerGroupId}
NoneNone
alb:CreateRulesCreateRulescreate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
NoneNone
alb:UpdateAScriptsUpdateAScriptsupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone
alb:ListAsynJobsListAsynJobsget
All Resources
*
NoneNone
alb:UpdateAclAttributeUpdateAclAttributeupdate
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#aclId}
NoneNone
alb:GetHealthCheckTemplateAttributeGetHealthCheckTemplateAttributeget
HealthCheckTemplate
acs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#healthchecktemplateId}
NoneNone
alb:ListAclRelationsListAclRelationsget
Acl
acs:alb:{#regionId}:{#accountId}:acl/{#AclId}
NoneNone
alb:ListTagKeysListTagKeysget
All Resources
*
NoneNone
alb:ListListenersListListenersget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:DeleteLoadBalancerDeleteLoadBalancerdelete
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:CreateAclCreateAclcreate
Acl
acs:alb:{#regionId}:{#accountId}:acl/*
NoneNone
alb:EnableLoadBalancerAccessLogEnableLoadBalancerAccessLogupdate
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:ApplyHealthCheckTemplateToServerGroupApplyHealthCheckTemplateToServerGroupupdate
All Resources
*
NoneNone
alb:GetLoadBalancerAttributeGetLoadBalancerAttributeget
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
NoneNone
alb:StartShiftLoadBalancerZonesStartShiftLoadBalancerZones
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
NoneNone

Resource

ALB defines the values that you can use in the Resource. You can attach the policy to a RAM user or a RAM role so that the RAM user or the RAM role can perform a specific operation on a specific resource. The ARN is the unique identifier of the resource on Alibaba Cloud. Take note of the following items:
  • {#}indicates a variable. {#} must be replaced with an actual value. For example, {#ramcode} must be replaced with the actual code of an Alibaba Cloud service in RAM.
  • An asterisk (*) is used as a wildcard. Examples:
    • {#resourceType} is set to *, all resources are specified.
    • {#regionId} is set to *, all regions are specified.
    • {#accountId} is set to *, all Alibaba Cloud accounts are specified.
Resource typeARN
LoadBalanceracs:slb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
ServerGroupacs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Aclacs:alb:{#regionId}:{#accountId}:acl/{#AclId}
LoadBalanceracs:alb:{#regionId}:{#accountId}:loadbalancer/*
Aclacs:alb:{#regionId}:{#accountId}:acl/{#aclId}
LoadBalanceracs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroupacs:alb:{#regionId}:{#accountId}:servergroup/{#ServerGroupId}
NetworkInterfaceacs:alb:{#regionId}:{#accountId}:eni/{#NetworkInterfaceId}
Instanceacs:alb:{#regionId}:{#accountId}:ecs/{#InstanceId}
ContainerGroupacs:alb:{#regionId}:{#accountId}:eci/{#ContainerGroupId}
LoadBalanceracs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
ServerGroupacs:alb:{#regionId}:{#accountId}:servergroup/*
HealthCheckTemplateacs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#HealthCheckTemplatesId}
SecurityPolicyacs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicyId}
SecurityPolicyacs:alb:{#regionId}:{#accountId}:securitypolicy/*
Aclacs:alb:{#regionId}:{#accountId}:acl/*
HealthCheckTemplateacs:alb:{#regionId}:{#accountId}:healthchecktemplate/*
SecurityPolicyacs:alb:{#regionId}:{#accountId}:securitypolicy/{#securitypolicy}
HealthCheckTemplateacs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#healthchecktemplateId}
Instanceacs:ecs:{#regionId}:{#accountId}:ecs/{#ecsId}
SecurityPolicyacs:alb:{#regionId}:{#accountId}:securitypolicy/{#SecurityPolicyId}
SecurityPolicyacs:alb:{#regionId}:{#accountId}:securitypolicy/{#securityPolicyId}
HealthCheckTemplateacs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#HealthCheckTemplateId}
Listeneracs:alb:{#regionId}:{#accountId}:listener/{#ListenerId}
Ruleacs:alb:{#regionId}:{#accountId}:rule/{#RuleId}
HealthCheckTemplateacs:alb:{#regionId}:{#accountId}:healthchecktemplate/{#healthCheckTemplateId}
ServerGroupacs:alb:{#regionId}:{#accountId}:servergroup/{#serverGroupId}

Condition

ALB defines the values that you can use in the Condition element of a policy statement. The following table describes the values. The following table describes the service-specific condition keys. The common condition keys that are defined by Alibaba Cloud also apply to ALB. For more information about the common condition keys, see Generic Condition Keyword.
The data type determines the conditional operators that you can use to compare the value in a request with the value in a policy statement. You must use conditional operators that are supported by the data type. Otherwise, you cannot compare the value in the request with the value in the policy statement. In this case, the authorization is invalid. For more information about the conditional operators that are supported by each data type, see Policy elements.
Condition keyDescriptionData type
alb:AddressTypeThe address type of Application Load BalancerString
alb:ListenerProtocolThe listening protocol type of Application Load BalancerString
alb:ServerGroupProtocolThe server group protocol type of Application Load BalancerString

What to do next

You can create a custom policy and attach the policy to a RAM user, RAM user group, or RAM role. For more information, see the following topics: