Use DescribeMaintenanceWindowExecutionTaskInvocations with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DescribeMaintenanceWindowExecutionTaskInvocations with a CLI

The following code examples show how to use DescribeMaintenanceWindowExecutionTaskInvocations.

CLI
AWS CLI

To get the specific task invocations performed for a maintenance window task execution

The following describe-maintenance-window-execution-task-invocations example lists the invocations for the specified task executed as part of the specified maintenance window execution.

aws ssm describe-maintenance-window-execution-task-invocations \ --window-execution-id "518d5565-5969-4cca-8f0e-da3b2a638355" \ --task-id "ac0c6ae1-daa3-4a89-832e-d384503b6586"

Output:

{ "WindowExecutionTaskInvocationIdentities": [ { "Status": "SUCCESS", "Parameters": "{\"documentName\":\"AWS-RunShellScript\",\"instanceIds\":[\"i-0000293ffd8c57862\"],\"parameters\":{\"commands\":[\"df\"]},\"maxConcurrency\":\"1\",\"maxErrors\":\"1\"}", "InvocationId": "e274b6e1-fe56-4e32-bd2a-8073c6381d8b", "StartTime": 1487692834.723, "EndTime": 1487692834.871, "WindowExecutionId": "518d5565-5969-4cca-8f0e-da3b2a638355", "TaskExecutionId": "ac0c6ae1-daa3-4a89-832e-d384503b6586" } ] }

For more information, see View Information About Tasks and Task Executions (AWS CLI) in the AWS Systems Manager User Guide.

PowerShell
Tools for PowerShell

Example 1: This example lists the invocations for a task executed as part of a maintenance window execution.

Get-SSMMaintenanceWindowExecutionTaskInvocationList -TaskId "ac0c6ae1-daa3-4a89-832e-d384503b6586" -WindowExecutionId "518d5565-5969-4cca-8f0e-da3b2a638355"

Output:

EndTime : 2/21/2017 4:00:34 PM ExecutionId : InvocationId : e274b6e1-fe56-4e32-bd2a-8073c6381d8b OwnerInformation : Parameters : {"documentName":"AWS-RunShellScript","instanceIds":["i-0000293ffd8c57862"],"parameters":{"commands":["df"]},"maxConcurrency":"1", "maxErrors":"1"} StartTime : 2/21/2017 4:00:34 PM Status : FAILED StatusDetails : The instance IDs list contains an invalid entry. TaskExecutionId : ac0c6ae1-daa3-4a89-832e-d384503b6586 WindowExecutionId : 518d5565-5969-4cca-8f0e-da3b2a638355 WindowTargetId :