{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-dms/json-schema/amazon-dms-create-data-migration-message-schema.json",
  "title": "CreateDataMigrationMessage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-dms-data-migration-api-openapi.yml#/components/schemas/CreateDataMigrationMessage",
  "type": "object",
  "properties": {
    "DataMigrationName": {
      "type": "string",
      "description": "A user-friendly name for the data migration. Data migration names have the following constraints: Must begin with a letter, and can only contain ASCII letters, digits, and hyphens. Can't end with a hyphen or contain two consecutive hyphens. Length must be from 1 to 255 characters."
    },
    "MigrationProjectIdentifier": {
      "type": "string",
      "description": "An identifier for the migration project."
    },
    "DataMigrationType": {
      "type": "string",
      "enum": [
        "full-load",
        "cdc",
        "full-load-and-cdc"
      ],
      "description": "Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC."
    },
    "ServiceAccessRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration."
    },
    "EnableCloudwatchLogs": {
      "type": "boolean",
      "description": "Specifies whether to enable CloudWatch logs for the data migration."
    },
    "SourceDataSettings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SourceDataSetting"
      },
      "description": "Specifies information about the source data provider."
    },
    "TargetDataSettings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TargetDataSetting"
      },
      "description": "Specifies information about the target data provider."
    },
    "NumberOfJobs": {
      "type": "integer",
      "description": "The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "One or more tags to be assigned to the data migration."
    },
    "SelectionRules": {
      "type": "string",
      "description": "An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration."
    }
  },
  "required": [
    "MigrationProjectIdentifier",
    "DataMigrationType",
    "ServiceAccessRoleArn"
  ],
  "$defs": {
    "SourceDataSetting": {
      "type": "object",
      "properties": {
        "CDCStartPosition": {
          "type": "string",
          "description": "The change data capture (CDC) start position for the source data provider."
        },
        "CDCStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The change data capture (CDC) start time for the source data provider."
        },
        "CDCStopTime": {
          "type": "string",
          "format": "date-time",
          "description": "The change data capture (CDC) stop time for the source data provider."
        },
        "SlotName": {
          "type": "string",
          "description": "The name of the replication slot on the source data provider. This attribute is only valid for a PostgreSQL or Aurora PostgreSQL source."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "A key is the required name of the tag. The string value can be 1-128 Unicode characters in length and can't be prefixed with \"aws:\" or \"dms:\". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regular expressions: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\")."
        },
        "Value": {
          "type": "string",
          "description": "A value is the optional value of the tag. The string value can be 1-256 Unicode characters in length and can't be prefixed with \"aws:\" or \"dms:\". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regular expressions: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\")."
        },
        "ResourceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) string that uniquely identifies the resource for which the tag is created."
        }
      }
    },
    "TargetDataSetting": {
      "type": "object",
      "properties": {
        "TablePreparationMode": {
          "type": "string",
          "enum": [
            "do-nothing",
            "truncate",
            "drop-tables-on-target"
          ],
          "description": "This setting determines how DMS handles the target tables before starting a data migration, either by leaving them untouched, dropping and recreating them, or truncating the existing data in the target tables."
        }
      }
    }
  }
}