

• AWS Systems Manager CloudWatch 控制面板在 2026 年 4 月 30 日之后将不再可用。客户可以像现在一样继续使用 Amazon CloudWatch 控制台来查看、创建和管理其 Amazon CloudWatch 控制面板。有关更多信息，请参阅 [Amazon CloudWatch 控制面板文档](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

# 使用 Editor (编辑器) 创建更改模板
<a name="change-templates-custom-editor"></a>

**Change Manager 可用性变更**  
自 2025 年 11 月 7 日起，AWS Systems Manager Change Manager 将不再向新客户开放。如果想要使用 Change Manager，请在该日期之前注册。现有客户可以继续正常使用该服务。有关更多信息，请参阅 [AWS Systems Manager Change Manager 可用性变更](https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html)。

按照本主题中的步骤操作，通过输入 JSON 或 YAML，而不是使用控制台控件，即可在 Change Manager（AWS Systems Manager 中的一项工具）中配置更改模板。

**使用 Editor (编辑器) 创建更改模板**

1. 在导航窗格中，请选择 **Change Manager**。

1. 选择**创建模板**。

1. 对于 **Name (名称)**，请输入模板的名称，以便于识别其用途，例如 **RestartEC2LinuxInstance**。

1. 在 **Change template details (更改模板详细信息)** 上方，选择 **Editor (编辑器)**。

1. 在 **Document editor (文档编辑器)** 部分中，选择 **Edit (编辑)**，然后为您的更改模板输入 JSON 或 YAML 内容。

   示例如下：
**注意**  
参数 `minRequiredApprovals` 用于指定对于使用此模板创建的更改请求，必须取得多少指定级别的审阅者批准。  
此示例演示了两个级别的批准。您可以指定最多五个级别的批准，但只需要一个级别。  
在第一级，每个更改请求必须取得指定用户“John-Doe”的批准。然后，该更改请求必须由 IAM 角色 `Admin` 的任意三个成员批准。  
有关批准更改模板的更多信息，请参阅 [关于更改模板中的批准](cm-approvals-templates.md)。

------
#### [ YAML ]

   ```
   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
   
     ## What does this document do?
   
     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.
   
     ## Input Parameters
   
     * ApproverSnsTopicArn: (Required) Amazon Simple Notification Service ARN for
     approvers.
   
     * Approver: (Required) The name of the approver to send this request to.
   
     * ApproverType: (Required) The type of reviewer.
       * Allowed Values: IamUser, IamGroup, IamRole, SSOGroup, SSOUser
   
     ## Output Parameters
   
     This document has no outputs
   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
   ```

------
#### [ JSON ]

   ```
   {
      "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. 选择 **Save and preview (保存和预览)**。

1. 审核您所创建的更改模板的详细信息。

   如果要在提交更改模板以供审核之前对其进行更改，请选择 **Actions (操作)、Edit (编辑)**。

   如果您对更改模板的内容感到满意，请选择 **Submit for review (提交以供审核)**。您的组织或账户内在 Change Manager 中的 **Settings (设置)** 选项卡上被指定为模板审核人员的用户，将收到新的更改模板正等待其审核的通知。

   如果已为更改模板指定 Amazon Simple Notification Service (Amazon SNS) 主题，则当更改模板被拒绝或批准时，系统会发送通知。如果您没有收到与此更改模板相关的通知，可在稍后返回 Change Manager 以检查其状态。