Skip to main content

instance_patch_states

Creates, updates, deletes, gets or lists an instance_patch_states resource.

Overview

Nameinstance_patch_states
TypeResource
Idaws.ssm.instance_patch_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
available_security_update_countintegerThe number of security-related patches that are available but not approved because they didn't meet the patch baseline requirements. For example, an updated version of a patch might have been released before the specified auto-approval period was over. Applies to Windows Server managed nodes only.
baseline_idstringThe ID of the patch baseline used to patch the managed node. (pattern: <code>^[a-zA-Z0-9_-:/]{20,128}$</code>)
critical_non_compliant_countintegerThe number of patches per node that are specified as Critical for compliance reporting in the patch baseline aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT.
failed_countintegerThe number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.
install_override_liststringAn https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL to a list of patches to be installed. This patch installation list, which you maintain in an S3 bucket in YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides the patches specified by the default patch baseline. For more information about the InstallOverrideList parameter, see SSM Command document for patching: AWS-RunPatchBaseline in the Amazon Web Services Systems Manager User Guide. (pattern: <code>^https:​//.+$|^s3:​//([^/]+)/(.*?([^/]+))$</code>)
installed_countintegerThe number of patches from the patch baseline that are installed on the managed node.
installed_other_countintegerThe number of patches not specified in the patch baseline that are installed on the managed node.
installed_pending_reboot_countintegerThe number of patches installed by Patch Manager since the last time the managed node was rebooted.
installed_rejected_countintegerThe number of patches installed on a managed node that are specified in a RejectedPatches list. Patches with a status of InstalledRejected were typically installed before they were added to a RejectedPatches list. If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, the value of InstalledRejectedCount will always be 0 (zero).
instance_idstringThe ID of the managed node the high-level patch compliance information was collected for. (pattern: <code>(^i-(\w{8}|\w{17})$)|(^mi-\w{17}$)</code>)
last_no_reboot_install_operation_timestring (date-time)The time of the last attempt to patch the managed node with NoReboot specified as the reboot option.
missing_countintegerThe number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.
not_applicable_countintegerThe number of patches from the patch baseline that aren't applicable for the managed node and therefore aren't installed on the node. This number may be truncated if the list of patch names is very large. The number of patches beyond this limit are reported in UnreportedNotApplicableCount.
operationstringThe type of patching operation that was performed: or SCAN assesses the patch compliance state. INSTALL installs missing patches. (Scan, Install)
operation_end_timestring (date-time)The time the most recent patching operation completed on the managed node.
operation_start_timestring (date-time)The time the most recent patching operation was started on the managed node.
other_non_compliant_countintegerThe number of patches per node that are specified as other than Critical or Security but aren't compliant with the patch baseline. The status of these managed nodes is NON_COMPLIANT.
owner_informationstringPlaceholder information. This field will always be empty in the current release of the service.
patch_groupstringThe name of the patch group the managed node belongs to. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
reboot_optionstringIndicates the reboot option specified in the patch baseline. Reboot options apply to Install operations only. Reboots aren't attempted for Patch Manager Scan operations. RebootIfNeeded: Patch Manager tries to reboot the managed node if it installed any patches, or if any patches are detected with a status of InstalledPendingReboot. NoReboot: Patch Manager attempts to install missing packages without trying to reboot the system. Patches installed with this option are assigned a status of InstalledPendingReboot. These patches might not be in effect until a reboot is performed. (RebootIfNeeded, NoReboot)
security_non_compliant_countintegerThe number of patches per node that are specified as Security in a patch advisory aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT.
snapshot_idstringThe ID of the patch baseline snapshot used during the patching operation when this compliance data was collected. (pattern: <code>^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$</code>)
unreported_not_applicable_countintegerThe number of patches beyond the supported limit of NotApplicableCount that aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services Systems Manager.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instance_patch_statesselectregionRetrieves the high-level patch state of one or more managed nodes.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
available_security_update_count,
baseline_id,
critical_non_compliant_count,
failed_count,
install_override_list,
installed_count,
installed_other_count,
installed_pending_reboot_count,
installed_rejected_count,
instance_id,
last_no_reboot_install_operation_time,
missing_count,
not_applicable_count,
operation,
operation_end_time,
operation_start_time,
other_non_compliant_count,
owner_information,
patch_group,
reboot_option,
security_non_compliant_count,
snapshot_id,
unreported_not_applicable_count
FROM aws.ssm.instance_patch_states
WHERE region = '{{ region }}' -- required
;