Queries the identity of the current requester.
Try it now
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
Test
RAM authorization
Request parameters
Parameter | Type | Required | Description | Example |
No parameters required.
Response elements
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 requester belongs. | 196813200012**** |
RequestId | string | The request ID. | 3C87BF47-3724-5443-ADC1-5AEAD9A03EB1 |
PrincipalId | string | The principal ID. | 28877424437521**** |
UserId | string | The user ID.
Note This parameter is returned only when the current requester uses an Alibaba Cloud account or a RAM user. | 216959339000**** |
Arn | string | The Alibaba Cloud Resource Name (ARN) of the current requester. | acs:ram::196813200012****:user/admin |
RoleId | string | The ID of the RAM role. Note This parameter is returned only when the current requester uses 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 for a complete list.
Release notes
See 变更详情 for a complete list.