You need to enable JavaScript to run this app.
IAM

IAM

Copy page
Download PDF
Policy Grammar
Resources
Copy page
Download PDF
Resources

**Resource (Resource) **element contains the scope of resources defined by the permission declaration, using the **TRN **expression definition. TRN (The Resource Name) is a globally unique identifier of resources on Volcano Engine, which consists of information such as service, region, account, resource path, etc. The format is as follows:
trn:${ServiceCode}:${Region}:${AccountId}:${ResourcePath}
Here are explanations for each part:

trn: Fixed prefix of TRN
${ServiceCode}: The code of Cloud as a Service, for example, the ServiceCode of Cloud as a Service is ecs , and the ServiceCode of different cloud products can be queried from the API documentation of the service.
${RegionCode}: Region to which the resource belongs, Global Resource The field value should be empty. The following are the RegionCodes for different regions.
${AccountId}: The account ID to which the resource belongs
${ResourcePath}: Resource path, for example, the resource path of ECS instance is instance/${InstanceId} , instance is the fixed resource type name of the ECS instance, and ${InstanceId} is the ID of the Cloud as a Service instance. Path formats for different resource types can be found in the table at the end of the document.

Example 1: The account with AccountID 2000000001 created the instance Cloud as a Service with id = i-100 in cn-Beijing, and the corresponding resource TRN is trn: ecs: cn-Beijing: 2000000001: instance/i-100

Example 2: IAM user with the user name Bob created by the account with AccountID 2000000001, and the corresponding resource TRN is trn: i am :: 2000000001: user/Bob (IAM is a global service and does not distinguish between regions, so the region value here is empty)

In some scenarios, you can use the NotResource keyword to exclude resources defined in some Resources . For details, please refer to the NotResource syntax description .

The Resource element supports the overall expression of wild-card * , or the use of wild-card in the TRN from paragraph 2 to every subsequent paragraph:

  • Wild-card * : Matches 0, 1, or more characters.
  • Wild-card ? : Matches one character (cannot be 0).

The following is a policy that includes Resources:

{ 
  "Statement": [ 
    { 
      "Effect": "Allow", 
      "Action": [ 
        "ecs:DeleteInstance" 
      ], 
      "Resource": [ 
        "trn:ecs:cn-beijing:2000000001:instance/i-100", 
        "trn:ecs:cn-beijing:2000000001:instance/i-200" 
      ] 
    }, 
    { 
      "Effect": "Allow", 
      "Action": [ 
        "iam:GetUser" 
      ], 
      "Resource": [ 
        "*" 
      ] 
    } 
  ] 
}

**Interpretation: **This policy defines permissions to allow deletion of Cloud as a Service instances with instance IDs i-100 and i-200 and to allow querying of all IAM users.

Supported Cloud as a Service Resource Types

You can refer to the specific Cloud as a Service product documentation to learn about the supported resource types. The following are resource TRN formats for some commonly used services:

Products
ServiceCode
Resource type
ResourceType
trn format
Cloud as a Serviceecsexampleinstancetrn:ecs:{region}:{account}:instance/{instanceid}
Key Pairkeypairtrn:ecs:{region}:{account}:keypair/{keypairname}
mirror imageimagetrn:ecs:{region}:{account}:image/{imageid}
Elastic Block Storestorage_ebsvolumevolumetrn:storage_ebs:{region}:{account}:volume/{volumeid}
Cloud Database RDS MySQLrds_mysqlexampleinstancetrn:rds_mysql:{region}:{account}:instance/{instanceid}
Cache Database Redis EditionRedisexampleinstancetrn:Redis:{region}:{account}:instance/{instanceid}
File storage vePFSvepfsexampleinstancetrn:vepfs:{region}:{account}:instance/${instanceid}
Information delivery networkCDNdomain nameDomaintrn:CDN:{region}:{account}:Domain/{domain}
Application Load Balanceralbexampleloadbalancertrn:alb:{region}:{account}:loadbalancer/{id}
Listenerlistenertrn:alb:{region}:{account}:listener/{id}
server groupservergrouptrn:alb:{region}:{account}:servergroup/{id}
personalized configurationcustomizedcfgtrn:alb:{region}:{account}:customizedcfg/{id}
certificatecertificatetrn:alb:{region}:{account}:certificate/{id}
access controlacltrn:alb:{region}:{account}:acl/{id}
Public IPvpcexampleeiptrn:vpc:{region}:{account}:eip/{eipid}
shared bandwidth packetvpcexamplebandwidthpackagetrn:vpc:{region}:{account}:bandwidthpackage/{bandwidthpackageid}
private networkvpcprivate network instancevpctrn:vpc:{region}:{account}:vpc/{vpcid}
subnetsubnettrn:vpc:{region}:{account}:subnet/{subnetid}
Network interface cardenitrn:vpc:{region}:{account}:eni/{eniid}
security teamsecuritygrouptrn:vpc:{region}:{account}:securitygroup/{securitygroupid}
routing tableroutetabletrn:vpc:{region}:{account}:routetable/{routetableid}
Network ACLnetworkacltrn:vpc:{region}:{account}:networkacl/{networkaclid}
NAT gatewaynatgatewayexamplengwtrn:natgateway:{region}:{account}:ngw/{ngwid}
VPN connectionvpnVPN gatewayvpngatewaytrn:vpn:{region}:{account}:vpngateway/{vpngatewayid}
User Gatewaycustomergatewaytrn:vpn:{region}:{account}:customergateway/{customergatewayid}
IPSec connectionvpnconnectiontrn:vpn:{region}:{account}:vpnconnection/{vpnconnectionid}
VPN gateway routingvpngatewayroutetrn:vpn:{region}:{account}:vpngatewayroute/{vpngatewayrouteid}
private line connectiondirectconnectPhysics Lineconnectiontrn:directconnect:{region}:{account}:connection/{id}
dedicated gatewaydirectconnectgatewaytrn:directconnect:{region}:{account}:directconnectgateway/{id}
Transit routertransitrouterTR exampletransitroutertrn:transitrouter:{region}:{account}:transitrouter/{transitrouterid}
TR connectiontransitrouterattachmenttrn:transitrouter:{region}:{account}:transitrouterattachment/{transitrouterattachmentid}
TR routing tabletransitrouterroutetabletrn:transitrouter:{region}:{account}:transitrouterroutetable/{transitrouterroutetableid}
TR route entrytransitrouterrouteentrytrn:transitrouter:{region}:{account}:transitrouterrouteentry/{transitrouterrouteentryid}
TR bandwidth packettransitrouterbandwidthpackagetrn:transitrouter::{account}:transitrouterbandwidthpackage/{transitrouterbandwidthpackageid}
load balanceclbLoad balancing exampleclbtrn:clb:{region}:{account}:clb/{clbid}
Access Control Policy Groupacltrn:clb:{region}:{account}:acl/{aclid}
certificatecertificatetrn:clb:{region}:{account}:certificate/{certificateid}
exclusive clusterectrn:clb:{region}:{account}:ec/{{ecid}
container servicevkeclusterclustertrn:vke:{region}:{account}:cluster/{id}
object storagetosbucketbuckettrn:tos:{region}:{account}:{bucket}
objectobjecttrn:tos:{region}:{account}:{bucket}/{object}
access controliamuserusertrn:iam::{account}:user/{UserName}
user groupgrouptrn:iam::{account}:group/{GroupName}
roleroletrn:iam::{account}:role/{RoleName}
strategypolicytrn:iam::{account}:policy/{PolicyName}
projectprojecttrn:iam::{account}:project/{ProjectName}
Last updated: 2025.06.23 19:21:31