CloudFormation / Client / create_stack_refactor

create_stack_refactor#

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

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'
        },
    ]
)
Parameters:
  • Description (string) – A description to help you identify the stack refactor.

  • EnableStackCreation (boolean) – Determines if a new stack is created with the refactor.

  • ResourceMappings (list) –

    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.

  • StackDefinitions (list) –

    [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.

Return type:

dict

Returns:

Response Syntax

{
    'StackRefactorId': 'string'
}

Response Structure

  • (dict) –

    • StackRefactorId (string) –

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