获取请求凭证对应的身份信息。
此接口的Service为sts,接入地址为:sts.volcengineapi.com。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | GetCallerIdentity | 要执行的操作,取值:GetCallerIdentity。 |
Version | String | 是 | 2018-01-01 | API的版本,取值:2018-01-01。 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
AccountId | Integer | 2000000000 | 身份所属主账号ID。 |
Trn | String | trn:iam::2000000000:user/bob | 身份的TRN标识。主账号格式为 |
IdentityType | String | User | 主账号为Account,IAM子用户为User,IAM角色为Role。 |
IdentityId | String | 20000:example-session-name | Account类型下为 |
GET /?Action=GetCallerIdentity&Version=2018-01-01 HTTP/1.1 Host: sts.volcengineapi.com X-Date: 20251024T061228Z Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251024/cn-beijing/sts/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{ "ResponseMetadata": { "RequestId": "20251024141232149184238242E6758E", "Action": "GetCallerIdentity", "Version": "2018-01-01", "Service": "sts", "Region": "cn-beijing" }, "Result": { "AccountId": 2000000000, "Trn": "trn:iam::2000000000:user/bob", "IdentityType": "User", "IdentityId": "20000:example-session-name" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
401 | UnknownCallerIdentity | 身份不存在。 |