CompanyExampleA (ownerUin: 12345).CompanyExampleB (ownerUin: 67890).DevB and wants to use DevB to do the work.DevOpsRole for example). Then, set company B's enterprise account "67890" as its role entity and add it the permission to manipulate company A's CVM resources in the Guangzhou region.DevB to use the DevOpsRole role of company A (ownerUin: 12345) and grant it the permission of the sts:AssumeRole API.DevB and click Switch Role in the drop-down list under the profile photo.
Enter company A's root account "12345" and the role name "DevOpsRole". After confirmation, company B can switch to the DevOpsRole role of company A (ownerUin: 12345).
You can also switch to other roles by clicking Switch Role in the drop-down list.
If you want to return to the original sub-account after switching the role, you can click Back to Sub-user in the drop-down list.CompanyExampleB.CreateRole API to create a role with the roleName as DevOpsRole and grant the role the permission to manipulate company A's all CVM resources in the Guangzhou region.DevB to assume the DevOpsRole role.DevOpsRole. Input parameters are as follows: CompanyExampleB) wants to directly manipulate the resources of company A (CompanyExampleA), they can also request temporary credentials to perform operations.roleArn=qcs::cam::uin/12345:roleName/DevOpsRole,roleSessionName=DevBAssumeTheRole,durationSeconds=7200
{"credentials": {"sessionToken": "5e776c4216ff4d31a7c74fe194a978a3ff2a42864","tmpSecretId": "AKI***PCl","tmpSecretKey": "Vpx***MqD"},"expiredTime": 1506433269,"expiration": "2018-09-26T13:41:09Z"}
DevB can perform operations on company A's resources within the scope of permissions during the validity period of the credentials.
For example, if DevB wants to call the DescribeInstances API to view the CVM list, then DevB needs to replace the values of SecretId and SecretKey with the values of tmpSecretId and tmpSecretKey and set the Token in common parameters to the value of sessionToken.DevOpsRole role.Feedback