Retrieves information about a patch baseline.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
get-patch-baseline
--baseline-id <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--baseline-id
(string)
The ID of the patch baseline to retrieve.
Note
To retrieve information about an Amazon Web Services managed patch baseline, specify the full Amazon Resource Name (ARN) of the baseline. For example, for the baseline
AWS-AmazonLinuxDefaultPatchBaseline
, specifyarn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7
instead ofpb-0e392de35e7c563b7
.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
To display a patch baseline
The following get-patch-baseline
example retrieves the details for the specified patch baseline.
aws ssm get-patch-baseline \
--baseline-id "pb-0123456789abcdef0"
Output:
{
"BaselineId": "pb-0123456789abcdef0",
"Name": "WindowsPatching",
"OperatingSystem": "WINDOWS",
"GlobalFilters": {
"PatchFilters": []
},
"ApprovalRules": {
"PatchRules": [
{
"PatchFilterGroup": {
"PatchFilters": [
{
"Key": "PRODUCT",
"Values": [
"WindowsServer2016"
]
}
]
},
"ComplianceLevel": "CRITICAL",
"ApproveAfterDays": 0,
"EnableNonSecurity": false
}
]
},
"ApprovedPatches": [],
"ApprovedPatchesComplianceLevel": "UNSPECIFIED",
"ApprovedPatchesEnableNonSecurity": false,
"RejectedPatches": [],
"RejectedPatchesAction": "ALLOW_AS_DEPENDENCY",
"PatchGroups": [
"QA",
"DEV"
],
"CreatedDate": 1550244180.465,
"ModifiedDate": 1550244180.465,
"Description": "Patches for Windows Servers",
"Sources": []
}
For more information, see About Patch Baselines in the AWS Systems Manager User Guide.
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 -> (structure)
A set of global filters used to exclude patches from the baseline.
PatchFilters -> (list)
The set of patch filters that make up the group.
(structure)
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
arePATCH_SET
,PRODUCT
,PRODUCT_FAMILY
,CLASSIFICATION
, andMSRC_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 -> (structure)
A set of rules used to include patches in the baseline.
PatchRules -> (list)
The rules that make up the rule group.
(structure)
Defines an approval rule for a patch baseline.
PatchFilterGroup -> (structure)
The patch filter group that defines the criteria for the rule.
PatchFilters -> (list)
The set of patch filters that make up the group.
(structure)
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
arePATCH_SET
,PRODUCT
,PRODUCT_FAMILY
,CLASSIFICATION
, andMSRC_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 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. Not supported on Debian Server or Ubuntu Server.
Enter dates in the format
YYYY-MM-DD
. For example,2021-12-31
.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 -> (timestamp)
The date the patch baseline was created.
ModifiedDate -> (timestamp)
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.
(structure)
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
Note
For information about other options available for your yum repository configuration, see dnf.conf(5) .