RAM authorization

Updated at:

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 Tablestore defines for RAM permission policies. The RamCode of Tablestore is ots , 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 Tablestore. 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

ots:UpdateAgentStorage UpdateAgentStorage update

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:GetInstance GetInstance get

*Instance

acs:ots:{#regionId}:{#accountId}:Instance/{#instanceName}

None None
ots:BindAgentStorage2Vpc BindAgentStorage2Vpc update

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:DeleteInstance DeleteInstance delete

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:DeleteAgentStorage DeleteAgentStorage delete

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:UpdateInstance UpdateInstance update

*Instance

acs:ots:{#regionId}:{#accountId}:Instance/{#instanceName}

None None
ots:GetAgentStorage GetAgentStorage get

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:UntagResourcesCustomTags UntagResources update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:CreateInstance CreateVCUInstance create

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:ListVpcInfoByInstance ListVpcInfoByInstance get

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:ListAgentStorages ListAgentStorages list

*All Resource

*

None None
ots:UpdateInstance ChangeResourceGroup update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:UnbindInstance2Vpc UnbindInstance2Vpc update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:DeleteAgentStoragePolicy DeleteAgentStoragePolicy delete

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:CheckAgentStoragePolicy CheckAgentStoragePolicy none

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:DeleteInstancePolicy DeleteInstancePolicy delete

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:ListVpcInfoByAgentStorage ListVpcInfoByAgentStorage get

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:ListInstance ListInstances list

*Instance

acs:ots:{#regionId}:{#accountId}:instance/*

None None
ots:CreateAgentStorage CreateAgentStorage create

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:UpdateAgentStoragePolicy UpdateAgentStoragePolicy update

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:BindInstance2Vpc BindInstance2Vpc update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:UnbindAgentStorage2Vpc UnbindAgentStorage2Vpc update

*AgentStorage

acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}

None None
ots:CheckInstancePolicy CheckInstancePolicy none

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:TagResourcesCustomTags TagResources update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#instanceName}

None None
ots:ListTagResourcesCustomTags ListTagResources list

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#instanceName}

None None
ots:ListVpcInfoByVpc ListVpcInfoByVpc get

*All Resource

*

None None
ots:UpdateInstancePolicy UpdateInstancePolicy update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:UpdateInstanceElasticVCUUpperLimit UpdateInstanceElasticVCUUpperLimit update

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:DeleteInstance DeleteVCUInstance delete

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None
ots:InsertInstance CreateInstance create

*Instance

acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}

None None

Resource

The following table lists the resource types and ARN formats defined by Tablestore. 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

AgentStorage
  • acs:ots:{#regionId}:{#accountId}:agentstorage/{#AgentStorageName}
  • acs:ots:{#regionId}:{#accountId}:agentstorage/*
Instance
  • acs:ots:{#regionId}:{#accountId}:Instance/{#instanceName}
  • acs:ots:{#regionId}:{#accountId}:instance/{#InstanceName}
  • acs:ots:{#regionId}:{#accountId}:instance/*

Condition

The following table lists the product-level condition keys defined by Tablestore. 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

ots:AllowInstanceInternetAccess Specifies whether to allow configuring public network access when creating and modifying instances. Boolean
vpc:Vpc VPC ID String
ots:tag The tag. String
ots:TLSVersion The TLS version used when the request is initiated.

Valid values:

  • TLSv1.1
  • TLSv1.2
  • TLSv1.3
String
vpc:IsDefaultVSwitch Specifies whether the vSwitch is the default vSwitch. Boolean
vpc:IsDefaultVpc Specifies whether the VPC is the default VPC. Boolean

References

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