ListUserRoles

更新时间:
复制 MD 格式

Retrieves the roles assigned to a user.

Try it now

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /dlf/v1/auth/users/roles/list HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

userPrincipal

string

No

The resource descriptor for the user.

acs:ram::[accountId]:user/user_name

pageToken

string

No

The pagination token used to retrieve the next page of data. If the response does not provide this token, pass an empty string ("").

""

maxResults

integer

No

The number of entries per page.

10

Response elements

Element

Type

Description

Example

object

The response body.

roles

array

The roles.

Role

The role details.

nextPageToken

string

The pagination token used to retrieve the next page of data. If null is returned, the current page is the last page.

E8ABEB1C3DB893D16576269017992F57

Examples

Success response

JSON format

{
  "roles": [
    {
      "createdAt": 0,
      "isPredefined": "",
      "updatedBy": "",
      "createdBy": "",
      "displayName": "",
      "roleName": "",
      "description": "",
      "rolePrincipal": "",
      "users": [
        {
          "createdAt": 0,
          "updatedBy": "",
          "createdBy": "",
          "displayName": "",
          "userName": "",
          "type": "",
          "userId": "",
          "userPrincipal": "",
          "updatedAt": 0
        }
      ],
      "updatedAt": 0
    }
  ],
  "nextPageToken": "E8ABEB1C3DB893D16576269017992F57"
}

Error codes

See for a complete list.

Release notes

See 变更详情 for a complete list.