または DescribePatchGroupStateAWS SDKで を使用する CLI - AWS SDK コード例

AWS Doc SDK Examples GitHub リポジトリには他にも AWS SDK例があります。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

または DescribePatchGroupStateAWS SDKで を使用する 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 詳細については、「 コマンドレットリファレンスDescribePatchGroupState」の「」を参照してください。 AWS Tools for PowerShell