{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-entity-resolution/json-schema/amazon-entity-resolution-create-id-mapping-workflow-input-schema.json",
  "title": "CreateIdMappingWorkflowInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-entity-resolution-idmappingworkflows-api-openapi.yml#/components/schemas/CreateIdMappingWorkflowInput",
  "type": "object",
  "properties": {
    "workflowName": {
      "type": "string",
      "description": "The name of the workflow. There can't be multiple IdMappingWorkflows with the same name."
    },
    "description": {
      "type": "string",
      "description": "A description of the workflow."
    },
    "inputSourceConfig": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdMappingWorkflowInputSource"
      },
      "description": "A list of InputSource objects, which have the fields InputSourceARN and SchemaName."
    },
    "outputSourceConfig": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdMappingWorkflowOutputSource"
      },
      "description": "A list of IdMappingWorkflowOutputSource objects, each of which contains fields outputS3Path and KMSArn."
    },
    "idMappingTechniques": {
      "$ref": "#/$defs/IdMappingTechniques"
    },
    "incrementalRunConfig": {
      "$ref": "#/$defs/IdMappingIncrementalRunConfig"
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    }
  },
  "required": [
    "workflowName",
    "inputSourceConfig",
    "idMappingTechniques"
  ],
  "$defs": {
    "IdMappingIncrementalRunConfig": {
      "type": "object",
      "properties": {
        "incrementalRunType": {
          "type": "string",
          "enum": [
            "ON_DEMAND"
          ],
          "description": "The incremental run type for an ID mapping workflow. It takes only one value: ON_DEMAND. This setting runs the ID mapping workflow when it's manually triggered through the StartIdMappingJob API."
        }
      }
    },
    "IdMappingRuleBasedProperties": {
      "type": "object",
      "properties": {
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Rule"
          },
          "description": "The rules that can be used for ID mapping."
        },
        "ruleDefinitionType": {
          "type": "string",
          "enum": [
            "SOURCE",
            "TARGET"
          ],
          "description": "The set of rules you can use in an ID mapping workflow. The limitations specified for the source or target to define the match rules must be compatible."
        },
        "attributeMatchingModel": {
          "type": "string",
          "enum": [
            "ONE_TO_ONE",
            "MANY_TO_MANY"
          ],
          "description": "The comparison type. You can either choose ONE_TO_ONE or MANY_TO_MANY as the attributeMatchingModel. If you choose ONE_TO_ONE, the system can only match attributes if the sub-types are an exact match. For example, for the Email attribute type, the system will only consider it a match if the value of the Email field of Profile A matches the value of the Email field of Profile B. If you choose MANY_TO_MANY, the system can match attributes across the sub-types of an attribute type. For example, if the value of the Email field of Profile A matches the value of the BusinessEmail field of Profile B,"
        },
        "recordMatchingModel": {
          "type": "string",
          "enum": [
            "ONE_SOURCE_TO_ONE_TARGET",
            "MANY_SOURCE_TO_ONE_TARGET"
          ],
          "description": "The type of matching record that is allowed to be used in an ID mapping workflow. If the value is set to ONE_SOURCE_TO_ONE_TARGET, only one record in the source can be matched to the same record in the target. If the value is set to MANY_SOURCE_TO_ONE_TARGET, multiple records in the source can be matched to one record in the target."
        }
      },
      "required": [
        "ruleDefinitionType",
        "attributeMatchingModel",
        "recordMatchingModel"
      ]
    },
    "IdMappingTechniques": {
      "type": "object",
      "properties": {
        "idMappingType": {
          "type": "string",
          "enum": [
            "PROVIDER",
            "RULE_BASED"
          ],
          "description": "The type of ID mapping."
        },
        "ruleBasedProperties": {
          "$ref": "#/$defs/IdMappingRuleBasedProperties"
        },
        "providerProperties": {
          "$ref": "#/$defs/ProviderProperties"
        }
      },
      "required": [
        "idMappingType"
      ]
    },
    "IdMappingWorkflowInputSource": {
      "type": "object",
      "properties": {
        "inputSourceARN": {
          "type": "string",
          "description": "An Glue table Amazon Resource Name (ARN) or a matching workflow ARN for the input source table."
        },
        "schemaName": {
          "type": "string",
          "description": "The name of the schema to be retrieved."
        },
        "type": {
          "type": "string",
          "enum": [
            "SOURCE",
            "TARGET"
          ],
          "description": "The type of ID namespace. There are two types: SOURCE and TARGET. The SOURCE contains configurations for sourceId data that will be processed in an ID mapping workflow. The TARGET contains a configuration of targetId which all sourceIds will resolve to."
        }
      },
      "required": [
        "inputSourceARN"
      ]
    },
    "IdMappingWorkflowOutputSource": {
      "type": "object",
      "properties": {
        "KMSArn": {
          "type": "string",
          "description": "Customer KMS ARN for encryption at rest. If not provided, system will use an Entity Resolution managed KMS key."
        },
        "outputS3Path": {
          "type": "string",
          "description": "The S3 path to which Entity Resolution will write the output table."
        }
      },
      "required": [
        "outputS3Path"
      ]
    },
    "IntermediateSourceConfiguration": {
      "type": "object",
      "properties": {
        "intermediateS3Path": {
          "type": "string",
          "description": "The Amazon S3 location (bucket and prefix). For example: s3://provider_bucket/DOC-EXAMPLE-BUCKET"
        }
      },
      "required": [
        "intermediateS3Path"
      ]
    },
    "ProviderProperties": {
      "type": "object",
      "properties": {
        "providerServiceArn": {
          "type": "string",
          "description": "The ARN of the provider service."
        },
        "providerConfiguration": {
          "type": "object",
          "description": "The required configuration fields to use with the provider service."
        },
        "intermediateSourceConfiguration": {
          "$ref": "#/$defs/IntermediateSourceConfiguration"
        }
      },
      "required": [
        "providerServiceArn"
      ]
    },
    "Rule": {
      "type": "object",
      "properties": {
        "ruleName": {
          "type": "string",
          "description": "A name for the matching rule."
        },
        "matchingKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of MatchingKeys. The MatchingKeys must have been defined in the SchemaMapping. Two records are considered to match according to this rule if all of the MatchingKeys match."
        }
      },
      "required": [
        "ruleName",
        "matchingKeys"
      ]
    }
  }
}