{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudformation/json-schema/amazon-cloudformation-create-stack-refactor-input-schema.json",
  "title": "CreateStackRefactorInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudformation-stack-refactor-api-openapi.yml#/components/schemas/CreateStackRefactorInput",
  "type": "object",
  "properties": {
    "Description": {
      "type": "string",
      "description": "A description to help you identify the stack refactor."
    },
    "EnableStackCreation": {
      "type": "boolean",
      "description": "Determines if a new stack is created with the refactor."
    },
    "ResourceMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResourceMapping"
      },
      "description": "The mappings for the stack resource Source and stack resource Destination."
    },
    "StackDefinitions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StackDefinition"
      },
      "description": "The stacks being refactored."
    }
  },
  "required": [
    "StackDefinitions"
  ],
  "$defs": {
    "ResourceLocation": {
      "type": "object",
      "properties": {
        "StackName": {
          "type": "string",
          "description": "The name associated with the stack."
        },
        "LogicalResourceId": {
          "type": "string",
          "description": "The logical name of the resource specified in the template."
        }
      },
      "required": [
        "StackName",
        "LogicalResourceId"
      ]
    },
    "ResourceMapping": {
      "type": "object",
      "properties": {
        "Source": {
          "$ref": "#/$defs/ResourceLocation"
        },
        "Destination": {
          "$ref": "#/$defs/ResourceLocation"
        }
      },
      "required": [
        "Source",
        "Destination"
      ]
    },
    "StackDefinition": {
      "type": "object",
      "properties": {
        "StackName": {
          "type": "string",
          "description": "The name associated with the stack."
        },
        "TemplateBody": {
          "type": "string",
          "description": "The file path for the stack template file."
        },
        "TemplateURL": {
          "type": "string",
          "description": "The desired final state of the stack template."
        }
      }
    }
  }
}