AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-06-28 · Documentation low

File: code-library/latest/ug/iam_example_iam_ListEntitiesForPolicy_section.md

Summary

Added PowerShell V5 example for ListEntitiesForPolicy command with sample output and API reference

Security assessment

Demonstrates policy entity tracking without addressing security vulnerabilities or introducing security features.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_ListEntitiesForPolicy_section.md b/code-library/latest/ug/iam_example_iam_ListEntitiesForPolicy_section.md
index 18bcf0fd9..18af14849 100644
--- a//code-library/latest/ug/iam_example_iam_ListEntitiesForPolicy_section.md
+++ b//code-library/latest/ug/iam_example_iam_ListEntitiesForPolicy_section.md
@@ -83,0 +84,23 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example returns a list of IAM groups, roles, and users who have the policy`arn:aws:iam::123456789012:policy/TestPolicy` attached.**
+    
+    
+    Get-IAMEntitiesForPolicy -PolicyArn "arn:aws:iam::123456789012:policy/TestPolicy"
+    
+
+**Output:**
+    
+    
+    IsTruncated  : False
+    Marker       : 
+    PolicyGroups : {}
+    PolicyRoles  : {testRole}
+    PolicyUsers  : {Bob, Theresa}
+
+  * For API details, see [ListEntitiesForPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+