Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK
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
Gli esempi di codice seguenti mostrano come utilizzare ListDocumentVersions
.
- CLI
-
- AWS CLI
-
Per 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 nella Guida per l'utente di AWS Systems Manager.
-
Per i dettagli sull'API, consulta ListDocumentVersions AWS CLI
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 ListDocumentVersionsin 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 ListDocumentVersionsin AWS Strumenti per PowerShell Cmdlet Reference (V5).
-