• AWS Systems Manager Change Manager は新規顧客に公開されなくなりました。既存のお客様は、通常どおりサービスを引き続き使用できます。詳細については、「AWS Systems Manager Change Manager の可用性の変更」を参照してください。
• AWS Systems Manager CloudWatch ダッシュボードは、2026 年 4 月 30 日以降は利用できなくなります。お客様は、これまでと同様に Amazon CloudWatch コンソールを使用して、Amazon CloudWatch ダッシュボードの表示、作成、管理を継続できます。詳細については、「Amazon CloudWatch ダッシュボードのドキュメント」を参照してください。
CLI で DescribePatchGroupState を使用する
次のサンプルコードは、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
}
詳細については、「AWS Systems Manager ユーザーガイド」の「パッチグループ」<https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-patch-patchgroups.html> および「パッチコンプライアンス状態の値について」を参照してください。
- PowerShell
-
- Tools for PowerShell V4
-
例 1: この例では、パッチグループのパッチコンプライアンスの概要を取得します。
Get-SSMPatchGroupState -PatchGroup "Production"
出力:
Instances : 4
InstancesWithFailedPatches : 1
InstancesWithInstalledOtherPatches : 4
InstancesWithInstalledPatches : 3
InstancesWithMissingPatches : 0
InstancesWithNotApplicablePatches : 0
- Tools for PowerShell V5
-
例 1: この例では、パッチグループのパッチコンプライアンスの概要を取得します。
Get-SSMPatchGroupState -PatchGroup "Production"
出力:
Instances : 4
InstancesWithFailedPatches : 1
InstancesWithInstalledOtherPatches : 4
InstancesWithInstalledPatches : 3
InstancesWithMissingPatches : 0
InstancesWithNotApplicablePatches : 0
AWS SDK デベロッパーガイドとコード例の詳細なリストについては、このサービスを AWS SDK で使用する を参照してください。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。