

• La AWS Systems Manager CloudWatch dashboard non sarà più disponibile dopo il 30 aprile 2026. I clienti possono continuare a utilizzare la CloudWatch console Amazon per visualizzare, creare e gestire le proprie CloudWatch dashboard Amazon, proprio come fanno oggi. Per ulteriori informazioni, consulta la [documentazione di Amazon CloudWatch Dashboard](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html). 

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

# Creazione di modelli di modifica utilizzando strumenti da riga di comando
<a name="change-templates-tools"></a>

**Change Managermodifica della disponibilità**  
AWS Systems ManagerChange Managernon sarà più aperto a nuovi clienti a partire dal 7 novembre 2025. Se desideri utilizzarloChange Manager, registrati prima di tale data. I clienti esistenti possono continuare a utilizzare il servizio normalmente. Per ulteriori informazioni, consulta [AWS Systems ManagerChange Managerla pagina Modifica della disponibilità](https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html). 

Le seguenti procedure descrivono come utilizzare AWS Command Line Interface (AWS CLI) (su Linux oWindows Server) o AWS Tools for Windows PowerShell creare una richiesta di modifica inChange Manager, uno strumento in AWS Systems Manager. macOS 

**Per creare un modello di modifica**

1. Installa e configura il AWS CLI o il AWS Strumenti per PowerShell, se non l'hai già fatto.

   Per informazioni, consulta le pagine [Installazione o aggiornamento della versione più recente di AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) e [Installazione di AWS Strumenti per PowerShell](https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up.html).

1. Sul proprio computer locale creare un file JSON denominato ad esempio `MyChangeTemplate.json`, quindi incollare il contenuto del modello di modifica.
**Nota**  
I modelli di modifica utilizzano una versione dello schema 0.3 che non include lo stesso supporto dei runbook Automation.

   Di seguito è riportato un esempio di :
**Nota**  
Il parametro `minRequiredApprovals` viene utilizzato per specificare il numero di revisori a un livello specificato che devono approvare una richiesta di modifica creata utilizzando questo modello.  
In questo esempio vengono illustrati due livelli di approvazione. È possibile specificare fino a cinque livelli di approvazione, ma è necessario un solo livello.   
Nel primo livello, l'utente specifico "John-Doe" deve approvare ogni richiesta di modifica. Dopodiché, tre membri del ruolo IAM `Admin` devono approvare la richiesta di modifica.  
Per ulteriori informazioni sulle approvazioni nei modelli di modifica, consulta la pagina [Informazioni sulle approvazioni nei modelli di modifica](cm-approvals-templates.md).

   ```
   {
      "description": "This change template demonstrates the feature set available for creating
     change templates for Change Manager. This template starts a Runbook workflow
     for the Automation runbook called AWS-HelloWorld",
      "templateInformation": "### Document Name: HelloWorldChangeTemplate\n\n
       ## What does this document do?\n
       This change template demonstrates the feature set available for creating change templates for Change Manager. 
       This template starts a Runbook workflow for the Automation runbook called AWS-HelloWorld.\n\n
       ## Input Parameters\n* ApproverSnsTopicArn: (Required) Amazon Simple Notification Service ARN for approvers.\n
       * Approver: (Required) The name of the approver to send this request to.\n
       * ApproverType: (Required) The type of reviewer.  * Allowed Values: IamUser, IamGroup, IamRole, SSOGroup, SSOUser\n\n
       ## Output Parameters\nThis document has no outputs\n",
      "schemaVersion": "0.3",
      "parameters": {
         "ApproverSnsTopicArn": {
            "type": "String",
            "description": "Amazon Simple Notification Service ARN for approvers."
         },
         "Approver": {
            "type": "String",
            "description": "IAM approver"
         },
         "ApproverType": {
            "type": "String",
            "description": "Approver types for the request. Allowed values include IamUser, IamGroup, IamRole, SSOGroup, and SSOUser."
         }
      },
      "executableRunBooks": [
         {
            "name": "AWS-HelloWorld",
            "version": "1"
         }
      ],
      "emergencyChange": false,
      "autoApprovable": false,
      "mainSteps": [
         {
            "name": "ApproveAction1",
            "action": "aws:approve",
            "timeoutSeconds": 3600,
            "inputs": {
               "Message": "A sample change request has been submitted for your review in Change Manager. You can approve or reject this request.",
               "EnhancedApprovals": {
                  "NotificationArn": "{{ ApproverSnsTopicArn }}",
                  "Approvers": [
                     {
                        "approver": "John-Doe",
                        "type": "IamUser",
                        "minRequiredApprovals": 1
                     }
                  ]
               }
            }
         },
           {
            "name": "ApproveAction2",
            "action": "aws:approve",
            "timeoutSeconds": 3600,
            "inputs": {
               "Message": "A sample change request has been submitted for your review in Change Manager. You can approve or reject this request.",
               "EnhancedApprovals": {
                  "NotificationArn": "{{ ApproverSnsTopicArn }}",
                  "Approvers": [
                     {
                        "approver": "Admin",
                        "type": "IamRole",
                        "minRequiredApprovals": 3                  
                     }
                  ]
               }
            }
         }
      ]
   }
   ```

1. Esegui il comando seguente per creare il modello di modifica. 

------
#### [ Linux & macOS ]

   ```
   aws ssm create-document \
       --name MyChangeTemplate \
       --document-format JSON \
       --document-type Automation.ChangeTemplate \
       --content file://MyChangeTemplate.json \
       --tags Key={{tag-key}},Value={{tag-value}}
   ```

------
#### [ Windows ]

   ```
   aws ssm create-document ^
       --name MyChangeTemplate ^
       --document-format JSON ^
       --document-type Automation.ChangeTemplate ^
       --content file://MyChangeTemplate.json ^
       --tags Key={{tag-key}},Value={{tag-value}}
   ```

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

   ```
   $json = Get-Content -Path "C:\path\to\file\MyChangeTemplate.json" | Out-String
   New-SSMDocument `
       -Content $json `
       -Name "MyChangeTemplate" `
       -DocumentType "Automation.ChangeTemplate" `
       -Tags "Key={{tag-key}},Value={{tag-value}}"
   ```

------

   Per informazioni sulle altre opzioni che è possibile specificare, consulta [https://docs.aws.amazon.com/cli/latest/reference/ssm/create-document.html](https://docs.aws.amazon.com/cli/latest/reference/ssm/create-document.html).

   Il sistema restituisce informazioni simili alle seguenti.

   ```
   {
      "DocumentDescription":{
         "CreatedDate":1.585061751738E9,
         "DefaultVersion":"1",
         "Description":"Use this template to update an EC2 Linux AMI. Requires one
         approver specified in the template and an approver specified in the request.",
         "DocumentFormat":"JSON",
         "DocumentType":"Automation",
         "DocumentVersion":"1",
         "Hash":"0d3d879b3ca072e03c12638d0255ebd004d2c65bd318f8354fcde820dEXAMPLE",
         "HashType":"Sha256",
         "LatestVersion":"1",
         "Name":"MyChangeTemplate",
         "Owner":"{{123456789012}}",
         "Parameters":[
            {
               "DefaultValue":"",
               "Description":"Level one approvers",
               "Name":"LevelOneApprovers",
               "Type":"String"
            },
            {
               "DefaultValue":"",
               "Description":"Level one approver type",
               "Name":"LevelOneApproverType",
               "Type":"String"
            },
      "cloudWatchMonitors": {
         "monitors": [
            "my-cloudwatch-alarm"
         ]
      }
         ],
         "PlatformTypes":[
            "Windows",
            "Linux"
         ],
         "SchemaVersion":"0.3",
         "Status":"Creating",
         "Tags":[
   
         ]
      }
   }
   ```

Gli utenti dell'organizzazione o dell'account che sono stati specificati come revisori modello nella scheda **Impostazioni**Scheda in Change Managervengono notificati che un nuovo modello di modifica è in attesa della revisione. 

Se è stato specificato un argomento Amazon Simple Notification Service (Amazon SNS), le notifiche vengono inviate quando il modello di modifica viene rifiutato o approvato. Se non ricevi notifiche relative a questo modello di modifica, puoi tornare a Change Manager più tardi per verificare il suo stato.