统一身份认证服务 IAM
统一身份认证服务 IAM
- 最新动态
- 功能总览
- 产品介绍
- 快速入门
- 用户指南
- 最佳实践
- API参考
- SDK参考
- 常见问题
-
更多文档
- 用户指南(阿布扎比区域)
- API 参考(阿布扎比区域)
- 用户指南(巴黎区域)
- API参考 (巴黎区域)
- 用户指南(吉隆坡区域)
- API参考(吉隆坡区域)
- 用户指南(安卡拉区域)
- API参考(安卡拉区域)
- 产品术语
- 通用参考
链接复制成功!
查询服务列表
功能介绍
该接口用于查询服务列表。
URI
- 参数说明
参数
是否必选
类型
说明
type
否
String
服务类型。
可能取值为compute,ec2,identity,image, network,或volume。
请求
- Request Header参数说明
参数
是否必选
类型
说明
Content-Type
是
String
该字段内容填为“application/json;charset=utf8”。
X-Auth-Token
是
String
已认证的token。
- 请求样例
curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X GET https://sample.domain.com/v3/services?type=compute
响应
- Response Body参数说明
参数
是否必选
类型
说明
links
是
Dict
服务的资源链接。
services
是
List
服务列表。
- services格式说明
参数
是否必选
类型
说明
description
否
String
服务描述。
enabled
是
Boolean
服务是否可用。
id
是
String
服务ID。
name
否
String
服务名。
type
是
String
服务类型。
links
是
Dict
服务的资源链接。
- 响应样例(响应成功)
{ "services": [ { "name": "compute5", "links": { "self": "https://sample.domain.com/v3/services/053d21d488d1463c818132d9d08fb617" }, "enabled": true, "type": "compute", "id": "053d21d488d1463c818132d9d08fb617", "description": "Compute service 5" }, { "name": "compute3", "links": { "self": "https://sample.domain.com/v3/services/c2474183dca7453bbd73123a0b78feae" }, "enabled": true, "type": "compute", "id": "c2474183dca7453bbd73123a0b78feae", "description": "Compute service 3" }, { "name": "compute2", "links": { "self": "https://sample.domain.com/v3/services/c7166694ebdd4616bd927737f7b12ca2" }, "enabled": true, "type": "compute", "id": "c7166694ebdd4616bd927737f7b12ca2", "description": "Compute service 2" } ], "links": { "self": "https://sample.domain.com/v3/services?type=compute", "previous": null, "next": null } }
状态码
状态码 |
说明 |
---|---|
200 |
请求成功。 |
400 |
请求错误。 |
401 |
认证失败。 |
403 |
鉴权失败。 |
404 |
找不到资源。 |
405 |
不允许的方法。 |
413 |
请求体过大。 |
500 |
内部服务错误。 |
503 |
服务不可用。 |
父主题: 服务和终端节点