2020/10/15 - Amazon Simple Systems Manager (SSM) - 5 updated api methods
Changes Update ssm client to latest version
{'ApprovalRules': {'PatchRules': {'PatchFilterGroup': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}}, 'GlobalFilters': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}
Creates a patch baseline.
See also: AWS API Documentation
Request Syntax
client.create_patch_baseline( OperatingSystem='WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN', 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' }, ], ClientToken='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
Defines the operating system the patch baseline applies to. The Default value is WINDOWS.
string
[REQUIRED]
The name of the patch baseline.
dict
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) --
dict
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. Not supported on Ubuntu Server.
ApproveUntilDate (string) --
The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Ubuntu Server.
Enter dates in the format YYYY-MM-DD. For example, 2020-12-31.
EnableNonSecurity (boolean) --
For instances 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 instances only.
list
A list of explicitly approved patches for the baseline.
For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.
(string) --
string
Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. The default value is UNSPECIFIED.
boolean
Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. The default value is 'false'. Applies to Linux instances only.
list
A list of explicitly rejected patches for the baseline.
For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.
(string) --
string
The action for Patch Manager to take on patches included in the RejectedPackages list.
ALLOW_AS_DEPENDENCY: 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 InstalledOther. This is the default action if no option is specified.
BLOCK: Packages in the RejectedPatches list, and packages that include them as dependencies, are not installed under any circumstances. If a package was installed before it was added to the Rejected patches list, it is considered non-compliant with the patch baseline, and its status is reported as InstalledRejected.
string
A description of the patch baseline.
list
Information about the patches to use to update the instances, including target operating systems and source repositories. Applies to Linux instances only.
(dict) --
Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances 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]
cachedir=/var/cache/yum/$basesearch$releasever
keepcache=0
debuglevel=2
string
User-provided idempotency token.
This field is autopopulated if not provided.
list
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 name/value pairs:
Key=PatchSeverity,Value=Critical
Key=OS,Value=Windows
(dict) --
Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
Response Syntax
{ 'BaselineId': 'string' }
Response Structure
(dict) --
BaselineId (string) --
The ID of the created patch baseline.
{'Patches': {'AdvisoryIds': ['string'], 'Arch': 'string', 'BugzillaIds': ['string'], 'CVEIds': ['string'], 'Epoch': 'integer', 'Name': 'string', 'Release': 'string', 'Repository': 'string', 'Severity': 'string', 'Version': 'string'}}
Lists all patches eligible to be included in a patch baseline.
See also: AWS API Documentation
Request Syntax
client.describe_available_patches( Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
Filters used to scope down the returned patches.
(dict) --
Defines a filter used in Patch Manager APIs.
Key (string) --
The key for the filter.
Values (list) --
The value for the filter.
(string) --
integer
The maximum number of patches to return (per page).
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
Response Syntax
{ 'Patches': [ { 'Id': 'string', 'ReleaseDate': datetime(2015, 1, 1), 'Title': 'string', 'Description': 'string', 'ContentUrl': 'string', 'Vendor': 'string', 'ProductFamily': 'string', 'Product': 'string', 'Classification': 'string', 'MsrcSeverity': 'string', 'KbNumber': 'string', 'MsrcNumber': 'string', 'Language': 'string', 'AdvisoryIds': [ 'string', ], 'BugzillaIds': [ 'string', ], 'CVEIds': [ 'string', ], 'Name': 'string', 'Epoch': 123, 'Version': 'string', 'Release': 'string', 'Arch': 'string', 'Severity': 'string', 'Repository': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Patches (list) --
An array of patches. Each entry in the array is a patch structure.
(dict) --
Represents metadata about a patch.
Id (string) --
The ID of the patch. Applies to Windows patches only.
ReleaseDate (datetime) --
The date the patch was released.
Title (string) --
The title of the patch.
Description (string) --
The description of the patch.
ContentUrl (string) --
The URL where more information can be obtained about the patch.
Vendor (string) --
The name of the vendor providing the patch.
ProductFamily (string) --
The product family the patch is applicable for. For example, Windows or Amazon Linux 2.
Product (string) --
The specific product the patch is applicable for. For example, WindowsServer2016 or AmazonLinux2018.03.
Classification (string) --
The classification of the patch. For example, SecurityUpdates, Updates, or CriticalUpdates.
MsrcSeverity (string) --
The severity of the patch, such as Critical, Important, or Moderate. Applies to Windows patches only.
KbNumber (string) --
The Microsoft Knowledge Base ID of the patch. Applies to Windows patches only.
MsrcNumber (string) --
The ID of the Microsoft Security Response Center (MSRC) bulletin the patch is related to. For example, MS14-045. Applies to Windows patches only.
Language (string) --
The language of the patch if it's language-specific.
AdvisoryIds (list) --
The Advisory ID of the patch. For example, RHSA-2020:3779. Applies to Linux-based instances only.
(string) --
BugzillaIds (list) --
The Bugzilla ID of the patch. For example, 1600646. Applies to Linux-based instances only.
(string) --
CVEIds (list) --
The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example, CVE-1999-0067. Applies to Linux-based instances only.
(string) --
Name (string) --
The name of the patch. Applies to Linux-based instances only.
Epoch (integer) --
The epoch of the patch. For example in pkg-example-EE-20180914-2.2.amzn1.noarch, the epoch value is 20180914-2. Applies to Linux-based instances only.
Version (string) --
The version number of the patch. For example, in example-pkg-1.710.10-2.7.abcd.x86_64, the version number is indicated by -1. Applies to Linux-based instances only.
Release (string) --
The particular release of a patch. For example, in pkg-example-EE-20180914-2.2.amzn1.noarch, the release is 2.amaz1. Applies to Linux-based instances only.
Arch (string) --
The architecture of the patch. For example, in example-pkg-0.710.10-2.7.abcd.x86_64, the architecture is indicated by x86_64. Applies to Linux-based instances only.
Severity (string) --
The severity level of the patch. For example, CRITICAL or MODERATE.
Repository (string) --
The source patch repository for the operating system and version, such as trusty-security for Ubuntu Server 14.04 LTE and focal-security for Ubuntu Server 20.04 LTE. Applies to Linux-based instances only.
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.
{'EffectivePatches': {'Patch': {'AdvisoryIds': ['string'], 'Arch': 'string', 'BugzillaIds': ['string'], 'CVEIds': ['string'], 'Epoch': 'integer', 'Name': 'string', 'Release': 'string', 'Repository': 'string', 'Severity': 'string', 'Version': 'string'}}}
Retrieves the current effective patches (the patch and the approval state) for the specified patch baseline. Note that this API applies only to Windows patch baselines.
See also: AWS API Documentation
Request Syntax
client.describe_effective_patches_for_patch_baseline( BaselineId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the patch baseline to retrieve the effective patches for.
integer
The maximum number of patches to return (per page).
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
Response Syntax
{ 'EffectivePatches': [ { 'Patch': { 'Id': 'string', 'ReleaseDate': datetime(2015, 1, 1), 'Title': 'string', 'Description': 'string', 'ContentUrl': 'string', 'Vendor': 'string', 'ProductFamily': 'string', 'Product': 'string', 'Classification': 'string', 'MsrcSeverity': 'string', 'KbNumber': 'string', 'MsrcNumber': 'string', 'Language': 'string', 'AdvisoryIds': [ 'string', ], 'BugzillaIds': [ 'string', ], 'CVEIds': [ 'string', ], 'Name': 'string', 'Epoch': 123, 'Version': 'string', 'Release': 'string', 'Arch': 'string', 'Severity': 'string', 'Repository': 'string' }, 'PatchStatus': { 'DeploymentStatus': 'APPROVED'|'PENDING_APPROVAL'|'EXPLICIT_APPROVED'|'EXPLICIT_REJECTED', 'ComplianceLevel': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'INFORMATIONAL'|'UNSPECIFIED', 'ApprovalDate': datetime(2015, 1, 1) } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
EffectivePatches (list) --
An array of patches and patch status.
(dict) --
The EffectivePatch structure defines metadata about a patch along with the approval state of the patch in a particular patch baseline. The approval state includes information about whether the patch is currently approved, due to be approved by a rule, explicitly approved, or explicitly rejected and the date the patch was or will be approved.
Patch (dict) --
Provides metadata for a patch, including information such as the KB ID, severity, classification and a URL for where more information can be obtained about the patch.
Id (string) --
The ID of the patch. Applies to Windows patches only.
ReleaseDate (datetime) --
The date the patch was released.
Title (string) --
The title of the patch.
Description (string) --
The description of the patch.
ContentUrl (string) --
The URL where more information can be obtained about the patch.
Vendor (string) --
The name of the vendor providing the patch.
ProductFamily (string) --
The product family the patch is applicable for. For example, Windows or Amazon Linux 2.
Product (string) --
The specific product the patch is applicable for. For example, WindowsServer2016 or AmazonLinux2018.03.
Classification (string) --
The classification of the patch. For example, SecurityUpdates, Updates, or CriticalUpdates.
MsrcSeverity (string) --
The severity of the patch, such as Critical, Important, or Moderate. Applies to Windows patches only.
KbNumber (string) --
The Microsoft Knowledge Base ID of the patch. Applies to Windows patches only.
MsrcNumber (string) --
The ID of the Microsoft Security Response Center (MSRC) bulletin the patch is related to. For example, MS14-045. Applies to Windows patches only.
Language (string) --
The language of the patch if it's language-specific.
AdvisoryIds (list) --
The Advisory ID of the patch. For example, RHSA-2020:3779. Applies to Linux-based instances only.
(string) --
BugzillaIds (list) --
The Bugzilla ID of the patch. For example, 1600646. Applies to Linux-based instances only.
(string) --
CVEIds (list) --
The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example, CVE-1999-0067. Applies to Linux-based instances only.
(string) --
Name (string) --
The name of the patch. Applies to Linux-based instances only.
Epoch (integer) --
The epoch of the patch. For example in pkg-example-EE-20180914-2.2.amzn1.noarch, the epoch value is 20180914-2. Applies to Linux-based instances only.
Version (string) --
The version number of the patch. For example, in example-pkg-1.710.10-2.7.abcd.x86_64, the version number is indicated by -1. Applies to Linux-based instances only.
Release (string) --
The particular release of a patch. For example, in pkg-example-EE-20180914-2.2.amzn1.noarch, the release is 2.amaz1. Applies to Linux-based instances only.
Arch (string) --
The architecture of the patch. For example, in example-pkg-0.710.10-2.7.abcd.x86_64, the architecture is indicated by x86_64. Applies to Linux-based instances only.
Severity (string) --
The severity level of the patch. For example, CRITICAL or MODERATE.
Repository (string) --
The source patch repository for the operating system and version, such as trusty-security for Ubuntu Server 14.04 LTE and focal-security for Ubuntu Server 20.04 LTE. Applies to Linux-based instances only.
PatchStatus (dict) --
The status of the patch in a patch baseline. This includes information about whether the patch is currently approved, due to be approved by a rule, explicitly approved, or explicitly rejected and the date the patch was or will be approved.
DeploymentStatus (string) --
The approval status of a patch (APPROVED, PENDING_APPROVAL, EXPLICIT_APPROVED, EXPLICIT_REJECTED).
ComplianceLevel (string) --
The compliance severity level for a patch.
ApprovalDate (datetime) --
The date the patch was approved (or will be approved if the status is PENDING_APPROVAL).
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.
{'ApprovalRules': {'PatchRules': {'PatchFilterGroup': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}}, 'GlobalFilters': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}
Retrieves information about a patch baseline.
See also: AWS API Documentation
Request Syntax
client.get_patch_baseline( BaselineId='string' )
string
[REQUIRED]
The ID of the patch baseline to retrieve.
dict
Response Syntax
{ 'BaselineId': 'string', 'Name': 'string', 'OperatingSystem': 'WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN', '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' }, ] }
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. Not supported on Ubuntu Server.
ApproveUntilDate (string) --
The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Ubuntu Server.
Enter dates in the format YYYY-MM-DD. For example, 2020-12-31.
EnableNonSecurity (boolean) --
For instances 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 instances 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 instances. The default value is 'false'. Applies to Linux instances 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 instances, including target operating systems and source repositories. Applies to Linux instances only.
(dict) --
Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances 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]
cachedir=/var/cache/yum/$basesearch$releasever
keepcache=0
debuglevel=2
{'ApprovalRules': {'PatchRules': {'PatchFilterGroup': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}}, 'GlobalFilters': {'PatchFilters': {'Key': {'ADVISORY_ID', 'ARCH', 'BUGZILLA_ID', 'CVE_ID', 'EPOCH', 'NAME', 'RELEASE', 'REPOSITORY', 'SECURITY', 'VERSION'}}}}
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' }, ], Replace=True|False )
string
[REQUIRED]
The ID of the patch baseline to update.
string
The name of the patch baseline.
dict
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) --
dict
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. Not supported on Ubuntu Server.
ApproveUntilDate (string) --
The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Ubuntu Server.
Enter dates in the format YYYY-MM-DD. For example, 2020-12-31.
EnableNonSecurity (boolean) --
For instances 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 instances only.
list
A list of explicitly approved patches for the baseline.
For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.
(string) --
string
Assigns a new compliance severity level to an existing patch baseline.
boolean
Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. The default value is 'false'. Applies to Linux instances only.
list
A list of explicitly rejected patches for the baseline.
For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.
(string) --
string
The action for Patch Manager to take on patches included in the RejectedPackages list.
ALLOW_AS_DEPENDENCY: 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 InstalledOther. This is the default action if no option is specified.
BLOCK: Packages in the RejectedPatches list, and packages that include them as dependencies, are not installed under any circumstances. If a package was installed before it was added to the Rejected patches list, it is considered non-compliant with the patch baseline, and its status is reported as InstalledRejected.
string
A description of the patch baseline.
list
Information about the patches to use to update the instances, including target operating systems and source repositories. Applies to Linux instances only.
(dict) --
Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances 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]
cachedir=/var/cache/yum/$basesearch$releasever
keepcache=0
debuglevel=2
boolean
If True, then all fields that are required by the CreatePatchBaseline action are also required for this API request. Optional fields that are not specified are set to null.
dict
Response Syntax
{ 'BaselineId': 'string', 'Name': 'string', 'OperatingSystem': 'WINDOWS'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'UBUNTU'|'REDHAT_ENTERPRISE_LINUX'|'SUSE'|'CENTOS'|'ORACLE_LINUX'|'DEBIAN', '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' }, ] }
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. Not supported on Ubuntu Server.
ApproveUntilDate (string) --
The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Ubuntu Server.
Enter dates in the format YYYY-MM-DD. For example, 2020-12-31.
EnableNonSecurity (boolean) --
For instances 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 instances 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 instances. The default value is 'false'. Applies to Linux instances 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 instances, including target operating systems and source repositories. Applies to Linux instances only.
(dict) --
Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances 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]
cachedir=/var/cache/yum/$basesearch$releasever
keepcache=0
debuglevel=2