

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 `ListDocumentVersions` con una CLI
<a name="ssm_example_ssm_ListDocumentVersions_section"></a>

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

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

**AWS CLI**  
**Come elencare le versioni del documento**  
L’esempio seguente `list-document-versions` elenca tutte le versioni di un documento Systems Manager.  

```
aws ssm list-document-versions \
    --name "Example"
```
Output:  

```
{
    "DocumentVersions": [
        {
            "Name": "Example",
            "DocumentVersion": "1",
            "CreatedDate": 1583257938.266,
            "IsDefaultVersion": true,
            "DocumentFormat": "YAML",
            "Status": "Active"
        }
    ]
}
```
Per ulteriori informazioni, consulta [Invio di comandi che utilizzano il parametro della versione del documento](https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command-version.html) nella *Guida per l’utente di AWS Systems Manager*.  
+  Per i dettagli sull'API, consulta [ListDocumentVersions AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/list-document-versions.html)*Command Reference.* 

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

**Strumenti per PowerShell V4**  
**Esempio 1: questo esempio elenca tutte le versioni di un documento.**  

```
Get-SSMDocumentVersionList -Name "AWS-UpdateSSMAgent"
```
**Output:**  

```
CreatedDate       : 6/1/2021 5:19:10 PM
DocumentFormat    : JSON
DocumentVersion   : 1
IsDefaultVersion  : True
Name              : AWS-UpdateSSMAgent
Status            : Active
```
+  Per i dettagli sull'API, vedere [ListDocumentVersions](https://docs.aws.amazon.com/powershell/v4/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V4). 

**Strumenti per V5 PowerShell **  
**Esempio 1: questo esempio elenca tutte le versioni di un documento.**  

```
Get-SSMDocumentVersionList -Name "AWS-UpdateSSMAgent"
```
**Output:**  

```
CreatedDate       : 6/1/2021 5:19:10 PM
DocumentFormat    : JSON
DocumentVersion   : 1
IsDefaultVersion  : True
Name              : AWS-UpdateSSMAgent
Status            : Active
```
+  Per i dettagli sull'API, vedere [ListDocumentVersions](https://docs.aws.amazon.com/powershell/v5/reference)in *AWS Strumenti per PowerShell Cmdlet Reference (*V5). 

------