:doc:`ARCRegionswitch <../../arc-region-switch>` / Client / start_plan_execution

********************
start_plan_execution
********************



.. py:method:: ARCRegionswitch.Client.start_plan_execution(**kwargs)

  

  Starts the execution of a Region switch plan. You can execute a plan in either PRACTICE or RECOVERY mode.

   

  In PRACTICE mode, the execution simulates the steps without making actual changes to your application's traffic routing. In RECOVERY mode, the execution performs actual changes to shift traffic between Regions.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/arc-region-switch-2022-07-26/StartPlanExecution>`_  


  **Request Syntax**
  ::

    response = client.start_plan_execution(
        planArn='string',
        targetRegion='string',
        action='activate'|'deactivate',
        mode='graceful'|'ungraceful',
        comment='string',
        latestVersion='string'
    )
    
  :type planArn: string
  :param planArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the plan to execute.

    

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

    The Amazon Web Services Region to target with this execution. This is the Region that traffic will be shifted to or from, depending on the action.

    

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

    The action to perform. Valid values are ``activate`` (to shift traffic to the target Region) or ``deactivate`` (to shift traffic away from the target Region).

    

  
  :type mode: string
  :param mode: 

    The plan execution mode. Valid values are ``graceful``, for starting the execution in graceful mode, or ``ungraceful``, for starting the execution in ungraceful mode.

    

  
  :type comment: string
  :param comment: 

    An optional comment explaining why the plan execution is being started.

    

  
  :type latestVersion: string
  :param latestVersion: 

    A boolean value indicating whether to use the latest version of the plan. If set to false, you must specify a specific version.

    

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

    
    ::

      {
          'executionId': 'string',
          'plan': 'string',
          'planVersion': 'string',
          'activateRegion': 'string',
          'deactivateRegion': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **executionId** *(string) --* 

        The execution identifier of a plan execution.

        
      

      - **plan** *(string) --* 

        The details of the Region switch plan.

        
      

      - **planVersion** *(string) --* 

        The version of the plan, a unique number generated by Region switch.

        
      

      - **activateRegion** *(string) --* 

        The Amazon Web Services Region to activate.

        
      

      - **deactivateRegion** *(string) --* 

        The Amazon Web Services Region to deactivate.

        
  
  **Exceptions**
  
  *   :py:class:`ARCRegionswitch.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ARCRegionswitch.Client.exceptions.IllegalStateException`

  
  *   :py:class:`ARCRegionswitch.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ARCRegionswitch.Client.exceptions.IllegalArgumentException`

  