AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
DescribePatchGroupState
与 a 一起使用 CLI
以下代码示例演示如何使用 DescribePatchGroupState
。
- CLI
-
- AWS CLI
-
获取补丁组的状态
以下
describe-patch-group-state
示例检索补丁组的高级补丁合规性摘要。aws ssm describe-patch-group-state \ --patch-group
"Production"
输出:
{ "Instances": 21, "InstancesWithCriticalNonCompliantPatches": 1, "InstancesWithFailedPatches": 2, "InstancesWithInstalledOtherPatches": 3, "InstancesWithInstalledPatches": 21, "InstancesWithInstalledPendingRebootPatches": 2, "InstancesWithInstalledRejectedPatches": 1, "InstancesWithMissingPatches": 3, "InstancesWithNotApplicablePatches": 4, "InstancesWithOtherNonCompliantPatches": 1, "InstancesWithSecurityNonCompliantPatches": 1, "InstancesWithUnreportedNotApplicablePatches": 2 }
有关更多信息,请参阅 Systems Manager 用户指南中的关于补丁组 < https://docs.aws.amazon.com/systems-manager/ latest/userguide/sysman-patch-patchgroups.html>__ 和了解补丁合规性状态值。AWS
-
有关API详细信息,请参阅 “DescribePatchGroupState AWS CLI
命令参考”。
-
- PowerShell
-
- 用于 PowerShell
-
示例 1:此示例获取补丁组的高级补丁合规性摘要。
Get-SSMPatchGroupState -PatchGroup "Production"
输出:
Instances : 4 InstancesWithFailedPatches : 1 InstancesWithInstalledOtherPatches : 4 InstancesWithInstalledPatches : 3 InstancesWithMissingPatches : 0 InstancesWithNotApplicablePatches : 0
-
有关API详细信息,请参阅 AWS Tools for PowerShell Cmdlet 参考DescribePatchGroupState中的。
-
DescribePatchBaselines
DescribePatchGroups