resource
element describes one or multiple operation objects such as CVM resources and COS buckets. This document describes the resource information in CAM.resource
is *
, it indicates all resources; that is, you can grant the action
(operation) permission of all resources.*
for resource
to grant the permission of all resources in the Tencent Cloud service or the action
permission of all resources.qcs:project_id:service_type:region:account:resource
Field | Description and Valid Values | Required | Example |
qcs | Tencent Cloud service abbreviation, which indicates a resource of Tencent Cloud. | Yes | qcs |
project_id | Project information, which is only compatible with legacy CAM logic. It cannot be entered in the current policy syntax and can be left empty. | No | Empty |
service_type | Product (service) abbreviation. For more information, see "Abbreviation in CAM" in CAM-Enabled Products. If this field is left empty, it indicates all products. | No | CVM: cvm CDN: cdn |
region | If this field is left empty, it indicates all regions. | No | North China (Beijing): ap-beijing South China (Guangzhou): ap-guangzhou |
account | Root account information of the resource owner. Currently, either uin or uid can be used to describe the resource owner.uin is the root account ID in uin/${uin} format.uid is the root account's APPID in uid/${appid} format, and only COS and CAS resource owners can be described in this way.If this field is left empty, it indicates the root account of the CAM user creating the policy. | No | uin: uin/12345678 uid: uid/10001234 |
resource | Resource details of the product. Currently, you can describe a resource in the following two formats: resource_type/${resourceid} and <resource_type>/<resource_path> . resource_type/${resourceid} : resourcetype is the resource prefix, which describes the resource type. ${resourceid} is the specific resource ID, which can be viewed in the corresponding product console. * indicates all resources of this type. <resource_type>/<resource_path> : resourcetype is the resource prefix, which describes the resource type. <resource_path> is the resource path. This format supports directory-level prefix match. | Yes | CVM: instance/ins-1 TencentDB for MySQL: instanceId/cdb-1 COS: prefix//10001234/bucket1/* , which indicates all files in bucket1 . Various COS resource types are supported. For more information, see Working with COS API Authorization Policies. |
qcs::cam::uin/164256472:uin/164256472
qcs::cam::uin/164256472:root
qcs::cam::uin/164256472:uin/73829520
qcs::cam::uin/164256472:groupid/2340
*
qcs::cam::uin/12345678:policyid/*
qcs::cam::uin/12345678:policyid/12423
문제 해결에 도움이 되었나요?