CmdID

CmdID / aws / aws ssm

aws ssm describe-instance-patch-states

Retrieves the high-level patch state of one or more managed nodes. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To get the patch summary states for instances

The following describe-instance-patch-states example gets the patch summary states for an instance.

aws ssm describe-instance-patch-states --instance-ids "i-1234567890abcdef0"Identify
--instance-idsThe ID of the managed node for which patch state information should be retrieved.
Its output
{
    "InstancePatchStates": [
        {
            "InstanceId": "i-1234567890abcdef0",
            "PatchGroup": "my-patch-group",
            "BaselineId": "pb-0713accee01234567",
            "SnapshotId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "CriticalNonCompliantCount": 2,
            "SecurityNonCompliantCount": 2,
            "OtherNonCompliantCount": 1,
            "InstalledCount": 123,
            "InstalledOtherCount": 334,
            "InstalledPendingRebootCount": 0,
            "InstalledRejectedCount": 0,
            "MissingCount": 1,
            "FailedCount": 2,
            "UnreportedNotApplicableCount": 11,
            "NotApplicableCount": 2063,
            "OperationStartTime": "2021-05-03T11:00:56-07:00",
            "OperationEndTime": "2021-05-03T11:01:09-07:00",
            "Operation": "Scan",
            "LastNoRebootInstallOperationTime": "2020-06-14T12:17:41-07:00",
            "RebootOption": "RebootIfNeeded"
        }
    ]
}

For more information, see About Patch Compliance in the AWS Systems Manager User Guide.

Options

3 in the AWS CLI reference
--instance-idsThe ID of the managed node for which patch state information should be retrieved.
--max-resultsThe maximum number of managed nodes to return (per page).
--next-tokenThe token for the next set of items to return.