The sub-account Developer of the master account CompanyExample needs to have permission to read all CLS resources (including logset, log topic, server group, etc.) under CompanyExample via the console and API. For example, the sub-account can see log search, log collection, dashboard, and alarm, etc.
- Log in to the CAM Console and create the sub-account Developer. For more information, see Creating a Custom Sub-user.
- Click Custom Create on the Create User page to select Access Resources and Receive Messages for User Type.
- Click Next to configure user information. Check Programming access and Tencent Cloud console access.
You need to perform 2 steps: use master account CompanyExample to grant sub-account Developer permission, and access CLS services using sub-account Developer.
- Authorize by the master account
- Log in to the CAM Console using master account CompanyExample.
- Click Users -> User List on the left sidebar to enter the User List Page. Locate the sub-account and click Authorize. On the Associate Policy page, select and associate the policy CLS-TopicA-ReadAccess created in Step 1, and click Done.
- Access by the sub-account
The sub-account Developer can access CLS services via both the console and API. To make API calls, you need to provide UIN of master account CompanyExample, together with SecretId and SecretKey of sub-account Developer. See Access Key for sub-account API key.