A call to the GetCallerIdentity operation returns information about the identity of the current caller.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| IdentityType |
string |
The type of the identity. Valid values:
|
RAMUser |
| AccountId |
string |
The ID of the Alibaba Cloud account to which the current caller belongs. |
196813200012**** |
| RequestId |
string |
The request ID. |
3C87BF47-3724-5443-ADC1-5AEAD9A03EB1 |
| PrincipalId |
string |
The ID of the principal. |
28877424437521**** |
| UserId |
string |
The user ID. Details are as follows:
Note
This parameter is returned only when the caller is an Alibaba Cloud account or a RAM user. |
216959339000**** |
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the current caller. |
acs:ram::196813200012****:user/admin |
| RoleId |
string |
The ID of the RAM role. Note
This parameter is returned only when the caller is a RAM role. |
33537620082992**** |
Examples
Success response
JSON format
{
"IdentityType": "RAMUser",
"AccountId": "196813200012****",
"RequestId": "3C87BF47-3724-5443-ADC1-5AEAD9A03EB1",
"PrincipalId": "28877424437521****",
"UserId": "216959339000****",
"Arn": "acs:ram::196813200012****:user/admin",
"RoleId": "33537620082992****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | STS Server Internal Error happened, please send the RequestId to us. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.