

Sono disponibili altri esempi AWS SDK nel repository [AWS Doc SDK](https://github.com/awsdocs/aws-doc-sdk-examples) Examples. GitHub 

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Utilizzare `DescribePatchGroupState` con una CLI
<a name="ssm_example_ssm_DescribePatchGroupState_section"></a>

Gli esempi di codice seguenti mostrano come utilizzare `DescribePatchGroupState`.

------
#### [ CLI ]

**AWS CLI**  
**Come ottenere lo stato di un gruppo di patch**  
L’esempio seguente `describe-patch-group-state` recupera il riepilogo di alto livello sulla conformità delle patch per un gruppo di patch.  

```
aws ssm describe-patch-group-state \
    --patch-group "Production"
```
Output:  

```
{
    "Instances": 21,
    "InstancesWithCriticalNonCompliantPatches": 1,
    "InstancesWithFailedPatches": 2,
    "InstancesWithInstalledOtherPatches": 3,
    "InstancesWithInstalledPatches": 21,
    "InstancesWithInstalledPendingRebootPatches": 2,
    "InstancesWithInstalledRejectedPatches": 1,
    "InstancesWithMissingPatches": 3,
    "InstancesWithNotApplicablePatches": 4,
    "InstancesWithOtherNonCompliantPatches": 1,
    "InstancesWithSecurityNonCompliantPatches": 1,
    "InstancesWithUnreportedNotApplicablePatches": 2
}
```
*Per ulteriori informazioni, vedere Informazioni sui gruppi di patch < https://docs.aws.amazon.com/systems-manager/ latest/userguide/sysman -patch-patchgroups.html>\$1\$1 e Informazioni sui valori [dello stato di conformità delle](https://docs.aws.amazon.com/systems-manager/latest/userguide/about-patch-compliance-states.html) patch nella Systems Manager User Guide.AWS *  
+  Per *i AWS CLI dettagli [DescribePatchGroupState](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/describe-patch-group-state.html)*sull'API, vedere in Command Reference. 

------
#### [ PowerShell ]

**Strumenti per PowerShell V4**  
**Esempio 1: questo esempio ottiene il riepilogo di alto livello sulla conformità delle patch per un gruppo di patch.**  

```
Get-SSMPatchGroupState -PatchGroup "Production"
```
**Output:**  

```
Instances                          : 4
InstancesWithFailedPatches         : 1
InstancesWithInstalledOtherPatches : 4
InstancesWithInstalledPatches      : 3
InstancesWithMissingPatches        : 0
InstancesWithNotApplicablePatches  : 0
```
+  Per i dettagli sull'API, vedere [DescribePatchGroupState](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo esempio ottiene il riepilogo di alto livello sulla conformità delle patch per un gruppo di patch.**  

```
Get-SSMPatchGroupState -PatchGroup "Production"
```
**Output:**  

```
Instances                          : 4
InstancesWithFailedPatches         : 1
InstancesWithInstalledOtherPatches : 4
InstancesWithInstalledPatches      : 3
InstancesWithMissingPatches        : 0
InstancesWithNotApplicablePatches  : 0
```
+  Per i dettagli sull'API, vedere [DescribePatchGroupState](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V5). 

------