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 Alibaba Cloud Billing API defines for RAM permission policies. The RamCode of Alibaba Cloud Billing API is bss,bssapi,efc , and the supported authorization granularity is OPERATION . 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 Alibaba Cloud Billing API. 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: Write, Read, List, or Other.

  • Resource type: The types of resources for which the action supports authorization. Details are as follows:

    • Required resource types are prefixed with an asterisk (*). Specify the corresponding ARN in the Resource element of the policy.

    • When 'All Resources' is displayed and the resource ARN is *, set Resource in the policy to *.

  • 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

bss:AllocateCostUnitResource AllocateCostUnitResource update

*All Resource

*

None None
bss:DeleteCostUnit DeleteCostUnit delete

*All Resource

*

None None
bss:DescribeInstances QueryResourcePackageInstances get

*All Resource

*

None None
bss:DescribeAcccount QueryAccountBalance get

*All Resource

*

None None
bss:QueryCostUnit QueryCostUnit get

*All Resource

*

None None
bss:DescribeOrderDetail GetOrderDetail get

*All Resource

*

None None
bss:QueryCustomerInvoiceInfo QueryInvoicingCustomerList get

*All Resource

*

None None
bss:ModifyInstance ModifyInstance update

*All Resource

*

None None
bss:ModifyInstance RenewInstance create

*All Resource

*

None None
bss:QueryResellerAvailableQuota QueryResellerAvailableQuota get

*All Resource

*

None None
bss:CreateCostUnit CreateCostUnit update

*All Resource

*

None None
bss:ModifyCostUnit ModifyCostUnit update

*All Resource

*

None None
bss:CreateResellerUserQuota CreateResellerUserQuota create

*All Resource

*

None None
bss:ReleaseInstance ReleaseInstance

*All Resource

*

None None
bss:ModifyInstance CreateInstance create

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:SavingsPlansAnalysis DescribeSavingsPlansCoverageDetail get

*All Resource

*

None None
bss:DescribeSubscribeToOSS QueryBillToOSSSubscription get

*All Resource

*

None None
bss:DescribeCostBudgetsSummary DescribeCostBudgetsSummary get

*All Resource

*

None None
bss:SavingsPlansAnalysis DescribeSavingsPlansCoverageTotal get

*All Resource

*

None None
bss:SetResellerUserAlarmThreshold SetResellerUserAlarmThreshold update

*All Resource

*

None None
bss:DescribeGaapBill QueryInstanceGaapCost get

*All Resource

*

None None
bss:SavingsPlansAnalysis DescribeSavingsPlansUsageDetail get

*All Resource

*

None None
bss:DescribeInstances QueryAvailableInstances get

*All Resource

*

None None
bss:QueryEvaluate QueryEvaluateList get

*All Resource

*

None None
bss:GetCustomerAccountInfo GetCustomerAccountInfo get

*All Resource

*

None None
bss:ModifySubscribeToOSS SubscribeBillToOSS create

*All Resource

*

None None
bss:ChangeResellerConsumeAmount ChangeResellerConsumeAmount update

*All Resource

*

None None
bss:QueryRiUtilizationDetail QueryRIUtilizationDetail get

*All Resource

*

None None
bss:ReleaseExpiredPrepaidInstance ReleaseExpiredPrepaidInstance update

*All Resource

*

None None
bss:ModifyPrepaidInstanceAutoRenew SetAllExpirationDay update

*All Resource

*

None None
bss:DescribePricingModule DescribePricingModule get

*All Resource

*

None None
bss:DescribeOrderList QueryOrders get

*All Resource

*

None None
bss:CreateResourcePackage UpgradeResourcePackage update

*All Resource

*

None None
bss:QueryCostUnitResource QueryCostUnitResource get

*All Resource

*

None None
bss:DescribeProduct QuerySkuPriceList get

*All Resource

*

None None
bss:DescribeBillList QueryBillOverview get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:DescribeCoupons QueryCashCoupons get

*All Resource

*

None None
bss:DescribeAcccountTran QueryAccountTransactions get

*All Resource

*

None None
bss:DescribeProduct QueryCommodityList get

*All Resource

*

None None
bss:QueryResellerUserAlarmThreshold QueryResellerUserAlarmThreshold get

*All Resource

*

None None
bss:DescribeBillList QueryInstanceBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:SetResellerUserQuota SetResellerUserQuota update

*All Resource

*

None None
bss:RefundQueryRemainAmount InquiryPriceRefundInstance get

*All Resource

*

None None
bss:SetResellerUserStatus SetResellerUserStatus update

*All Resource

*

None None
bss:DescribePrice GetSubscriptionPrice get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:CreateResourcePackage RenewResourcePackage update

*All Resource

*

None None
bss:RenewChangeInstance RenewChangeInstance none

*All Resource

*

None None
bss:CancelOrder CancelOrder update

*All Resource

*

None None
bss:DescribePrice GetPayAsYouGoPrice get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:DescrbePrepaidCards QueryPrepaidCards get

*All Resource

*

None None
bss:ApplyInvoice ApplyInvoice create

*All Resource

*

None None
bss:ModifyPrepaidInstanceAutoRenew SetRenewal update

*All Resource

*

None None
bss:QueryAccountBill QueryAccountBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bss:QueryCustomerAddress QueryCustomerAddressList get

*All Resource

*

None None
bss:FrDeductLogQueryRequest QueryDPUtilizationDetail get

*All Resource

*

None None
bss:QueryProductList QueryProductList get

*All Resource

*

None None
bss:RefundBatchRemainRefund RefundInstance update

*All Resource

*

None None
bss:ModifySubscribeToOSS UnsubscribeBillToOSS

*All Resource

*

None None
bss:DescribePrice GetResourcePackagePrice get

*All Resource

*

None None
bss:ConvertChargeType ConvertChargeType create

*All Resource

*

None None
bss:GetCustomerList GetCustomerList get

*All Resource

*

None None
bss:DescribeBillList QueryBill get

*All Resource

*

None None
bss:DescribeProduct QueryPriceEntityList get

*All Resource

*

None None
bss:DescribeProduct DescribeResourcePackageProduct get

*All Resource

*

None None
bss:SavingsPlansAnalysis DescribeSavingsPlansUsageTotal get

*All Resource

*

None None
bssapi:QuerySavingsPlansInstance QuerySavingsPlansInstance get

*All Resource

*

None None
bssapi:QuerySplitItemBill QuerySplitItemBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bssapi:DescribeCostBill DescribeProductAmortizedCostByAmortizationPeriod get

*All Resource

*

None None
bssapi:CreateAgAccount CreateAgAccount create

*All Resource

*

None None
bssapi:DescribeResourceCoverageTotal DescribeResourceCoverageTotal get

*All Resource

*

None None
bssapi:QueryRedeem QueryRedeem get

*All Resource

*

None None
bssapi:DescribeCostBill DescribeInstanceAmortizedCostByConsumePeriod get

*All Resource

*

None None
bssapi:QueryAccountTransactionDetails QueryAccountTransactionDetails get

*All Resource

*

None None
bssapi:DescribeCostBill DescribeInstanceAmortizedCostByAmortizationPeriod get

*All Resource

*

None None
bssapi:DescribeResourceCoverageDetail DescribeResourceCoverageDetail get

*All Resource

*

None None
bssapi:DescribeInstanceBill DescribeInstanceBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductCode

bssapi:ProductType

bssapi:ProductType

None
bssapi:QueryFinancialAccountInfo QueryFinancialAccountInfo get

*All Resource

*

None None
bssapi:QueryInstanceByTag QueryInstanceByTag get

*All Resource

*

None None
bssapi:QuerySavingsPlansDiscount QuerySavingsPlansDiscount get

*All Resource

*

None None
bssapi:DescribeResourceUsageDetail DescribeResourceUsageDetail get

*All Resource

*

None None
bssapi:DescribeResourceUsageTotal DescribeResourceUsageTotal get

*All Resource

*

None None
bssapi:DescribeCostBill DescribeProductAmortizedCostByConsumePeriod get

*All Resource

*

None None
bssapi:QueryRelationList QueryRelationList get

*All Resource

*

None None
bssapi:TagResources TagResources

*All Resource

*

None None
bssapi:QuerySettleBill QuerySettleBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bssapi:QueryPermissionList QueryPermissionList get

*All Resource

*

None None
bssapi:UntagResources UntagResources

*All Resource

*

None None
bssapi:DescribeSplitItemBill DescribeSplitItemBill get

*All Resource

*

bssapi:ProductCode

bssapi:ProductType

None
bssapi:QuerySavingsPlansDeductLog QuerySavingsPlansDeductLog get

*All Resource

*

None None

Resource

The following table lists the resource types and ARN formats defined by Alibaba Cloud Billing API. The Resource element of RAM policy statements specifies the resources to which the statement applies. Notes:

  • In an ARN, {#} indicates a variable that you must replace with an actual value. For example, replace {#ramcode} with the actual RAM code of the cloud service.

  • In an ARN, * means all. For example:

    • {#resourceType}/*: All resources.

    • When {#regionId} is *, all regions are included.

    • When {#accountId} is set to *, it specifies all Alibaba Cloud accounts.

Resource type

ARN

Condition

The following table lists the product-level condition keys defined by Alibaba Cloud Billing API. Specify them in the Condition element of RAM policy statements to define the conditions under which the statement takes effect. Use conditional operators that match the data type of the condition key. If the operator does not match, the statement does not take effect. For more information about conditional operators, see Condition operator.

Condition key

Description

Data type

bssapi:ProductType The product type of the resource being operated on. Example: ecs. STRING
bssapi:ProductCode The product code of the resource being operated on. Example: ecs. STRING

References

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