Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.Use GetPatchBaselineForPatchGroup with a CLI
The following code examples show how to use GetPatchBaselineForPatchGroup.
- CLI
-
- AWS CLI
-
To display the patch baseline for a patch group
The following get-patch-baseline-for-patch-group example retrieves details about the patch baseline for the specified patch group.
aws ssm get-patch-baseline-for-patch-group \
--patch-group "DEV"
Output:
{
"PatchGroup": "DEV",
"BaselineId": "pb-0123456789abcdef0",
"OperatingSystem": "WINDOWS"
}
For more information, see Create a Patch Group <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-patch-group-tagging.html>__ and Add a Patch Group to a Patch Baseline in the AWS Systems Manager User Guide.
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example displays the patch baseline for a patch group.
Get-SSMPatchBaselineForPatchGroup -PatchGroup "Production"
Output:
BaselineId PatchGroup
---------- ----------
pb-045f10b4f382baeda Production
- Tools for PowerShell V5
-
Example 1: This example displays the patch baseline for a patch group.
Get-SSMPatchBaselineForPatchGroup -PatchGroup "Production"
Output:
BaselineId PatchGroup
---------- ----------
pb-045f10b4f382baeda Production
For a complete list of AWS SDK developer guides and code examples, see
Using this service with an AWS SDK.
This topic also includes information about getting started and details about previous SDK versions.