create_patch_baseline
async
¶
create_patch_baseline(
name: BaselineName,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
operating_system: Optional[OperatingSystem] = None,
global_filters: Optional[PatchFilterGroup] = None,
approval_rules: Optional[PatchRuleGroup] = None,
approved_patches: Optional[PatchIdList] = None,
approved_patches_compliance_level: Optional[PatchComplianceLevel] = None,
approved_patches_enable_non_security: Optional[Boolean] = None,
rejected_patches: Optional[PatchIdList] = None,
rejected_patches_action: Optional[PatchAction] = None,
description: Optional[BaselineDescription] = None,
sources: Optional[PatchSourceList] = None,
available_security_updates_compliance_status: Optional[
PatchComplianceStatus
] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagList] = None,
) -> CreatePatchBaselineResult
Creates a patch baseline.
For information about valid key-value pairs in PatchFilters for each supported operating system type, see PatchFilter.
Parameters:
-
operating_system(Optional[OperatingSystem], default:None) –Defines the operating system the patch baseline applies to. The default value is
WINDOWS. -
name(BaselineName) –The name of the patch baseline.
-
global_filters(Optional[PatchFilterGroup], default:None) –A set of global filters used to include patches in the baseline.
The
GlobalFiltersparameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console. -
approval_rules(Optional[PatchRuleGroup], default:None) –A set of rules used to include patches in the baseline.
-
approved_patches(Optional[PatchIdList], default:None) –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.
-
approved_patches_compliance_level(Optional[PatchComplianceLevel], default:None) –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. -
approved_patches_enable_non_security(Optional[Boolean], default:None) –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. -
rejected_patches(Optional[PatchIdList], default:None) –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.
-
rejected_patches_action(Optional[PatchAction], default:None) –The action for Patch Manager to take on patches included in the
RejectedPackageslist.- 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.
State value assignment for patch compliance:
-
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. -
If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as
MISSINGforSCANoperations and asFAILEDforINSTALLoperations.
-
-
description(Optional[BaselineDescription], default:None) –A description of the patch baseline.
-
sources(Optional[PatchSourceList], default:None) –Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.
-
available_security_updates_compliance_status(Optional[PatchComplianceStatus], default:None) –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.
-
client_token(Optional[ClientToken], default:None) –User-provided idempotency token.
-
tags(Optional[TagList], default:None) –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
To add tags to an existing patch baseline, use the AddTagsToResource operation.
-
Raises:
-
IdempotentParameterMismatch–Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token.
-
InternalServerError–An error occurred on the server side.
-
ResourceLimitExceededException–Error returned when the caller has exceeded the default resource quotas. For example, too many maintenance windows or patch baselines have been created.
For information about resource quotas in Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 | |