Creating change templates using Editor - AWS Systems Manager

Creating change templates using Editor

Use the steps in this topic to configure a change template in Change Manager, a capability of AWS Systems Manager, by entering JSON or YAML instead of using the console controls.

To create a change template using Editor
  1. In the navigation pane, choose Change Manager.

  2. Choose Create template.

  3. For Name, enter a name for the template that makes its purpose easy to identify, such as RestartEC2LinuxInstance.

  4. Above Change template details, choose Editor.

  5. In the Document editor section, choose Edit, and then enter the JSON or YAML content for your change template.

    The following is an example.

    Note

    The parameter minRequiredApprovals is used to specify how many reviewers at a specified level must approve a change request that is created using this template.

    This example demonstrates two levels of approvals. You can specify up to five levels of approvals, but only one level is required.

    In the first level, the specific user "John-Doe" must approve each change request. After that, any three members of the IAM role Admin must approve the change request.

    For more information about approvals for change templates, see About approvals in your change templates.

    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 } ] } } } ] }
  6. Choose Save and preview.

  7. Review the details of the change template you're creating.

    If you want to make change to the change template before submitting it for review, choose Actions, Edit.

    If you're satisfied with the contents of the change template, choose Submit for review. The users in your organization or account who have been specified as template reviewers on the Settings tab in Change Manager are notified that a new change template is pending their review.

    If an Amazon Simple Notification Service (Amazon SNS) topic has been specified for change templates, notifications are sent when the change template is rejected or approved. If you don't receive notifications related to this change template, you can return to Change Manager later to check on its status.