Amazon Simple Systems Manager (SSM)

2025/03/24 - Amazon Simple Systems Manager (SSM) - 8 updated api methods

Changes  This release adds the AvailableSecurityUpdatesComplianceStatus field to patch baseline operations, as well as the AvailableSecurityUpdateCount and InstancesWithAvailableSecurityUpdates to patch state operations. Applies to Windows Server managed nodes only.

CreatePatchBaseline (updated) Link ¶
Changes (request)
{'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT | NON_COMPLIANT'}

Creates a patch baseline.

See also: AWS API Documentation

Request Syntax

client.create_patch_baseline(
    OperatingSystem='WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'AMAZON_LINUX_2022'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN'|'MACOS'|'RASPBIAN'|'ROCKY_LINUX'|'ALMA_LINUX'|'AMAZON_LINUX_2023',
    Name='string',
    GlobalFilters={
        'PatchFilters': [
            {
                'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                'Values': [
                    'string',
                ]
            },
        ]
    },
    ApprovalRules={
        'PatchRules': [
            {
                'PatchFilterGroup': {
                    'PatchFilters': [
                        {
                            'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                            'Values': [
                                'string',
                            ]
                        },
                    ]
                },
                'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
                'ApproveAfterDays': 123,
                'ApproveUntilDate': 'string',
                'EnableNonSecurity': True|False
            },
        ]
    },
    ApprovedPatches=[
        'string',
    ],
    ApprovedPatchesComplianceLevel='CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
    ApprovedPatchesEnableNonSecurity=True|False,
    RejectedPatches=[
        'string',
    ],
    RejectedPatchesAction='ALLOW_AS_DEPENDENCY'|'BLOCK',
    Description='string',
    Sources=[
        {
            'Name': 'string',
            'Products': [
                'string',
            ],
            'Configuration': 'string'
        },
    ],
    AvailableSecurityUpdatesComplianceStatus='COMPLIANT'|'NON_COMPLIANT',
    ClientToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type OperatingSystem:

string

param OperatingSystem:

Defines the operating system the patch baseline applies to. The default value is WINDOWS.

type Name:

string

param Name:

[REQUIRED]

The name of the patch baseline.

type GlobalFilters:

dict

param GlobalFilters:

A set of global filters used to include patches in the baseline.

  • PatchFilters (list) -- [REQUIRED]

    The set of patch filters that make up the group.

    • (dict) --

      Defines which patches should be included in a patch baseline.

      A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

      The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

      You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

      • Key (string) -- [REQUIRED]

        The key for the filter.

        Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

      • Values (list) -- [REQUIRED]

        The value for the filter key.

        Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

        • (string) --

type ApprovalRules:

dict

param ApprovalRules:

A set of rules used to include patches in the baseline.

  • PatchRules (list) -- [REQUIRED]

    The rules that make up the rule group.

    • (dict) --

      Defines an approval rule for a patch baseline.

      • PatchFilterGroup (dict) -- [REQUIRED]

        The patch filter group that defines the criteria for the rule.

        • PatchFilters (list) -- [REQUIRED]

          The set of patch filters that make up the group.

          • (dict) --

            Defines which patches should be included in a patch baseline.

            A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

            The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

            You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

            • Key (string) -- [REQUIRED]

              The key for the filter.

              Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

            • Values (list) -- [REQUIRED]

              The value for the filter key.

              Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

              • (string) --

      • ComplianceLevel (string) --

        A compliance severity level for all approved patches in a patch baseline.

      • ApproveAfterDays (integer) --

        The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of 7 means that patches are approved seven days after they are released.

        This parameter is marked as Required: No, but your request must include a value for either ApproveAfterDays or ApproveUntilDate.

        Not supported for Debian Server or Ubuntu Server.

      • ApproveUntilDate (string) --

        The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically.

        Enter dates in the format YYYY-MM-DD. For example, 2024-12-31.

        This parameter is marked as Required: No, but your request must include a value for either ApproveUntilDate or ApproveAfterDays.

        Not supported for Debian Server or Ubuntu Server.

      • EnableNonSecurity (boolean) --

        For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is false. Applies to Linux managed nodes only.

type ApprovedPatches:

list

param ApprovedPatches:

A list of explicitly approved patches for the baseline.

For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • (string) --

type ApprovedPatchesComplianceLevel:

string

param ApprovedPatchesComplianceLevel:

Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation. The default value is UNSPECIFIED.

type ApprovedPatchesEnableNonSecurity:

boolean

param ApprovedPatchesEnableNonSecurity:

Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

type RejectedPatches:

list

param RejectedPatches:

A list of explicitly rejected patches for the baseline.

For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • (string) --

type RejectedPatchesAction:

string

param RejectedPatchesAction:

The action for Patch Manager to take on patches included in the RejectedPackages list.

ALLOW_AS_DEPENDENCY

Linux and macOS: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as INSTALLED_OTHER. This is the default action if no option is specified.

Windows Server: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as INSTALLED_OTHER. Any package not already installed on the node is skipped. This is the default action if no option is specified.

BLOCK

All OSs: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances. If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as INSTALLED_REJECTED.

type Description:

string

param Description:

A description of the patch baseline.

type Sources:

list

param Sources:

Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

  • (dict) --

    Information about the patches to use to update the managed nodes, including target operating systems and source repository. Applies to Linux managed nodes only.

    • Name (string) -- [REQUIRED]

      The name specified to identify the patch source.

    • Products (list) -- [REQUIRED]

      The specific operating system versions a patch repository applies to, such as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". For lists of supported product values, see PatchFilter.

      • (string) --

    • Configuration (string) -- [REQUIRED]

      The value of the yum repo configuration. For example:

      [main]

      name=MyCustomRepository

      baseurl=https://my-custom-repository

      enabled=1

type AvailableSecurityUpdatesComplianceStatus:

string

param AvailableSecurityUpdatesComplianceStatus:

Indicates the status you want to assign to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.

Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.

Supported for Windows Server managed nodes only.

type ClientToken:

string

param ClientToken:

User-provided idempotency token.

This field is autopopulated if not provided.

type Tags:

list

param Tags:

Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a patch baseline to identify the severity level of patches it specifies and the operating system family it applies to. In this case, you could specify the following key-value pairs:

  • Key=PatchSeverity,Value=Critical

  • Key=OS,Value=Windows

  • (dict) --

    Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.

    • Key (string) -- [REQUIRED]

      The name of the tag.

    • Value (string) -- [REQUIRED]

      The value of the tag.

rtype:

dict

returns:

Response Syntax

{
    'BaselineId': 'string'
}

Response Structure

  • (dict) --

    • BaselineId (string) --

      The ID of the created patch baseline.

DescribeInstancePatchStates (updated) Link ¶
Changes (response)
{'InstancePatchStates': {'AvailableSecurityUpdateCount': 'integer'}}

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

See also: AWS API Documentation

Request Syntax

client.describe_instance_patch_states(
    InstanceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type InstanceIds:

list

param InstanceIds:

[REQUIRED]

The ID of the managed node for which patch state information should be retrieved.

  • (string) --

type NextToken:

string

param NextToken:

The token for the next set of items to return. (You received this token from a previous call.)

type MaxResults:

integer

param MaxResults:

The maximum number of managed nodes to return (per page).

rtype:

dict

returns:

Response Syntax

{
    'InstancePatchStates': [
        {
            'InstanceId': 'string',
            'PatchGroup': 'string',
            'BaselineId': 'string',
            'SnapshotId': 'string',
            'InstallOverrideList': 'string',
            'OwnerInformation': 'string',
            'InstalledCount': 123,
            'InstalledOtherCount': 123,
            'InstalledPendingRebootCount': 123,
            'InstalledRejectedCount': 123,
            'MissingCount': 123,
            'FailedCount': 123,
            'UnreportedNotApplicableCount': 123,
            'NotApplicableCount': 123,
            'AvailableSecurityUpdateCount': 123,
            'OperationStartTime': datetime(2015, 1, 1),
            'OperationEndTime': datetime(2015, 1, 1),
            'Operation': 'Scan'|'Install',
            'LastNoRebootInstallOperationTime': datetime(2015, 1, 1),
            'RebootOption': 'RebootIfNeeded'|'NoReboot',
            'CriticalNonCompliantCount': 123,
            'SecurityNonCompliantCount': 123,
            'OtherNonCompliantCount': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstancePatchStates (list) --

      The high-level patch state for the requested managed nodes.

      • (dict) --

        Defines the high-level patch compliance state for a managed node, providing information about the number of installed, missing, not applicable, and failed patches along with metadata about the operation when this information was gathered for the managed node.

        • InstanceId (string) --

          The ID of the managed node the high-level patch compliance information was collected for.

        • PatchGroup (string) --

          The name of the patch group the managed node belongs to.

        • BaselineId (string) --

          The ID of the patch baseline used to patch the managed node.

        • SnapshotId (string) --

          The ID of the patch baseline snapshot used during the patching operation when this compliance data was collected.

        • InstallOverrideList (string) --

          An 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.

        • OwnerInformation (string) --

          Placeholder information. This field will always be empty in the current release of the service.

        • InstalledCount (integer) --

          The number of patches from the patch baseline that are installed on the managed node.

        • InstalledOtherCount (integer) --

          The number of patches not specified in the patch baseline that are installed on the managed node.

        • InstalledPendingRebootCount (integer) --

          The number of patches installed by Patch Manager since the last time the managed node was rebooted.

        • InstalledRejectedCount (integer) --

          The 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.

        • MissingCount (integer) --

          The number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.

        • FailedCount (integer) --

          The number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.

        • UnreportedNotApplicableCount (integer) --

          The 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.

        • NotApplicableCount (integer) --

          The 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.

        • AvailableSecurityUpdateCount (integer) --

          The 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.

        • OperationStartTime (datetime) --

          The time the most recent patching operation was started on the managed node.

        • OperationEndTime (datetime) --

          The time the most recent patching operation completed on the managed node.

        • Operation (string) --

          The type of patching operation that was performed: or

          • SCAN assesses the patch compliance state.

          • INSTALL installs missing patches.

        • LastNoRebootInstallOperationTime (datetime) --

          The time of the last attempt to patch the managed node with NoReboot specified as the reboot option.

        • RebootOption (string) --

          Indicates the reboot option specified in the patch baseline.

          • 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.

        • CriticalNonCompliantCount (integer) --

          The 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.

        • SecurityNonCompliantCount (integer) --

          The 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.

        • OtherNonCompliantCount (integer) --

          The 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.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

DescribeInstancePatchStatesForPatchGroup (updated) Link ¶
Changes (response)
{'InstancePatchStates': {'AvailableSecurityUpdateCount': 'integer'}}

Retrieves the high-level patch state for the managed nodes in the specified patch group.

See also: AWS API Documentation

Request Syntax

client.describe_instance_patch_states_for_patch_group(
    PatchGroup='string',
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ],
            'Type': 'Equal'|'NotEqual'|'LessThan'|'GreaterThan'
        },
    ],
    NextToken='string',
    MaxResults=123
)
type PatchGroup:

string

param PatchGroup:

[REQUIRED]

The name of the patch group for which the patch state information should be retrieved.

type Filters:

list

param Filters:

Each entry in the array is a structure containing:

  • Key (string between 1 and 200 characters)

  • Values (array containing a single string)

  • Type (string "Equal", "NotEqual", "LessThan", "GreaterThan")

  • (dict) --

    Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope down the information returned by the API.

    Example: To filter for all managed nodes in a patch group having more than three patches with a FailedCount status, use the following for the filter:

    • Value for Key: FailedCount

    • Value for Type: GreaterThan

    • Value for Values: 3

    • Key (string) -- [REQUIRED]

      The key for the filter. Supported values include the following:

      • InstalledCount

      • InstalledOtherCount

      • InstalledPendingRebootCount

      • InstalledRejectedCount

      • MissingCount

      • FailedCount

      • UnreportedNotApplicableCount

      • NotApplicableCount

    • Values (list) -- [REQUIRED]

      The value for the filter. Must be an integer greater than or equal to 0.

      • (string) --

    • Type (string) -- [REQUIRED]

      The type of comparison that should be performed for the value.

type NextToken:

string

param NextToken:

The token for the next set of items to return. (You received this token from a previous call.)

type MaxResults:

integer

param MaxResults:

The maximum number of patches to return (per page).

rtype:

dict

returns:

Response Syntax

{
    'InstancePatchStates': [
        {
            'InstanceId': 'string',
            'PatchGroup': 'string',
            'BaselineId': 'string',
            'SnapshotId': 'string',
            'InstallOverrideList': 'string',
            'OwnerInformation': 'string',
            'InstalledCount': 123,
            'InstalledOtherCount': 123,
            'InstalledPendingRebootCount': 123,
            'InstalledRejectedCount': 123,
            'MissingCount': 123,
            'FailedCount': 123,
            'UnreportedNotApplicableCount': 123,
            'NotApplicableCount': 123,
            'AvailableSecurityUpdateCount': 123,
            'OperationStartTime': datetime(2015, 1, 1),
            'OperationEndTime': datetime(2015, 1, 1),
            'Operation': 'Scan'|'Install',
            'LastNoRebootInstallOperationTime': datetime(2015, 1, 1),
            'RebootOption': 'RebootIfNeeded'|'NoReboot',
            'CriticalNonCompliantCount': 123,
            'SecurityNonCompliantCount': 123,
            'OtherNonCompliantCount': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstancePatchStates (list) --

      The high-level patch state for the requested managed nodes.

      • (dict) --

        Defines the high-level patch compliance state for a managed node, providing information about the number of installed, missing, not applicable, and failed patches along with metadata about the operation when this information was gathered for the managed node.

        • InstanceId (string) --

          The ID of the managed node the high-level patch compliance information was collected for.

        • PatchGroup (string) --

          The name of the patch group the managed node belongs to.

        • BaselineId (string) --

          The ID of the patch baseline used to patch the managed node.

        • SnapshotId (string) --

          The ID of the patch baseline snapshot used during the patching operation when this compliance data was collected.

        • InstallOverrideList (string) --

          An 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.

        • OwnerInformation (string) --

          Placeholder information. This field will always be empty in the current release of the service.

        • InstalledCount (integer) --

          The number of patches from the patch baseline that are installed on the managed node.

        • InstalledOtherCount (integer) --

          The number of patches not specified in the patch baseline that are installed on the managed node.

        • InstalledPendingRebootCount (integer) --

          The number of patches installed by Patch Manager since the last time the managed node was rebooted.

        • InstalledRejectedCount (integer) --

          The 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.

        • MissingCount (integer) --

          The number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.

        • FailedCount (integer) --

          The number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.

        • UnreportedNotApplicableCount (integer) --

          The 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.

        • NotApplicableCount (integer) --

          The 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.

        • AvailableSecurityUpdateCount (integer) --

          The 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.

        • OperationStartTime (datetime) --

          The time the most recent patching operation was started on the managed node.

        • OperationEndTime (datetime) --

          The time the most recent patching operation completed on the managed node.

        • Operation (string) --

          The type of patching operation that was performed: or

          • SCAN assesses the patch compliance state.

          • INSTALL installs missing patches.

        • LastNoRebootInstallOperationTime (datetime) --

          The time of the last attempt to patch the managed node with NoReboot specified as the reboot option.

        • RebootOption (string) --

          Indicates the reboot option specified in the patch baseline.

          • 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.

        • CriticalNonCompliantCount (integer) --

          The 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.

        • SecurityNonCompliantCount (integer) --

          The 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.

        • OtherNonCompliantCount (integer) --

          The 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.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

DescribeInstancePatches (updated) Link ¶
Changes (response)
{'Patches': {'State': {'AVAILABLE_SECURITY_UPDATE'}}}

Retrieves information about the patches on the specified managed node and their state relative to the patch baseline being used for the node.

See also: AWS API Documentation

Request Syntax

client.describe_instance_patches(
    InstanceId='string',
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the managed node whose patch state information should be retrieved.

type Filters:

list

param Filters:

Each element in the array is a structure containing a key-value pair.

Supported keys for ``DescribeInstancePatches``include the following:

  • Classification Sample values: Security | SecurityUpdates

  • KBId Sample values: KB4480056 | java-1.7.0-openjdk.x86_64

  • Severity Sample values: Important | Medium | Low

  • State Sample values: Installed | InstalledOther | InstalledPendingReboot For lists of all State values, see Patch compliance state values in the Amazon Web Services Systems Manager User Guide.

  • (dict) --

    Defines a filter used in Patch Manager APIs. Supported filter keys depend on the API operation that includes the filter. Patch Manager API operations that use PatchOrchestratorFilter include the following:

    • DescribeAvailablePatches

    • DescribeInstancePatches

    • DescribePatchBaselines

    • DescribePatchGroups

    • Key (string) --

      The key for the filter.

    • Values (list) --

      The value for the filter.

      • (string) --

type NextToken:

string

param NextToken:

The token for the next set of items to return. (You received this token from a previous call.)

type MaxResults:

integer

param MaxResults:

The maximum number of patches to return (per page).

rtype:

dict

returns:

Response Syntax

{
    'Patches': [
        {
            'Title': 'string',
            'KBId': 'string',
            'Classification': 'string',
            'Severity': 'string',
            'State': 'INSTALLED'|'INSTALLED_OTHER'|'INSTALLED_PENDING_REBOOT'|'INSTALLED_REJECTED'|'MISSING'|'NOT_APPLICABLE'|'FAILED'|'AVAILABLE_SECURITY_UPDATE',
            'InstalledTime': datetime(2015, 1, 1),
            'CVEIds': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Patches (list) --

      Each entry in the array is a structure containing:

      • Title (string)

      • KBId (string)

      • Classification (string)

      • Severity (string)

      • State (string, such as "INSTALLED" or "FAILED")

      • InstalledTime (DateTime)

      • InstalledBy (string)

      • (dict) --

        Information about the state of a patch on a particular managed node as it relates to the patch baseline used to patch the node.

        • Title (string) --

          The title of the patch.

        • KBId (string) --

          The operating system-specific ID of the patch.

        • Classification (string) --

          The classification of the patch, such as SecurityUpdates, Updates, and CriticalUpdates.

        • Severity (string) --

          The severity of the patch such as Critical, Important, and Moderate.

        • State (string) --

          The state of the patch on the managed node, such as INSTALLED or FAILED.

          For descriptions of each patch state, see About patch compliance in the Amazon Web Services Systems Manager User Guide.

        • InstalledTime (datetime) --

          The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.

        • CVEIds (string) --

          The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

DescribePatchGroupState (updated) Link ¶
Changes (response)
{'InstancesWithAvailableSecurityUpdates': 'integer'}

Returns high-level aggregated patch compliance state information for a patch group.

See also: AWS API Documentation

Request Syntax

client.describe_patch_group_state(
    PatchGroup='string'
)
type PatchGroup:

string

param PatchGroup:

[REQUIRED]

The name of the patch group whose patch snapshot should be retrieved.

rtype:

dict

returns:

Response Syntax

{
    'Instances': 123,
    'InstancesWithInstalledPatches': 123,
    'InstancesWithInstalledOtherPatches': 123,
    'InstancesWithInstalledPendingRebootPatches': 123,
    'InstancesWithInstalledRejectedPatches': 123,
    'InstancesWithMissingPatches': 123,
    'InstancesWithFailedPatches': 123,
    'InstancesWithNotApplicablePatches': 123,
    'InstancesWithUnreportedNotApplicablePatches': 123,
    'InstancesWithCriticalNonCompliantPatches': 123,
    'InstancesWithSecurityNonCompliantPatches': 123,
    'InstancesWithOtherNonCompliantPatches': 123,
    'InstancesWithAvailableSecurityUpdates': 123
}

Response Structure

  • (dict) --

    • Instances (integer) --

      The number of managed nodes in the patch group.

    • InstancesWithInstalledPatches (integer) --

      The number of managed nodes with installed patches.

    • InstancesWithInstalledOtherPatches (integer) --

      The number of managed nodes with patches installed that aren't defined in the patch baseline.

    • InstancesWithInstalledPendingRebootPatches (integer) --

      The number of managed nodes with patches installed by Patch Manager that haven't been rebooted after the patch installation. The status of these managed nodes is NON_COMPLIANT.

    • InstancesWithInstalledRejectedPatches (integer) --

      The number of managed nodes with patches installed that are specified in a RejectedPatches list. Patches with a status of INSTALLED_REJECTED were typically installed before they were added to a RejectedPatches list.

    • InstancesWithMissingPatches (integer) --

      The number of managed nodes with missing patches from the patch baseline.

    • InstancesWithFailedPatches (integer) --

      The number of managed nodes with patches from the patch baseline that failed to install.

    • InstancesWithNotApplicablePatches (integer) --

      The number of managed nodes with patches that aren't applicable.

    • InstancesWithUnreportedNotApplicablePatches (integer) --

      The number of managed nodes with NotApplicable patches beyond the supported limit, which aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services Systems Manager.

    • InstancesWithCriticalNonCompliantPatches (integer) --

      The number of managed nodes where patches 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.

    • InstancesWithSecurityNonCompliantPatches (integer) --

      The number of managed nodes where patches 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.

    • InstancesWithOtherNonCompliantPatches (integer) --

      The number of managed nodes with patches installed 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.

    • InstancesWithAvailableSecurityUpdates (integer) --

      The number of managed nodes for which security-related patches are available but not approved because 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.

GetDeployablePatchSnapshotForInstance (updated) Link ¶
Changes (request)
{'BaselineOverride': {'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT | '
                                                                  'NON_COMPLIANT'}}

Retrieves the current snapshot for the patch baseline the managed node uses. This API is primarily used by the AWS-RunPatchBaseline Systems Manager document (SSM document).

See also: AWS API Documentation

Request Syntax

client.get_deployable_patch_snapshot_for_instance(
    InstanceId='string',
    SnapshotId='string',
    BaselineOverride={
        'OperatingSystem': 'WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'AMAZON_LINUX_2022'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN'|'MACOS'|'RASPBIAN'|'ROCKY_LINUX'|'ALMA_LINUX'|'AMAZON_LINUX_2023',
        'GlobalFilters': {
            'PatchFilters': [
                {
                    'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                    'Values': [
                        'string',
                    ]
                },
            ]
        },
        'ApprovalRules': {
            'PatchRules': [
                {
                    'PatchFilterGroup': {
                        'PatchFilters': [
                            {
                                'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                                'Values': [
                                    'string',
                                ]
                            },
                        ]
                    },
                    'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
                    'ApproveAfterDays': 123,
                    'ApproveUntilDate': 'string',
                    'EnableNonSecurity': True|False
                },
            ]
        },
        'ApprovedPatches': [
            'string',
        ],
        'ApprovedPatchesComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
        'RejectedPatches': [
            'string',
        ],
        'RejectedPatchesAction': 'ALLOW_AS_DEPENDENCY'|'BLOCK',
        'ApprovedPatchesEnableNonSecurity': True|False,
        'Sources': [
            {
                'Name': 'string',
                'Products': [
                    'string',
                ],
                'Configuration': 'string'
            },
        ],
        'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT'|'NON_COMPLIANT'
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The ID of the managed node for which the appropriate patch snapshot should be retrieved.

type SnapshotId:

string

param SnapshotId:

[REQUIRED]

The snapshot ID provided by the user when running AWS-RunPatchBaseline.

type BaselineOverride:

dict

param BaselineOverride:

Defines the basic information about a patch baseline override.

  • OperatingSystem (string) --

    The operating system rule used by the patch baseline override.

  • GlobalFilters (dict) --

    A set of patch filters, typically used for approval rules.

    • PatchFilters (list) -- [REQUIRED]

      The set of patch filters that make up the group.

      • (dict) --

        Defines which patches should be included in a patch baseline.

        A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

        The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

        You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

        • Key (string) -- [REQUIRED]

          The key for the filter.

          Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

        • Values (list) -- [REQUIRED]

          The value for the filter key.

          Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

          • (string) --

  • ApprovalRules (dict) --

    A set of rules defining the approval rules for a patch baseline.

    • PatchRules (list) -- [REQUIRED]

      The rules that make up the rule group.

      • (dict) --

        Defines an approval rule for a patch baseline.

        • PatchFilterGroup (dict) -- [REQUIRED]

          The patch filter group that defines the criteria for the rule.

          • PatchFilters (list) -- [REQUIRED]

            The set of patch filters that make up the group.

            • (dict) --

              Defines which patches should be included in a patch baseline.

              A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

              The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

              You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

              • Key (string) -- [REQUIRED]

                The key for the filter.

                Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

              • Values (list) -- [REQUIRED]

                The value for the filter key.

                Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

                • (string) --

        • ComplianceLevel (string) --

          A compliance severity level for all approved patches in a patch baseline.

        • ApproveAfterDays (integer) --

          The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of 7 means that patches are approved seven days after they are released.

          This parameter is marked as Required: No, but your request must include a value for either ApproveAfterDays or ApproveUntilDate.

          Not supported for Debian Server or Ubuntu Server.

        • ApproveUntilDate (string) --

          The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically.

          Enter dates in the format YYYY-MM-DD. For example, 2024-12-31.

          This parameter is marked as Required: No, but your request must include a value for either ApproveUntilDate or ApproveAfterDays.

          Not supported for Debian Server or Ubuntu Server.

        • EnableNonSecurity (boolean) --

          For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is false. Applies to Linux managed nodes only.

  • ApprovedPatches (list) --

    A list of explicitly approved patches for the baseline.

    For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

    • (string) --

  • ApprovedPatchesComplianceLevel (string) --

    Defines the compliance level for approved patches. When an approved patch is reported as missing, this value describes the severity of the compliance violation.

  • RejectedPatches (list) --

    A list of explicitly rejected patches for the baseline.

    For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

    • (string) --

  • RejectedPatchesAction (string) --

    The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.

  • ApprovedPatchesEnableNonSecurity (boolean) --

    Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

  • Sources (list) --

    Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

    • (dict) --

      Information about the patches to use to update the managed nodes, including target operating systems and source repository. Applies to Linux managed nodes only.

      • Name (string) -- [REQUIRED]

        The name specified to identify the patch source.

      • Products (list) -- [REQUIRED]

        The specific operating system versions a patch repository applies to, such as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". For lists of supported product values, see PatchFilter.

        • (string) --

      • Configuration (string) -- [REQUIRED]

        The value of the yum repo configuration. For example:

        [main]

        name=MyCustomRepository

        baseurl=https://my-custom-repository

        enabled=1

  • AvailableSecurityUpdatesComplianceStatus (string) --

    Indicates whether managed nodes for which there are available security-related patches that have not been approved by the baseline are being defined as COMPLIANT or NON_COMPLIANT. This option is specified when the CreatePatchBaseline or UpdatePatchBaseline commands are run.

    Applies to Windows Server managed nodes only.

rtype:

dict

returns:

Response Syntax

{
    'InstanceId': 'string',
    'SnapshotId': 'string',
    'SnapshotDownloadUrl': 'string',
    'Product': 'string'
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The managed node ID.

    • SnapshotId (string) --

      The user-defined snapshot ID.

    • SnapshotDownloadUrl (string) --

      A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.

    • Product (string) --

      Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.

GetPatchBaseline (updated) Link ¶
Changes (response)
{'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT | NON_COMPLIANT'}

Retrieves information about a patch baseline.

See also: AWS API Documentation

Request Syntax

client.get_patch_baseline(
    BaselineId='string'
)
type BaselineId:

string

param BaselineId:

[REQUIRED]

The ID of the patch baseline to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'BaselineId': 'string',
    'Name': 'string',
    'OperatingSystem': 'WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'AMAZON_LINUX_2022'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN'|'MACOS'|'RASPBIAN'|'ROCKY_LINUX'|'ALMA_LINUX'|'AMAZON_LINUX_2023',
    'GlobalFilters': {
        'PatchFilters': [
            {
                'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                'Values': [
                    'string',
                ]
            },
        ]
    },
    'ApprovalRules': {
        'PatchRules': [
            {
                'PatchFilterGroup': {
                    'PatchFilters': [
                        {
                            'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                            'Values': [
                                'string',
                            ]
                        },
                    ]
                },
                'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
                'ApproveAfterDays': 123,
                'ApproveUntilDate': 'string',
                'EnableNonSecurity': True|False
            },
        ]
    },
    'ApprovedPatches': [
        'string',
    ],
    'ApprovedPatchesComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
    'ApprovedPatchesEnableNonSecurity': True|False,
    'RejectedPatches': [
        'string',
    ],
    'RejectedPatchesAction': 'ALLOW_AS_DEPENDENCY'|'BLOCK',
    'PatchGroups': [
        'string',
    ],
    'CreatedDate': datetime(2015, 1, 1),
    'ModifiedDate': datetime(2015, 1, 1),
    'Description': 'string',
    'Sources': [
        {
            'Name': 'string',
            'Products': [
                'string',
            ],
            'Configuration': 'string'
        },
    ],
    'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT'|'NON_COMPLIANT'
}

Response Structure

  • (dict) --

    • BaselineId (string) --

      The ID of the retrieved patch baseline.

    • Name (string) --

      The name of the patch baseline.

    • OperatingSystem (string) --

      Returns the operating system specified for the patch baseline.

    • GlobalFilters (dict) --

      A set of global filters used to exclude patches from the baseline.

      • PatchFilters (list) --

        The set of patch filters that make up the group.

        • (dict) --

          Defines which patches should be included in a patch baseline.

          A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

          The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

          You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

          • Key (string) --

            The key for the filter.

            Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

          • Values (list) --

            The value for the filter key.

            Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

            • (string) --

    • ApprovalRules (dict) --

      A set of rules used to include patches in the baseline.

      • PatchRules (list) --

        The rules that make up the rule group.

        • (dict) --

          Defines an approval rule for a patch baseline.

          • PatchFilterGroup (dict) --

            The patch filter group that defines the criteria for the rule.

            • PatchFilters (list) --

              The set of patch filters that make up the group.

              • (dict) --

                Defines which patches should be included in a patch baseline.

                A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

                The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

                You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

                • Key (string) --

                  The key for the filter.

                  Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

                • Values (list) --

                  The value for the filter key.

                  Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

                  • (string) --

          • ComplianceLevel (string) --

            A compliance severity level for all approved patches in a patch baseline.

          • ApproveAfterDays (integer) --

            The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of 7 means that patches are approved seven days after they are released.

            This parameter is marked as Required: No, but your request must include a value for either ApproveAfterDays or ApproveUntilDate.

            Not supported for Debian Server or Ubuntu Server.

          • ApproveUntilDate (string) --

            The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically.

            Enter dates in the format YYYY-MM-DD. For example, 2024-12-31.

            This parameter is marked as Required: No, but your request must include a value for either ApproveUntilDate or ApproveAfterDays.

            Not supported for Debian Server or Ubuntu Server.

          • EnableNonSecurity (boolean) --

            For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is false. Applies to Linux managed nodes only.

    • ApprovedPatches (list) --

      A list of explicitly approved patches for the baseline.

      • (string) --

    • ApprovedPatchesComplianceLevel (string) --

      Returns the specified compliance severity level for approved patches in the patch baseline.

    • ApprovedPatchesEnableNonSecurity (boolean) --

      Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

    • RejectedPatches (list) --

      A list of explicitly rejected patches for the baseline.

      • (string) --

    • RejectedPatchesAction (string) --

      The action specified to take on patches included in the RejectedPatches list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.

    • PatchGroups (list) --

      Patch groups included in the patch baseline.

      • (string) --

    • CreatedDate (datetime) --

      The date the patch baseline was created.

    • ModifiedDate (datetime) --

      The date the patch baseline was last modified.

    • Description (string) --

      A description of the patch baseline.

    • Sources (list) --

      Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

      • (dict) --

        Information about the patches to use to update the managed nodes, including target operating systems and source repository. Applies to Linux managed nodes only.

        • Name (string) --

          The name specified to identify the patch source.

        • Products (list) --

          The specific operating system versions a patch repository applies to, such as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". For lists of supported product values, see PatchFilter.

          • (string) --

        • Configuration (string) --

          The value of the yum repo configuration. For example:

          [main]

          name=MyCustomRepository

          baseurl=https://my-custom-repository

          enabled=1

    • AvailableSecurityUpdatesComplianceStatus (string) --

      Indicates the compliance status of managed nodes for which security-related patches are available but were not approved. This preference is specified when the CreatePatchBaseline or UpdatePatchBaseline commands are run.

      Applies to Windows Server managed nodes only.

UpdatePatchBaseline (updated) Link ¶
Changes (both)
{'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT | NON_COMPLIANT'}

Modifies an existing patch baseline. Fields not specified in the request are left unchanged.

See also: AWS API Documentation

Request Syntax

client.update_patch_baseline(
    BaselineId='string',
    Name='string',
    GlobalFilters={
        'PatchFilters': [
            {
                'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                'Values': [
                    'string',
                ]
            },
        ]
    },
    ApprovalRules={
        'PatchRules': [
            {
                'PatchFilterGroup': {
                    'PatchFilters': [
                        {
                            'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                            'Values': [
                                'string',
                            ]
                        },
                    ]
                },
                'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
                'ApproveAfterDays': 123,
                'ApproveUntilDate': 'string',
                'EnableNonSecurity': True|False
            },
        ]
    },
    ApprovedPatches=[
        'string',
    ],
    ApprovedPatchesComplianceLevel='CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
    ApprovedPatchesEnableNonSecurity=True|False,
    RejectedPatches=[
        'string',
    ],
    RejectedPatchesAction='ALLOW_AS_DEPENDENCY'|'BLOCK',
    Description='string',
    Sources=[
        {
            'Name': 'string',
            'Products': [
                'string',
            ],
            'Configuration': 'string'
        },
    ],
    AvailableSecurityUpdatesComplianceStatus='COMPLIANT'|'NON_COMPLIANT',
    Replace=True|False
)
type BaselineId:

string

param BaselineId:

[REQUIRED]

The ID of the patch baseline to update.

type Name:

string

param Name:

The name of the patch baseline.

type GlobalFilters:

dict

param GlobalFilters:

A set of global filters used to include patches in the baseline.

  • PatchFilters (list) -- [REQUIRED]

    The set of patch filters that make up the group.

    • (dict) --

      Defines which patches should be included in a patch baseline.

      A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

      The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

      You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

      • Key (string) -- [REQUIRED]

        The key for the filter.

        Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

      • Values (list) -- [REQUIRED]

        The value for the filter key.

        Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

        • (string) --

type ApprovalRules:

dict

param ApprovalRules:

A set of rules used to include patches in the baseline.

  • PatchRules (list) -- [REQUIRED]

    The rules that make up the rule group.

    • (dict) --

      Defines an approval rule for a patch baseline.

      • PatchFilterGroup (dict) -- [REQUIRED]

        The patch filter group that defines the criteria for the rule.

        • PatchFilters (list) -- [REQUIRED]

          The set of patch filters that make up the group.

          • (dict) --

            Defines which patches should be included in a patch baseline.

            A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

            The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

            You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

            • Key (string) -- [REQUIRED]

              The key for the filter.

              Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

            • Values (list) -- [REQUIRED]

              The value for the filter key.

              Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

              • (string) --

      • ComplianceLevel (string) --

        A compliance severity level for all approved patches in a patch baseline.

      • ApproveAfterDays (integer) --

        The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of 7 means that patches are approved seven days after they are released.

        This parameter is marked as Required: No, but your request must include a value for either ApproveAfterDays or ApproveUntilDate.

        Not supported for Debian Server or Ubuntu Server.

      • ApproveUntilDate (string) --

        The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically.

        Enter dates in the format YYYY-MM-DD. For example, 2024-12-31.

        This parameter is marked as Required: No, but your request must include a value for either ApproveUntilDate or ApproveAfterDays.

        Not supported for Debian Server or Ubuntu Server.

      • EnableNonSecurity (boolean) --

        For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is false. Applies to Linux managed nodes only.

type ApprovedPatches:

list

param ApprovedPatches:

A list of explicitly approved patches for the baseline.

For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • (string) --

type ApprovedPatchesComplianceLevel:

string

param ApprovedPatchesComplianceLevel:

Assigns a new compliance severity level to an existing patch baseline.

type ApprovedPatchesEnableNonSecurity:

boolean

param ApprovedPatchesEnableNonSecurity:

Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

type RejectedPatches:

list

param RejectedPatches:

A list of explicitly rejected patches for the baseline.

For information about accepted formats for lists of approved patches and rejected patches, see Package name formats for approved and rejected patch lists in the Amazon Web Services Systems Manager User Guide.

  • (string) --

type RejectedPatchesAction:

string

param RejectedPatchesAction:

The action for Patch Manager to take on patches included in the RejectedPackages list.

ALLOW_AS_DEPENDENCY

Linux and macOS: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as INSTALLED_OTHER. This is the default action if no option is specified.

Windows Server: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as INSTALLED_OTHER. Any package not already installed on the node is skipped. This is the default action if no option is specified.

BLOCK

All OSs: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances. If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as INSTALLED_REJECTED.

type Description:

string

param Description:

A description of the patch baseline.

type Sources:

list

param Sources:

Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

  • (dict) --

    Information about the patches to use to update the managed nodes, including target operating systems and source repository. Applies to Linux managed nodes only.

    • Name (string) -- [REQUIRED]

      The name specified to identify the patch source.

    • Products (list) -- [REQUIRED]

      The specific operating system versions a patch repository applies to, such as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". For lists of supported product values, see PatchFilter.

      • (string) --

    • Configuration (string) -- [REQUIRED]

      The value of the yum repo configuration. For example:

      [main]

      name=MyCustomRepository

      baseurl=https://my-custom-repository

      enabled=1

type AvailableSecurityUpdatesComplianceStatus:

string

param AvailableSecurityUpdatesComplianceStatus:

Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.

Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.

Supported for Windows Server managed nodes only.

type Replace:

boolean

param Replace:

If True, then all fields that are required by the CreatePatchBaseline operation are also required for this API request. Optional fields that aren't specified are set to null.

rtype:

dict

returns:

Response Syntax

{
    'BaselineId': 'string',
    'Name': 'string',
    'OperatingSystem': 'WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'AMAZON_LINUX_2022'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN'|'MACOS'|'RASPBIAN'|'ROCKY_LINUX'|'ALMA_LINUX'|'AMAZON_LINUX_2023',
    'GlobalFilters': {
        'PatchFilters': [
            {
                'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                'Values': [
                    'string',
                ]
            },
        ]
    },
    'ApprovalRules': {
        'PatchRules': [
            {
                'PatchFilterGroup': {
                    'PatchFilters': [
                        {
                            'Key': 'ARCH'|'ADVISORY_ID'|'BUGZILLA_ID'|'PATCH_SET'|'PRODUCT'|'PRODUCT_FAMILY'|'CLASSIFICATION'|'CVE_ID'|'EPOCH'|'MSRC_SEVERITY'|'NAME'|'PATCH_ID'|'SECTION'|'PRIORITY'|'REPOSITORY'|'RELEASE'|'SEVERITY'|'SECURITY'|'VERSION',
                            'Values': [
                                'string',
                            ]
                        },
                    ]
                },
                'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
                'ApproveAfterDays': 123,
                'ApproveUntilDate': 'string',
                'EnableNonSecurity': True|False
            },
        ]
    },
    'ApprovedPatches': [
        'string',
    ],
    'ApprovedPatchesComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED',
    'ApprovedPatchesEnableNonSecurity': True|False,
    'RejectedPatches': [
        'string',
    ],
    'RejectedPatchesAction': 'ALLOW_AS_DEPENDENCY'|'BLOCK',
    'CreatedDate': datetime(2015, 1, 1),
    'ModifiedDate': datetime(2015, 1, 1),
    'Description': 'string',
    'Sources': [
        {
            'Name': 'string',
            'Products': [
                'string',
            ],
            'Configuration': 'string'
        },
    ],
    'AvailableSecurityUpdatesComplianceStatus': 'COMPLIANT'|'NON_COMPLIANT'
}

Response Structure

  • (dict) --

    • BaselineId (string) --

      The ID of the deleted patch baseline.

    • Name (string) --

      The name of the patch baseline.

    • OperatingSystem (string) --

      The operating system rule used by the updated patch baseline.

    • GlobalFilters (dict) --

      A set of global filters used to exclude patches from the baseline.

      • PatchFilters (list) --

        The set of patch filters that make up the group.

        • (dict) --

          Defines which patches should be included in a patch baseline.

          A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

          The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

          You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

          • Key (string) --

            The key for the filter.

            Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

          • Values (list) --

            The value for the filter key.

            Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

            • (string) --

    • ApprovalRules (dict) --

      A set of rules used to include patches in the baseline.

      • PatchRules (list) --

        The rules that make up the rule group.

        • (dict) --

          Defines an approval rule for a patch baseline.

          • PatchFilterGroup (dict) --

            The patch filter group that defines the criteria for the rule.

            • PatchFilters (list) --

              The set of patch filters that make up the group.

              • (dict) --

                Defines which patches should be included in a patch baseline.

                A patch filter consists of a key and a set of values. The filter key is a patch property. For example, the available filter keys for WINDOWS are PATCH_SET, PRODUCT, PRODUCT_FAMILY, CLASSIFICATION, and MSRC_SEVERITY.

                The filter values define a matching criterion for the patch property indicated by the key. For example, if the filter key is PRODUCT and the filter values are ["Office 2013", "Office 2016"], then the filter accepts all patches where product name is either "Office 2013" or "Office 2016". The filter values can be exact values for the patch property given as a key, or a wildcard (*), which matches all values.

                You can view lists of valid values for the patch properties by running the DescribePatchProperties command. For information about which patch properties can be used with each major operating system, see DescribePatchProperties.

                • Key (string) --

                  The key for the filter.

                  Run the DescribePatchProperties command to view lists of valid keys for each operating system type.

                • Values (list) --

                  The value for the filter key.

                  Run the DescribePatchProperties command to view lists of valid values for each key based on operating system type.

                  • (string) --

          • ComplianceLevel (string) --

            A compliance severity level for all approved patches in a patch baseline.

          • ApproveAfterDays (integer) --

            The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of 7 means that patches are approved seven days after they are released.

            This parameter is marked as Required: No, but your request must include a value for either ApproveAfterDays or ApproveUntilDate.

            Not supported for Debian Server or Ubuntu Server.

          • ApproveUntilDate (string) --

            The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically.

            Enter dates in the format YYYY-MM-DD. For example, 2024-12-31.

            This parameter is marked as Required: No, but your request must include a value for either ApproveUntilDate or ApproveAfterDays.

            Not supported for Debian Server or Ubuntu Server.

          • EnableNonSecurity (boolean) --

            For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is false. Applies to Linux managed nodes only.

    • ApprovedPatches (list) --

      A list of explicitly approved patches for the baseline.

      • (string) --

    • ApprovedPatchesComplianceLevel (string) --

      The compliance severity level assigned to the patch baseline after the update completed.

    • ApprovedPatchesEnableNonSecurity (boolean) --

      Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is false. Applies to Linux managed nodes only.

    • RejectedPatches (list) --

      A list of explicitly rejected patches for the baseline.

      • (string) --

    • RejectedPatchesAction (string) --

      The action specified to take on patches included in the RejectedPatches list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.

    • CreatedDate (datetime) --

      The date when the patch baseline was created.

    • ModifiedDate (datetime) --

      The date when the patch baseline was last modified.

    • Description (string) --

      A description of the patch baseline.

    • Sources (list) --

      Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.

      • (dict) --

        Information about the patches to use to update the managed nodes, including target operating systems and source repository. Applies to Linux managed nodes only.

        • Name (string) --

          The name specified to identify the patch source.

        • Products (list) --

          The specific operating system versions a patch repository applies to, such as "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". For lists of supported product values, see PatchFilter.

          • (string) --

        • Configuration (string) --

          The value of the yum repo configuration. For example:

          [main]

          name=MyCustomRepository

          baseurl=https://my-custom-repository

          enabled=1

    • AvailableSecurityUpdatesComplianceStatus (string) --

      Indicates the compliance status of managed nodes for which security-related patches are available but were not approved. This preference is specified when the CreatePatchBaseline or UpdatePatchBaseline commands are run.

      Applies to Windows Server managed nodes only.