diff --git a/AWS-IAM-CLI.md b/AWS-IAM-CLI.md index 9758583..ae566fc 100644 --- a/AWS-IAM-CLI.md +++ b/AWS-IAM-CLI.md @@ -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 diff --git a/Amazon-IAM-API.md b/Amazon-IAM-API.md index e743d3d..c58cbad 100644 --- a/Amazon-IAM-API.md +++ b/Amazon-IAM-API.md @@ -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 |