:doc:`CloudFormation <../../cloudformation>` / Client / create_stack_refactor

*********************
create_stack_refactor
*********************



.. py:method:: CloudFormation.Client.create_stack_refactor(**kwargs)

  

  Creates a refactor across multiple stacks, with the list of stacks and resources that are affected.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateStackRefactor>`_  


  **Request Syntax**
  ::

    response = client.create_stack_refactor(
        Description='string',
        EnableStackCreation=True|False,
        ResourceMappings=[
            {
                'Source': {
                    'StackName': 'string',
                    'LogicalResourceId': 'string'
                },
                'Destination': {
                    'StackName': 'string',
                    'LogicalResourceId': 'string'
                }
            },
        ],
        StackDefinitions=[
            {
                'StackName': 'string',
                'TemplateBody': 'string',
                'TemplateURL': 'string'
            },
        ]
    )
    
  :type Description: string
  :param Description: 

    A description to help you identify the stack refactor.

    

  
  :type EnableStackCreation: boolean
  :param EnableStackCreation: 

    Determines if a new stack is created with the refactor.

    

  
  :type ResourceMappings: list
  :param ResourceMappings: 

    The mappings for the stack resource ``Source`` and stack resource ``Destination``.

    

  
    - *(dict) --* 

      Specifies the current source of the resource and the destination of where it will be moved to.

      

    
      - **Source** *(dict) --* **[REQUIRED]** 

        The source stack ``StackName`` and ``LogicalResourceId`` for the resource being refactored.

        

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

          The name associated with the stack.

          

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

          The logical name of the resource specified in the template.

          

        
      
      - **Destination** *(dict) --* **[REQUIRED]** 

        The destination stack ``StackName`` and ``LogicalResourceId`` for the resource being refactored.

        

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

          The name associated with the stack.

          

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

          The logical name of the resource specified in the template.

          

        
      
    

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

    The stacks being refactored.

    

  
    - *(dict) --* 

      Describes the stack and the template used by the stack.

      

    
      - **StackName** *(string) --* 

        The name associated with the stack.

        

      
      - **TemplateBody** *(string) --* 

        The file path for the stack template file.

        

      
      - **TemplateURL** *(string) --* 

        The desired final state of the stack template.

        

      
    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **StackRefactorId** *(string) --* 

        The ID associated with the stack refactor created from the  CreateStackRefactor action.

        
  