Docs
api
Access Control(IAM)
ListPoliciesForUser

List the IAM policies associated with the user - ListPoliciesForUser

Overview

List the IAM policies associated with the user

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is ListPoliciesForUser.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
UserNamestringUsernameYes
ScopestringApplication ScopeNo
ProjectIDstringProject IDNo
LimitstringThe number of user groups to be queriedNo
OffsetstringStart querying from which data entryNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TotalCountintNumber of Data SetsYes
Policiesarray[Policy]Policy InformationYes

Data Model

Policy

Field NameTypeDescription InformationRequired
PolicyNamestringPermission Policy NameYes
PolicyURNstringStrategy URNYes
DescriptionstringDescriptionNo
CreatedAtintCreation TimeNo
ScopestringApplication Scope (ScopeRequired: Project Level, ScopeEmpty: Global Level, ScopeUnrestricted: Project Level/Global Level)No
ProjectIDstringProject IDNo
AttachedAtintThe timestamp when the policy was added to the user groupNo

Example

Request Example

https://api.ucloud-global.com/?Action=ListPoliciesForUser
&UserName=WigejYot
&Scope=wpFVoffI
&ProjectID=hKymMuzZ
&Limit=IdUIFcbA
&Offset=XDGiLmJn

Response Example

{
  "Action": "ListPoliciesForUserResponse",
  "Message": "mXttgmqS",
  "Policies": [
    {
      "AttachedAt": 4,
      "CreatedAt": 2,
      "Description": "PDmbkeZM",
      "PolicyName": "PAsWyXOe",
      "PolicyURN": "SXyEkrfh",
      "ProjectID": "nEQZMTkG",
      "Scope": "yes"
    }
  ],
  "RetCode": 0,
  "TotalCount": 4
}