AWS code-library documentation change
Summary
Added PowerShell V5 example for Update-SSMDocument with document versioning and hash verification
Security assessment
The example highlights document integrity verification through Hash and HashType fields, which are security-related features for validating document authenticity. However, this documents existing functionality rather than addressing a specific vulnerability.
Diff
diff --git a/code-library/latest/ug/ssm_example_ssm_UpdateDocument_section.md b/code-library/latest/ug/ssm_example_ssm_UpdateDocument_section.md index 7e1ff0577..bf1edc388 100644 --- a//code-library/latest/ug/ssm_example_ssm_UpdateDocument_section.md +++ b//code-library/latest/ug/ssm_example_ssm_UpdateDocument_section.md @@ -109,0 +110,33 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This creates a new version of a document with the updated contents of the json file you specify. The document must be in JSON format. You can obtain the document version with the "Get-SSMDocumentVersionList" cmdlet.** + + + Update-SSMDocument -Name RunShellScript -DocumentVersion "1" -Content (Get-Content -Raw "c:\temp\RunShellScript.json") + + +**Output:** + + + CreatedDate : 3/1/2017 2:59:17 AM + DefaultVersion : 1 + Description : Run an updated script + DocumentType : Command + DocumentVersion : 2 + Hash : 1d5ce820e999ff051eb4841ed887593daf77120fd76cae0d18a53cc42e4e22c1 + HashType : Sha256 + LatestVersion : 2 + Name : RunShellScript + Owner : 809632081692 + Parameters : {commands} + PlatformTypes : {Linux} + SchemaVersion : 2.0 + Sha1 : + Status : Updating + + * For API details, see [UpdateDocument](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +