AWS code-library documentation change
Summary
Added PowerShell V5 example for policy creation
Security assessment
Documents core IAM security feature (policy creation) but doesn't introduce new security concepts or address vulnerabilities.
Diff
diff --git a/code-library/latest/ug/iam_example_iam_CreatePolicy_section.md b/code-library/latest/ug/iam_example_iam_CreatePolicy_section.md index a2f51b996..064339644 100644 --- a//code-library/latest/ug/iam_example_iam_CreatePolicy_section.md +++ b//code-library/latest/ug/iam_example_iam_CreatePolicy_section.md @@ -837,0 +838,28 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates a new IAM policy in the current AWS account named`MySamplePolicy` The file `MySamplePolicy.json` provides the policy content. Note that you must use the `-Raw` switch parameter to successfully process the JSON policy file.** + + + New-IAMPolicy -PolicyName MySamplePolicy -PolicyDocument (Get-Content -Raw MySamplePolicy.json) + + +**Output:** + + + Arn : arn:aws:iam::123456789012:policy/MySamplePolicy + AttachmentCount : 0 + CreateDate : 4/14/2015 2:45:59 PM + DefaultVersionId : v1 + Description : + IsAttachable : True + Path : / + PolicyId : LD4KP6HVFE7WGEXAMPLE1 + PolicyName : MySamplePolicy + UpdateDate : 4/14/2015 2:45:59 PM + + * For API details, see [CreatePolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +