You can filter buckets by tag and get a buckets list in the COS Console. This feature relies on the Tencent Cloud tagging service.
Assume that the enterprise account CompanyExample (OwnerUin: 100000000001, Owner_appid: 1250000000) has a sub-account jason.read, and CompanyExample needs to grant the sub-account permissions to get a list of tagged objects. The following provides details on how to grant the permissions.
If you want to enable the sub-account to get a list of buckets filtered by tag in the console, you need to grant it the necessary permissions GetResourceTags, GetResourcesByTags and GetTags by creating custom policies in the CAM Console.
*
here, or a description that you see fill your environment. See Resource Description Method.tag:*
. Here we change action
to name/tag:GetResourceTags
, name/tag:GetResourcesByTags
and name/tag:GetTags
with policy syntax as shown below:{
"version": "2.0",
"statement": [
{
"effect": "allow",
"action": [
"name/tag:GetResourceTags",
"name/tag:GetResourcesByTags",
"name/tag:GetTags"
],
"resource": [
"*"
]
}
]
}
(5) Click Done to complete the creation.
3. Associate the policy with the sub-account jason.read by locating the policy created in step 2 in the policies page and clicking Bind User/Group on the right side.
4. In the Bind User/User Group window, select sub-account jason.read and click OK.
5. Log in to the console using the sub-account jason.read. In the Bucket List page, select Tag and enter Tag Key to search for a list of buckets all with the specified tag as shown below:
Apakah halaman ini membantu?