获取RAM用户或阿里云账号(主账号)下所有RAM用户的服务凭证列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ram:ListServiceCredentials |
list |
*User
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AllUsers |
boolean |
否 |
是否查询云账号下所有 RAM 用户的服务凭证。 值为 true 时,不能同时指定 UserPrincipalName 枚举值:
|
true |
| UserPrincipalName |
string |
否 |
RAM 用户登录名称。 查询指定 RAM 用户的服务凭证。 |
test@example.onaliyun.com |
| ServiceName |
string |
否 |
阿里云服务名称 |
xxx.aliyuncs.com |
| MaxResults |
integer |
否 |
每页的最大数据条数。 取值范围 1~100,默认值 10。 |
20 |
| NextToken |
string |
否 |
查询返回结果下一页的令牌。 首次调用 API 不需要该字段。 |
EXAMPLE******* |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID |
D80A0F97-6F12-5CD1-A70A-77A03BF4CFC5 |
| ServiceCredentials |
array<object> |
服务凭证列表 |
|
|
object |
服务凭证信息 |
||
| ServiceCredentialId |
string |
服务凭证 ID |
SC************* |
| ServiceCredentialName |
string |
服务凭证名称 |
test |
| ServiceName |
string |
阿里云服务名称 |
xxx.aliyuncs.com |
| UserPrincipalName |
string |
RAM 用户登录名称 |
test@example.onaliyun.com |
| CreateTime |
string |
创建时间 |
2026-05-07T05:49:57Z |
| ExpirationTime |
string |
过期时间。 永久有效的服务凭证不返回该字段。 |
2026-06-07T05:49:57Z |
| Status |
string |
服务凭证状态 |
Active |
| IsTruncated |
boolean |
是否还有下一页 |
true |
| NextToken |
string |
获取下一页结果的令牌 |
EXAMPLE******* |
| MaxResults |
integer |
每页的最大数据条数 |
20 |
示例
正常返回示例
JSON格式
{
"RequestId": "D80A0F97-6F12-5CD1-A70A-77A03BF4CFC5",
"ServiceCredentials": [
{
"ServiceCredentialId": "SC*************",
"ServiceCredentialName": "test",
"ServiceName": "xxx.aliyuncs.com",
"UserPrincipalName": "test@example.onaliyun.com",
"CreateTime": "2026-05-07T05:49:57Z",
"ExpirationTime": "2026-06-07T05:49:57Z",
"Status": "Active"
}
],
"IsTruncated": true,
"NextToken": "EXAMPLE*******",
"MaxResults": 20
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。