List the IAM policies associated with the user - ListPoliciesForUser
Overview
List the IAM policies associated with the user
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ListPoliciesForUser . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
UserName | string | Username | Yes |
Scope | string | Application Scope | No |
ProjectID | string | Project ID | No |
Limit | string | The number of user groups to be queried | No |
Offset | string | Start querying from which data entry | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
TotalCount | int | Number of Data Sets | Yes |
Policies | array[Policy] | Policy Information | Yes |
Data Model
Policy
Field Name | Type | Description Information | Required |
---|---|---|---|
PolicyName | string | Permission Policy Name | Yes |
PolicyURN | string | Strategy URN | Yes |
Description | string | Description | No |
CreatedAt | int | Creation Time | No |
Scope | string | Application Scope (ScopeRequired: Project Level, ScopeEmpty: Global Level, ScopeUnrestricted: Project Level/Global Level) | No |
ProjectID | string | Project ID | No |
AttachedAt | int | The timestamp when the policy was added to the user group | No |
Example
Request Example
https://api.surfercloud.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
}