{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-entity-resolution/json-schema/amazon-entity-resolution-create-id-namespace-input-schema.json",
  "title": "CreateIdNamespaceInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-entity-resolution-idnamespaces-api-openapi.yml#/components/schemas/CreateIdNamespaceInput",
  "type": "object",
  "properties": {
    "idNamespaceName": {
      "type": "string",
      "description": "The name of the ID namespace."
    },
    "description": {
      "type": "string",
      "description": "The description of the ID namespace."
    },
    "inputSourceConfig": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdNamespaceInputSource"
      },
      "description": "A list of InputSource objects, which have the fields InputSourceARN and SchemaName."
    },
    "idMappingWorkflowProperties": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdNamespaceIdMappingWorkflowProperties"
      },
      "description": "Determines the properties of IdMappingWorflow where this IdNamespace can be used as a Source or a Target."
    },
    "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 to which all sourceIds will resolve to."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this IdNamespace on your behalf as part of the workflow run."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    }
  },
  "required": [
    "idNamespaceName",
    "type"
  ],
  "$defs": {
    "IdNamespaceIdMappingWorkflowProperties": {
      "type": "object",
      "properties": {
        "idMappingType": {
          "type": "string",
          "enum": [
            "PROVIDER",
            "RULE_BASED"
          ],
          "description": "The type of ID mapping."
        },
        "ruleBasedProperties": {
          "$ref": "#/$defs/NamespaceRuleBasedProperties"
        },
        "providerProperties": {
          "$ref": "#/$defs/NamespaceProviderProperties"
        }
      },
      "required": [
        "idMappingType"
      ]
    },
    "IdNamespaceInputSource": {
      "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."
        }
      },
      "required": [
        "inputSourceARN"
      ]
    },
    "NamespaceProviderProperties": {
      "type": "object",
      "properties": {
        "providerServiceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the provider service."
        },
        "providerConfiguration": {
          "type": "object",
          "description": "An object which defines any additional configurations required by the provider service."
        }
      },
      "required": [
        "providerServiceArn"
      ]
    },
    "NamespaceRuleBasedProperties": {
      "type": "object",
      "properties": {
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Rule"
          },
          "description": "The rules for the ID namespace."
        },
        "ruleDefinitionTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "SOURCE",
              "TARGET"
            ]
          },
          "description": "The sets of rules you can use in an ID mapping workflow. The limitations specified for the source and target 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 BusinessEmail field of Profile B, the"
        },
        "recordMatchingModels": {
          "type": "array",
          "items": {
            "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 is matched to one record in the target. If the value is set to MANY_SOURCE_TO_ONE_TARGET, all matching records in the source are matched to one record in the target."
        }
      }
    },
    "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"
      ]
    }
  }
}