Add ListUserPolicies to IAM API docs and CLI examples

Chris Lu
2026-04-08 11:16:18 -07:00
parent dfe109c903
commit ec4b1cf860
2 changed files with 19 additions and 0 deletions
+18
@@ -244,6 +244,24 @@ aws --endpoint $AWS_ENDPOINT iam put-user-policy \
--policy-document file://readwrite-policy.json
```
### List User Policies
List the names of inline policies attached to a user:
```bash
aws --endpoint $AWS_ENDPOINT iam list-user-policies --user-name bob
```
Output:
```json
{
"PolicyNames": [
"ReadOnlyPolicy"
],
"IsTruncated": false
}
```
### Get User Policy
```bash
+1
@@ -63,6 +63,7 @@ weed iam -filer=localhost:8888 -port=8111
| `PutUserPolicy` | Attach inline policy to user | Admin only |
| `GetUserPolicy` | Get user's inline policy | Admin only |
| `DeleteUserPolicy` | Remove user's inline policy | Admin only |
| `ListUserPolicies` | List inline policy names for user | Admin only |
| `CreatePolicy` | Create and store a managed policy | Admin only |
| `DeletePolicy` | Delete a managed policy | Admin only |
| `ListPolicies` | List managed policies | Admin only |