Retrieve a list of instance roles
Updated at:2025-10-20
Use this API to fetch the list of BCC instance roles.
- For the definition and functions of roles, see https://cloud.baidu.com/doc/IAM/s/Gjxlikxcf
Request structure
Plain Text
1GET /v{version}/instance/role/list HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
None
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| roles | List<[InstanceRoleModel](BCC/API Reference/Appendix.md#InstanceRoleModel)> | List of instance roles |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| ServiceInternalError | Internal service occurs error. | 500 | Internal error |
| AccessDenied | No permission to accessor or permission error. | 403 | Operation prohibited |
Request example
Plain Text
1GET http://bcc.bj.baidubce.com/v2/instance/role/list
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2015 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5Server: BWS
6
7{
8 "roles":[{
9 "roleName":"roleName"
10 }]
11}
