View a markdown version of this page

Utilizzo di GetMaintenanceWindow con una CLI - AWS Systems Manager

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à.

Utilizzo di GetMaintenanceWindow con una CLI

I seguenti esempi di codice mostrano come usare GetMaintenanceWindow.

CLI
AWS CLI

Per ottenere le informazioni su una finestra di manutenzione

L’esempio seguente get-maintenance-window recupera i dettagli sulla finestra di manutenzione specificata.

aws ssm get-maintenance-window \ --window-id "mw-03eb9db428EXAMPLE"

Output:

{ "AllowUnassociatedTargets": true, "CreatedDate": 1515006912.957, "Cutoff": 1, "Duration": 6, "Enabled": true, "ModifiedDate": "2020-01-01T10:04:04.099Z", "Name": "My-Maintenance-Window", "Schedule": "rate(3 days)", "WindowId": "mw-03eb9db428EXAMPLE", "NextExecutionTime": "2020-02-25T00:08:15.099Z" }

Per ulteriori informazioni, vedere Visualizza informazioni sulle finestre di manutenzione (AWS CLI) nel AWS Guida per l'utente di Systems Manager.

PowerShell
Strumenti per PowerShell V4

Esempio 1: questo esempio ottiene dettagli su una finestra di manutenzione.

Get-SSMMaintenanceWindow -WindowId "mw-03eb9db42890fb82d"

Output:

AllowUnassociatedTargets : False CreatedDate : 2/20/2017 6:14:05 PM Cutoff : 1 Duration : 2 Enabled : True ModifiedDate : 2/20/2017 6:14:05 PM Name : TestMaintWin Schedule : cron(0 */30 * * * ? *) WindowId : mw-03eb9db42890fb82d
  • Per i dettagli sull'API, vedi GetMaintenanceWindow nel AWS Strumenti per PowerShell Riferimento al cmdlet (V4).

Strumenti per PowerShell V5

Esempio 1: questo esempio ottiene dettagli su una finestra di manutenzione.

Get-SSMMaintenanceWindow -WindowId "mw-03eb9db42890fb82d"

Output:

AllowUnassociatedTargets : False CreatedDate : 2/20/2017 6:14:05 PM Cutoff : 1 Duration : 2 Enabled : True ModifiedDate : 2/20/2017 6:14:05 PM Name : TestMaintWin Schedule : cron(0 */30 * * * ? *) WindowId : mw-03eb9db42890fb82d
  • Per i dettagli sull'API, vedi GetMaintenanceWindow nel AWS Strumenti per PowerShell Riferimento al cmdlet (V5).

Per un elenco completo di AWS Guide per sviluppatori SDK ed esempi di codice, consulta L'utilizzo di questo servizio con un AWS SDK. Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell’SDK.