{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-profile-create-domain-request-schema.json",
  "title": "ProfileCreateDomainRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-domains-api-openapi.yml#/components/schemas/ProfileCreateDomainRequest",
  "type": "object",
  "properties": {
    "DomainName": {
      "type": "string",
      "description": "The unique name of the domain."
    },
    "DefaultExpirationDays": {
      "type": "integer",
      "description": "The default number of days until the data within the domain expires."
    },
    "DefaultEncryptionKey": {
      "type": "string",
      "description": "The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage."
    },
    "DeadLetterQueueUrl": {
      "type": "string",
      "description": "The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications. You must set up a policy on the DeadLetterQueue for the SendMessage operation to enable Amazon Connect Customer Profiles to send messages to the DeadLetterQueue."
    },
    "Matching": {
      "$ref": "#/$defs/MatchingRequest"
    },
    "RuleBasedMatching": {
      "$ref": "#/$defs/RuleBasedMatchingRequest"
    },
    "DataStore": {
      "$ref": "#/$defs/DataStoreRequest"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    }
  },
  "required": [
    "DomainName",
    "DefaultExpirationDays"
  ],
  "$defs": {
    "AttributeTypesSelector": {
      "type": "object",
      "properties": {
        "AttributeMatchingModel": {
          "type": "string",
          "enum": [
            "ONE_TO_ONE",
            "MANY_TO_MANY"
          ],
          "description": "Configures the AttributeMatchingModel, you can either choose ONE_TO_ONE or MANY_TO_MANY."
        },
        "Address": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Address type. You can choose from Address, BusinessAddress, MaillingAddress, and ShippingAddress. You only can use the Address type in the MatchingRule. For example, if you want to match profile based on BusinessAddress.City or MaillingAddress.City, you need to choose the BusinessAddress and the MaillingAddress to represent the Address type and specify the Address.City on the matching rule."
        },
        "PhoneNumber": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The PhoneNumber type. You can choose from PhoneNumber, HomePhoneNumber, and MobilePhoneNumber. You only can use the PhoneNumber type in the MatchingRule. For example, if you want to match a profile based on Phone or HomePhone, you need to choose the Phone and the HomePhone to represent the PhoneNumber type and only specify the PhoneNumber on the matching rule."
        },
        "EmailAddress": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Email type. You can choose from EmailAddress, BusinessEmailAddress and PersonalEmailAddress. You only can use the EmailAddress type in the MatchingRule. For example, if you want to match profile based on PersonalEmailAddress or BusinessEmailAddress, you need to choose the PersonalEmailAddress and the BusinessEmailAddress to represent the EmailAddress type and only specify the EmailAddress on the matching rule."
        }
      },
      "required": [
        "AttributeMatchingModel"
      ]
    },
    "AutoMerging": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "The flag that enables the auto-merging of duplicate profiles."
        },
        "Consolidation": {
          "$ref": "#/$defs/Consolidation"
        },
        "ConflictResolution": {
          "$ref": "#/$defs/ConflictResolution"
        },
        "MinAllowedConfidenceScoreForMerging": {
          "type": "number",
          "description": "A number between 0 and 1 that represents the minimum confidence score required for profiles within a matching group to be merged during the auto-merge process. A higher score means higher similarity required to merge profiles."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "ConflictResolution": {
      "type": "object",
      "properties": {
        "ConflictResolvingModel": {
          "type": "string",
          "enum": [
            "RECENCY",
            "SOURCE"
          ],
          "description": "How the auto-merging process should resolve conflicts between different profiles. RECENCY: Uses the data that was most recently updated. SOURCE: Uses the data from a specific source. For example, if a company has been aquired or two departments have merged, data from the specified source is used. If two duplicate profiles are from the same source, then RECENCY is used again."
        },
        "SourceName": {
          "type": "string",
          "description": "The ObjectType name that is used to resolve profile merging conflicts when choosing SOURCE as the ConflictResolvingModel."
        }
      },
      "required": [
        "ConflictResolvingModel"
      ]
    },
    "Consolidation": {
      "type": "object",
      "properties": {
        "MatchingAttributesList": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "A list of matching criteria."
        }
      },
      "required": [
        "MatchingAttributesList"
      ]
    },
    "DataStoreRequest": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Enabled: Set to true to enabled data store for this domain."
        }
      }
    },
    "ExportingConfig": {
      "type": "object",
      "properties": {
        "S3Exporting": {
          "$ref": "#/$defs/S3ExportingConfig"
        }
      }
    },
    "JobSchedule": {
      "type": "object",
      "properties": {
        "DayOfTheWeek": {
          "type": "string",
          "enum": [
            "SUNDAY",
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY"
          ],
          "description": "The day when the Identity Resolution Job should run every week."
        },
        "Time": {
          "type": "string",
          "description": "The time when the Identity Resolution Job should run every week."
        }
      },
      "required": [
        "DayOfTheWeek",
        "Time"
      ]
    },
    "MatchingRequest": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "The flag that enables the matching process of duplicate profiles."
        },
        "JobSchedule": {
          "$ref": "#/$defs/JobSchedule"
        },
        "AutoMerging": {
          "$ref": "#/$defs/AutoMerging"
        },
        "ExportingConfig": {
          "$ref": "#/$defs/ExportingConfig"
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "MatchingRule": {
      "type": "object",
      "properties": {
        "Rule": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A single rule level of the MatchRules. Configures how the rule-based matching process should match profiles."
        }
      },
      "required": [
        "Rule"
      ]
    },
    "RuleBasedMatchingRequest": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "The flag that enables the rule-based matching process of duplicate profiles."
        },
        "MatchingRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MatchingRule"
          },
          "description": "Configures how the rule-based matching process should match profiles. You can have up to 15 MatchingRule in the MatchingRules."
        },
        "MaxAllowedRuleLevelForMerging": {
          "type": "integer",
          "description": "MatchingRule"
        },
        "MaxAllowedRuleLevelForMatching": {
          "type": "integer",
          "description": "Indicates the maximum allowed rule level."
        },
        "AttributeTypesSelector": {
          "$ref": "#/$defs/AttributeTypesSelector"
        },
        "ConflictResolution": {
          "$ref": "#/$defs/ConflictResolution"
        },
        "ExportingConfig": {
          "$ref": "#/$defs/ExportingConfig"
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "S3ExportingConfig": {
      "type": "object",
      "properties": {
        "S3BucketName": {
          "type": "string",
          "description": "The name of the S3 bucket where Identity Resolution Jobs write result files."
        },
        "S3KeyName": {
          "type": "string",
          "description": "The S3 key name of the location where Identity Resolution Jobs write result files."
        }
      },
      "required": [
        "S3BucketName"
      ]
    }
  }
}