:doc:`SSM <../../ssm>` / Client / start_change_request_execution

******************************
start_change_request_execution
******************************



.. py:method:: SSM.Client.start_change_request_execution(**kwargs)

  

  .. warning::

    

    Amazon Web Services Systems Manager Change Manager will no longer be open to new customers starting November 7, 2025. If you would like to use Change Manager, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see `Amazon Web Services Systems Manager Change Manager availability change <https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html>`__.

     

   

  Creates a change request for Change Manager. The Automation runbooks specified in the change request run only after all required approvals for the change request have been received.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartChangeRequestExecution>`_  


  **Request Syntax**
  ::

    response = client.start_change_request_execution(
        ScheduledTime=datetime(2015, 1, 1),
        DocumentName='string',
        DocumentVersion='string',
        Parameters={
            'string': [
                'string',
            ]
        },
        ChangeRequestName='string',
        ClientToken='string',
        AutoApprove=True|False,
        Runbooks=[
            {
                'DocumentName': 'string',
                'DocumentVersion': 'string',
                'Parameters': {
                    'string': [
                        'string',
                    ]
                },
                'TargetParameterName': 'string',
                'Targets': [
                    {
                        'Key': 'string',
                        'Values': [
                            'string',
                        ]
                    },
                ],
                'TargetMaps': [
                    {
                        'string': [
                            'string',
                        ]
                    },
                ],
                'MaxConcurrency': 'string',
                'MaxErrors': 'string',
                'TargetLocations': [
                    {
                        'Accounts': [
                            'string',
                        ],
                        'Regions': [
                            'string',
                        ],
                        'TargetLocationMaxConcurrency': 'string',
                        'TargetLocationMaxErrors': 'string',
                        'ExecutionRoleName': 'string',
                        'TargetLocationAlarmConfiguration': {
                            'IgnorePollAlarmFailure': True|False,
                            'Alarms': [
                                {
                                    'Name': 'string'
                                },
                            ]
                        },
                        'IncludeChildOrganizationUnits': True|False,
                        'ExcludeAccounts': [
                            'string',
                        ],
                        'Targets': [
                            {
                                'Key': 'string',
                                'Values': [
                                    'string',
                                ]
                            },
                        ],
                        'TargetsMaxConcurrency': 'string',
                        'TargetsMaxErrors': 'string'
                    },
                ]
            },
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        ScheduledEndTime=datetime(2015, 1, 1),
        ChangeDetails='string'
    )
    
  :type ScheduledTime: datetime
  :param ScheduledTime: 

    The date and time specified in the change request to run the Automation runbooks.

     

    .. note::

      

      The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.

      

    

  
  :type DocumentName: string
  :param DocumentName: **[REQUIRED]** 

    The name of the change template document to run during the runbook workflow.

    

  
  :type DocumentVersion: string
  :param DocumentVersion: 

    The version of the change template document to run during the runbook workflow.

    

  
  :type Parameters: dict
  :param Parameters: 

    A key-value map of parameters that match the declared parameters in the change template document.

    

  
    - *(string) --* 

    
      - *(list) --* 

      
        - *(string) --* 

        
    


  :type ChangeRequestName: string
  :param ChangeRequestName: 

    The name of the change request associated with the runbook workflow to be run.

    

  
  :type ClientToken: string
  :param ClientToken: 

    The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.

    

  
  :type AutoApprove: boolean
  :param AutoApprove: 

    Indicates whether the change request can be approved automatically without the need for manual approvals.

     

    If ``AutoApprovable`` is enabled in a change template, then setting ``AutoApprove`` to ``true`` in ``StartChangeRequestExecution`` creates a change request that bypasses approver review.

     

    .. note::

      

      Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is ``CLOSED``, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again ``OPEN``.

      

    

  
  :type Runbooks: list
  :param Runbooks: **[REQUIRED]** 

    Information about the Automation runbooks that are run during the runbook workflow.

     

    .. note::

      

      The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.

      

    

  
    - *(dict) --* 

      Information about an Automation runbook used in a runbook workflow in Change Manager.

       

      .. note::

        

        The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.

        

      

    
      - **DocumentName** *(string) --* **[REQUIRED]** 

        The name of the Automation runbook used in a runbook workflow.

        

      
      - **DocumentVersion** *(string) --* 

        The version of the Automation runbook used in a runbook workflow.

        

      
      - **Parameters** *(dict) --* 

        The key-value map of execution parameters, which were supplied when calling ``StartChangeRequestExecution``.

        

      
        - *(string) --* 

        
          - *(list) --* 

          
            - *(string) --* 

            
        
    
  
      - **TargetParameterName** *(string) --* 

        The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify ``Targets``.

        

      
      - **Targets** *(list) --* 

        A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify ``TargetParameterName``.

        

      
        - *(dict) --* 

          An array of search criteria that targets managed nodes using a key-value pair that you specify.

           

          .. note::

            

            One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see `Registering maintenance window tasks without targets <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html>`__ in the *Amazon Web Services Systems Manager User Guide*.

            

           

          Supported formats include the following.

           

          **For all Systems Manager tools:**

           

          
          * ``Key=tag-key,Values=tag-value-1,tag-value-2``
          

           

          **For Automation and Change Manager:**

           

          
          * ``Key=tag:tag-key,Values=tag-value``
           
          * ``Key=ResourceGroup,Values=resource-group-name``
           
          * ``Key=ParameterValues,Values=value-1,value-2,value-3``
           
          * To target all instances in the Amazon Web Services Region: 

            
            * ``Key=AWS::EC2::Instance,Values=*``
             
            * ``Key=InstanceIds,Values=*``
            

          
          

           

          **For Run Command and Maintenance Windows:**

           

          
          * ``Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3``
           
          * ``Key=tag:tag-key,Values=tag-value-1,tag-value-2``
           
          * ``Key=resource-groups:Name,Values=resource-group-name``
           
          * Additionally, Maintenance Windows support targeting resource types: 

            
            * ``Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2``
            

          
          

           

          **For State Manager:**

           

          
          * ``Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3``
           
          * ``Key=tag:tag-key,Values=tag-value-1,tag-value-2``
           
          * To target all instances in the Amazon Web Services Region: 

            
            * ``Key=InstanceIds,Values=*``
            

          
          

           

          For more information about how to send commands that target managed nodes using ``Key,Value`` parameters, see `Targeting multiple managed nodes <https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting>`__ in the *Amazon Web Services Systems Manager User Guide*.

          

        
          - **Key** *(string) --* 

            User-defined criteria for sending commands that target managed nodes that meet the criteria.

            

          
          - **Values** *(list) --* 

            User-defined criteria that maps to ``Key``. For example, if you specified ``tag:ServerRole``, you could specify ``value:WebServer`` to run a command on instances that include EC2 tags of ``ServerRole,WebServer``.

             

            Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

            

          
            - *(string) --* 

            
        
        
    
      - **TargetMaps** *(list) --* 

        A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.

        

      
        - *(dict) --* 

        
          - *(string) --* 

          
            - *(list) --* 

            
              - *(string) --* 

              
          
      
    
    
      - **MaxConcurrency** *(string) --* 

        The ``MaxConcurrency`` value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.

        

      
      - **MaxErrors** *(string) --* 

        The ``MaxErrors`` value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.

        

      
      - **TargetLocations** *(list) --* 

        Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.

        

      
        - *(dict) --* 

          The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.

          

        
          - **Accounts** *(list) --* 

            The Amazon Web Services accounts targeted by the current Automation execution.

            

          
            - *(string) --* 

            
        
          - **Regions** *(list) --* 

            The Amazon Web Services Regions targeted by the current Automation execution.

            

          
            - *(string) --* 

            
        
          - **TargetLocationMaxConcurrency** *(string) --* 

            The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. ``TargetLocationMaxConcurrency`` has a default value of 1.

            

          
          - **TargetLocationMaxErrors** *(string) --* 

            The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. ``TargetLocationMaxErrors`` has a default value of 0.

            

          
          - **ExecutionRoleName** *(string) --* 

            The Automation execution role used by the currently running Automation. If not specified, the default value is ``AWS-SystemsManager-AutomationExecutionRole``.

            

          
          - **TargetLocationAlarmConfiguration** *(dict) --* 

            The details for the CloudWatch alarm you want to apply to an automation or command.

            

          
            - **IgnorePollAlarmFailure** *(boolean) --* 

              When this value is *true*, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is *false*.

              

            
            - **Alarms** *(list) --* **[REQUIRED]** 

              The name of the CloudWatch alarm specified in the configuration.

              

            
              - *(dict) --* 

                A CloudWatch alarm you apply to an automation or command.

                

              
                - **Name** *(string) --* **[REQUIRED]** 

                  The name of your CloudWatch alarm.

                  

                
              
          
          
          - **IncludeChildOrganizationUnits** *(boolean) --* 

            Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is ``false``.

             

            .. note::

              

              This parameter is not supported by State Manager.

              

            

          
          - **ExcludeAccounts** *(list) --* 

            Amazon Web Services accounts or organizational units to exclude as expanded targets.

            

          
            - *(string) --* 

            
        
          - **Targets** *(list) --* 

            A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for ``TargetParameterName``.

             

            This ``Targets`` parameter takes precedence over the ``StartAutomationExecution:Targets`` parameter if both are supplied.

            

          
            - *(dict) --* 

              An array of search criteria that targets managed nodes using a key-value pair that you specify.

               

              .. note::

                

                One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see `Registering maintenance window tasks without targets <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html>`__ in the *Amazon Web Services Systems Manager User Guide*.

                

               

              Supported formats include the following.

               

              **For all Systems Manager tools:**

               

              
              * ``Key=tag-key,Values=tag-value-1,tag-value-2``
              

               

              **For Automation and Change Manager:**

               

              
              * ``Key=tag:tag-key,Values=tag-value``
               
              * ``Key=ResourceGroup,Values=resource-group-name``
               
              * ``Key=ParameterValues,Values=value-1,value-2,value-3``
               
              * To target all instances in the Amazon Web Services Region: 

                
                * ``Key=AWS::EC2::Instance,Values=*``
                 
                * ``Key=InstanceIds,Values=*``
                

              
              

               

              **For Run Command and Maintenance Windows:**

               

              
              * ``Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3``
               
              * ``Key=tag:tag-key,Values=tag-value-1,tag-value-2``
               
              * ``Key=resource-groups:Name,Values=resource-group-name``
               
              * Additionally, Maintenance Windows support targeting resource types: 

                
                * ``Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2``
                

              
              

               

              **For State Manager:**

               

              
              * ``Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3``
               
              * ``Key=tag:tag-key,Values=tag-value-1,tag-value-2``
               
              * To target all instances in the Amazon Web Services Region: 

                
                * ``Key=InstanceIds,Values=*``
                

              
              

               

              For more information about how to send commands that target managed nodes using ``Key,Value`` parameters, see `Targeting multiple managed nodes <https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting>`__ in the *Amazon Web Services Systems Manager User Guide*.

              

            
              - **Key** *(string) --* 

                User-defined criteria for sending commands that target managed nodes that meet the criteria.

                

              
              - **Values** *(list) --* 

                User-defined criteria that maps to ``Key``. For example, if you specified ``tag:ServerRole``, you could specify ``value:WebServer`` to run a command on instances that include EC2 tags of ``ServerRole,WebServer``.

                 

                Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.

                

              
                - *(string) --* 

                
            
            
        
          - **TargetsMaxConcurrency** *(string) --* 

            The maximum number of targets allowed to run this task in parallel. This ``TargetsMaxConcurrency`` takes precedence over the ``StartAutomationExecution:MaxConcurrency`` parameter if both are supplied.

            

          
          - **TargetsMaxErrors** *(string) --* 

            The maximum number of errors that are allowed before the system stops running the automation on additional targets. This ``TargetsMaxErrors`` parameter takes precedence over the ``StartAutomationExecution:MaxErrors`` parameter if both are supplied.

            

          
        
    
    

  :type Tags: list
  :param Tags: 

    Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:

     

    
    * ``Key=Environment,Value=Production``
     
    * ``Key=Region,Value=us-east-2``
    

     

    .. note::

      

      The ``Array Members`` maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the ``StartChangeRequestExecution`` action, you can specify a maximum of 5 tags. You can, however, use the  AddTagsToResource action to add up to a total of 50 tags to an existing change request configuration.

      

    

  
    - *(dict) --* 

      Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The name of the tag.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The value of the tag.

        

      
    

  :type ScheduledEndTime: datetime
  :param ScheduledEndTime: 

    The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.

    

  
  :type ChangeDetails: string
  :param ChangeDetails: 

    User-provided details about the change. If no details are provided, content specified in the **Template information** section of the associated change template is added.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'AutomationExecutionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AutomationExecutionId** *(string) --* 

        The unique ID of a runbook workflow operation. (A runbook workflow is a type of Automation operation.)

        
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.AutomationDefinitionNotFoundException`

  
  *   :py:class:`SSM.Client.exceptions.InvalidAutomationExecutionParametersException`

  
  *   :py:class:`SSM.Client.exceptions.AutomationExecutionLimitExceededException`

  
  *   :py:class:`SSM.Client.exceptions.AutomationDefinitionVersionNotFoundException`

  
  *   :py:class:`SSM.Client.exceptions.IdempotentParameterMismatch`

  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  
  *   :py:class:`SSM.Client.exceptions.AutomationDefinitionNotApprovedException`

  
  *   :py:class:`SSM.Client.exceptions.NoLongerSupportedException`

  