Authorize Sub-account Full Permissions to Access the TDMQ it creates
Last Updated At: 2025-10-21 09:10:00
Authorize Sub-account Full Permissions to Access the TDMQ it creates
The enterprise account CompanyExample has a sub-account Developer that wants access to the TDMQ it creates.
Scheme A:
The enterprise account CompanyExample directly authorizes the predefined policyQCloudCmqQueueCreaterFullAccess and QCloudCmqTopicCreatorFullAccess to the sub-account Developer. For authorization methods, refer to Authorization Management.
Scheme B:
Step 1: Create the following policies by policy syntax
{
"version": "2.0",
"statement":
[
{
"effect": "allow",
"action": "cmqtopic:*",
"resource": "qcs::cmqtopic:::topicName/uin/${uin}/*"
},
{
"effect": "allow",
"action": "cmqqueue:*",
"resource": "qcs::cmqqueue:::queueName/uin/${uin}/*"
}
]
}
Step 2: Authorize the policy to the sub-account. For authorization methods, refer to Authorization Management.