AWS systems-manager documentation change
Summary
Added detailed PowerShell examples for GetAutomationExecution with authorization failure demonstration
Security assessment
While the example shows an authorization failure message, this is illustrative of normal error handling rather than addressing a specific security vulnerability. Demonstrates API usage patterns.
Diff
diff --git a/systems-manager/latest/userguide/example_ssm_GetAutomationExecution_section.md b/systems-manager/latest/userguide/example_ssm_GetAutomationExecution_section.md index 098103276..be85e7f8a 100644 --- a//systems-manager/latest/userguide/example_ssm_GetAutomationExecution_section.md +++ b//systems-manager/latest/userguide/example_ssm_GetAutomationExecution_section.md @@ -146,0 +147,62 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example displays the details of an Automation Execution.** + + + Get-SSMAutomationExecution -AutomationExecutionId "4105a4fc-f944-11e6-9d32-8fb2db27a909" + + +**Output:** + + + AutomationExecutionId : 4105a4fc-f944-11e6-9d32-8fb2db27a909 + AutomationExecutionStatus : Failed + DocumentName : AWS-UpdateLinuxAmi + DocumentVersion : 1 + ExecutionEndTime : 2/22/2017 9:17:08 PM + ExecutionStartTime : 2/22/2017 9:17:02 PM + FailureMessage : Step launchInstance failed maximum allowed times. You are not authorized to perform this operation. Encoded + authorization failure message: B_V2QyyN7NhSZQYpmVzpEc4oSnj2GLTNYnXUHsTbqJkNMoDgubmbtthLmZyaiUYekORIrA42-fv1x-04q5Fjff6glh + Yb6TI5b0GQeeNrpwNvpDzmO-PSR1swlAbg9fdM9BcNjyrznspUkWpuKu9EC1Ou6v3OXU1KC9nZ7mPlWMFZNkSioQqpwWEvMw-GZktsQzm67qOhUhBNOLWYhbS + pkfiqzY-5nw3S0obx30fhd3EJa5O_-GjV_a0nFXQJa70ik40bFOrEh3MtCSbrQT6--DvFy_FQ8TKvkIXadyVskeJI84XOF5WmA60f1pi5GI08i-nRfZS6oDeU + gELBjjoFKD8s3L2aI0B6umWVxnQOjqhQRxwJ53b54sZJ2PW3v_mtg9-q0CK0ezS3xfh_y0ilaUGOAZG-xjQFuvU_JZedWpla3xi-MZsmblAifBI + (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: + 6a002f94-ba37-43fd-99e6-39517715fce5) + Outputs : {[createImage.ImageId, Amazon.Runtime.Internal.Util.AlwaysSendList`1[System.String]]} + Parameters : {[AutomationAssumeRole, Amazon.Runtime.Internal.Util.AlwaysSendList`1[System.String]], [InstanceIamRole, + Amazon.Runtime.Internal.Util.AlwaysSendList`1[System.String]], [SourceAmiId, + Amazon.Runtime.Internal.Util.AlwaysSendList`1[System.String]]} + StepExecutions : {launchInstance, updateOSSoftware, stopInstance, createImage...} + +**Example 2: This example lists step details for the given automation execution id** + + + Get-SSMAutomationExecution -AutomationExecutionId e1d2bad3-4567-8901-ae23-456c7c8901be | Select-Object -ExpandProperty StepExecutions | Select-Object StepName, Action, StepStatus, ValidNextSteps + + +**Output:** + + + StepName Action StepStatus ValidNextSteps + -------- ------ ---------- -------------- + LaunchInstance aws:runInstances Success {OSCompatibilityCheck} + OSCompatibilityCheck aws:runCommand Success {RunPreUpdateScript} + RunPreUpdateScript aws:runCommand Success {UpdateEC2Config} + UpdateEC2Config aws:runCommand Cancelled {} + UpdateSSMAgent aws:runCommand Pending {} + UpdateAWSPVDriver aws:runCommand Pending {} + UpdateAWSEnaNetworkDriver aws:runCommand Pending {} + UpdateAWSNVMe aws:runCommand Pending {} + InstallWindowsUpdates aws:runCommand Pending {} + RunPostUpdateScript aws:runCommand Pending {} + RunSysprepGeneralize aws:runCommand Pending {} + StopInstance aws:changeInstanceState Pending {} + CreateImage aws:createImage Pending {} + TerminateInstance aws:changeInstanceState Pending {} + + * For API details, see [GetAutomationExecution](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +