Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use DescribeMaintenanceWindowExecutionTaskInvocations
with an Amazon SDK or CLI
The following code examples show how to use DescribeMaintenanceWindowExecutionTaskInvocations
.
- CLI
-
- Amazon 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 (Amazon CLI) in the Amazon 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 :
For a complete list of Amazon SDK developer guides and code examples, see
Using Systems Manager with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.