RAM authorization

Updated at:
Copy as MD

Resource Access Management (RAM) is a service provided by Alibaba Cloud to manage user identities and resource access permissions. Using RAM helps you avoid sharing your Alibaba Cloud account keys with other users and allows you to grant users the least privilege access. RAM uses permission policies to define authorizations. This topic describes the actions, resources, and conditions that Egress Proxy Gateway defines for RAM permission policies. The RamCode of Egress Proxy Gateway is epg , and the supported authorization granularity is RESOURCE . For the resource authorization scope of each action, see the Action table.

General structure of a policy

Permission policies support the JSON format. The following example shows the structure of a policy that uses the Action element. Values in angle brackets (<>) are placeholders. Replace them with actual values.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "<Effect>",
      "Action": "<Action>",
      "Resource": "<Resource>",
      "Condition": {
        "<Condition_operator>": {
          "<Condition_key>": [
            "<Condition_value>"
          ]
        }
      }
    }
  ]
}        

The following list describes the fields and placeholders in the policy:

  • Effect: Specifies the authorization result. Valid values: Allow and Deny.

  • Action: Specifies one or more operations that are allowed or denied.

  • Resource: Specifies the specific objects affected by the operations. You can use Alibaba Cloud Resource Names (ARNs) to describe specific resources.

  • Condition: Specifies the conditions for the authorization to take effect. This field is optional.

  • Condition operator: Specifies the conditional operators. Different types of conditions support different conditional operators.

  • Condition_key: Specifies the condition keys.

  • Condition_value: Specifies the condition values.

Action

The following table lists the RAM actions defined by Egress Proxy Gateway. These actions can be used in the Action element of RAM permission policies.

  • Action: A specific RAM permission point. In most cases, it has the same name as the corresponding OpenAPI.

  • OpenAPI: The OpenAPI associated with the RAM action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding ARN in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The product-level condition keys supported by the action. Common condition keys are not included. For more information, see Common condition keys.

  • Dependent action: Other action permissions required to perform the action.

Action

OpenAPI

Access level

Resource type

Condition key

Dependent action

epg:CreateEgressProxyRuleGroup CreateEgressProxyRuleGroup create

*All Resource

*

None None
epg:RemoveIpAddressesFromEgressProxyIpPool RemoveIpAddressesFromEgressProxyIpPool update

*All Resource

*

None None
epg:AddIpAddressesToEgressProxyIpPool AddIpAddressesToEgressProxyIpPool update

*All Resource

*

None None
epg:ListEgressProxyIpPools ListEgressProxyIpPools list

EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/*

EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

EgressProxyGateway

acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}

None None
epg:UpdateEgressProxyIpPoolAttribute UpdateEgressProxyIpPoolAttribute update

*EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

None None
epg:AttachEgressProxyRuleGroupsToConfiguration AttachEgressProxyRuleGroupsToConfiguration create

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:ListEgressProxyGateways ListEgressProxyGateways list

*All Resource

*

None None
epg:DeleteEgressProxyRuleGroup DeleteEgressProxyRuleGroup delete

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:DeleteEgressProxyIpPool DeleteEgressProxyIpPool delete

*EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

None None
epg:UpdateEgressProxyRulesAttribute UpdateEgressProxyRulesAttribute update

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

*EgressProxyRule

acs:epg:{#regionId}:{#accountId}:egressproxyrule/{#EgressProxyRuleId}

None None
epg:DeleteEgressProxyRules DeleteEgressProxyRules delete

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

*EgressProxyRule

acs:epg:{#regionId}:{#accountId}:egressproxyrule/{#EgressProxyRuleId}

None None
epg:UntagResources UntagResources update

*All Resource

*

None None
epg:DeleteEgressProxyGateway DeleteEgressProxyGateway delete

*EgressProxyGateway

acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}

None None
epg:ListTagResources ListTagResources list

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

*EgressProxyGateway

acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}

*EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:ListEgressProxyConfigurations ListEgressProxyConfigurations list

EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/*

EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

None None
epg:CreateEgressProxyIpPool CreateEgressProxyIpPool create

*All Resource

*

None None
epg:GetEgressProxyRuleGroupAttribute GetEgressProxyRuleGroupAttribute get

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:DetachEgressProxyRuleGroupsFromConfiguration DetachEgressProxyRuleGroupsFromConfiguration delete

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:CreateEgressProxyConfiguration CreateEgressProxyConfiguration create

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/*

None None
epg:UpdateEgressProxyRuleGroupAttribute UpdateEgressProxyRuleGroupAttribute update

*All Resource

*

None None
epg:GetEgressProxyIpPoolAttribute GetEgressProxyIpPoolAttribute get

*EgressProxyIpPool

acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}

None None
epg:DeleteEgressProxyConfiguration DeleteEgressProxyConfiguration delete

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

None None
epg:UpdateEgressProxyGatewayAttribute UpdateEgressProxyGatewayAttribute update

*All Resource

*

None None
epg:UpdateEgressProxyConfigurationAttribute UpdateEgressProxyConfigurationAttribute update

*All Resource

*

None None
epg:GetEgressProxyGatewayAttribute GetEgressProxyGatewayAttribute get

*EgressProxyGateway

acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}

None None
epg:CreateEgressProxyRules CreateEgressProxyRules create

*EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

*EgressProxyRule

acs:epg:{#regionId}:{#accountId}:egressproxyrule/*

None None
epg:ListEgressProxyRuleGroups ListEgressProxyRuleGroups list

EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/*

EgressProxyRuleGroup

acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}

None None
epg:TagResources TagResources update

*All Resource

*

None None
epg:MoveResourceGroup MoveResourceGroup update

*All Resource

*

None None
epg:GetEgressProxyConfigurationAttribute GetEgressProxyConfigurationAttribute get

*EgressProxyConfiguration

acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}

None None
epg:CreateEgressProxyGateway CreateEgressProxyGateway create

*All Resource

*

None None

Resource

The following table lists the resource types and ARN formats defined by Egress Proxy Gateway. The Resource element of RAM policy statements specifies the resources to which the statement applies. Notes:

  • {#} in an ARN is a variable placeholder. Replace it with the actual value. For example, replace {#ramcode} with the actual RAM code of the cloud service.

  • * in an ARN indicates all. For example:

    • {#resourceType} set to *: all resources.

    • {#regionId} set to *: all regions.

    • {#accountId} set to *: all Alibaba Cloud accounts.

Resource type

ARN

EgressProxyRuleGroup
  • acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/*
  • acs:epg:{#regionId}:{#accountId}:egressproxyrulegroup/{#EgressProxyRuleGroupId}
EgressProxyRule
  • acs:epg:{#regionId}:{#accountId}:egressproxyrule/*
  • acs:epg:{#regionId}:{#accountId}:egressproxyrule/{#EgressProxyRuleId}
EgressProxyIpPool
  • acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#EgressProxyIpPoolId}
  • acs:epg:{#regionId}:{#accountId}:egressproxyippool/*
  • acs:epg:{#regionId}:{#accountId}:egressproxyippool/{#DefaultEgressProxyIpPoolId}
EipAddress
  • acs:vpc:{#regionId}:{#accountId}:eip/{#EipAllocationId}
EgressProxyGateway
  • acs:epg:{#regionId}:{#accountId}:egressproxygateway/{#EgressProxyGatewayId}
  • acs:epg:{#regionId}:{#accountId}:egressproxygateway/*
EgressProxyConfiguration
  • acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationId}
  • acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/{#EgressProxyConfigurationIds}
  • acs:epg:{#regionId}:{#accountId}:egressproxyconfiguration/*
Vpc
  • acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
VSwitch
  • acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}
Certificate
  • acs:yundun-cert:{#regionId}:{#accountId}:*

Condition

Egress Proxy Gateway does not define product-level condition keys. However, you can use Alibaba Cloud common condition keys for access control. For more information, see Common condition keys.

References

For information about conditional operators, custom policies, and authorization operations, see the following documents: