{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/WorkflowName"
 ],
 "definitions": {
  "AttributeName": {
   "maxLength": 255,
   "minLength": 0,
   "pattern": "^[a-zA-Z_0-9- \\t]*$",
   "type": "string"
  },
  "CreatedAt": {
   "type": "string"
  },
  "Description": {
   "maxLength": 255,
   "minLength": 0,
   "type": "string"
  },
  "EntityName": {
   "maxLength": 255,
   "minLength": 0,
   "pattern": "^[a-zA-Z_0-9-]*$",
   "type": "string"
  },
  "IdMappingIncrementalRunConfig": {
   "additionalProperties": false,
   "properties": {
    "IncrementalRunType": {
     "enum": [
      "ON_DEMAND"
     ],
     "type": "string"
    }
   },
   "required": [
    "IncrementalRunType"
   ],
   "type": "object"
  },
  "IdMappingRuleBasedProperties": {
   "additionalProperties": false,
   "properties": {
    "AttributeMatchingModel": {
     "enum": [
      "ONE_TO_ONE",
      "MANY_TO_MANY"
     ],
     "type": "string"
    },
    "RecordMatchingModel": {
     "enum": [
      "ONE_SOURCE_TO_ONE_TARGET",
      "MANY_SOURCE_TO_ONE_TARGET"
     ],
     "type": "string"
    },
    "RuleDefinitionType": {
     "enum": [
      "SOURCE",
      "TARGET"
     ],
     "type": "string"
    },
    "Rules": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/Rule"
     },
     "maxItems": 25,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "AttributeMatchingModel",
    "RecordMatchingModel"
   ],
   "type": "object"
  },
  "IdMappingTechniques": {
   "additionalProperties": false,
   "properties": {
    "IdMappingType": {
     "enum": [
      "PROVIDER",
      "RULE_BASED"
     ],
     "type": "string"
    },
    "NormalizationVersion": {
     "type": "string"
    },
    "ProviderProperties": {
     "$ref": "#/definitions/ProviderProperties"
    },
    "RuleBasedProperties": {
     "$ref": "#/definitions/IdMappingRuleBasedProperties"
    }
   },
   "type": "object"
  },
  "IdMappingWorkflowArn": {
   "pattern": "^arn:(aws|aws-us-gov|aws-cn):entityresolution:.*:[0-9]+:(idmappingworkflow/.*)$",
   "type": "string"
  },
  "IdMappingWorkflowInputSource": {
   "additionalProperties": false,
   "properties": {
    "InputSourceARN": {
     "pattern": "^arn:(aws|aws-us-gov|aws-cn):entityresolution:[a-z]{2}-[a-z]{1,10}-[0-9]:[0-9]{12}:(idnamespace/[a-zA-Z_0-9-]{1,255})$|^arn:(aws|aws-us-gov|aws-cn):entityresolution:[a-z]{2}-[a-z]{1,10}-[0-9]:[0-9]{12}:(matchingworkflow/[a-zA-Z_0-9-]{1,255})$|^arn:(aws|aws-us-gov|aws-cn):glue:[a-z]{2}-[a-z]{1,10}-[0-9]:[0-9]{12}:(table/[a-zA-Z_0-9-]{1,255}/[a-zA-Z_0-9-]{1,255})$",
     "type": "string"
    },
    "SchemaArn": {
     "$ref": "#/definitions/SchemaMappingArn",
     "type": "string"
    },
    "Type": {
     "enum": [
      "SOURCE",
      "TARGET"
     ],
     "type": "string"
    }
   },
   "required": [
    "InputSourceARN"
   ],
   "type": "object"
  },
  "IdMappingWorkflowOutputSource": {
   "additionalProperties": false,
   "properties": {
    "KMSArn": {
     "$ref": "#/definitions/KMSArn"
    },
    "OutputS3Path": {
     "maxLength": 1024,
     "minLength": 1,
     "pattern": "^s3://([^/]+)/?(.*?([^/]+)/?)$",
     "type": "string"
    }
   },
   "required": [
    "OutputS3Path"
   ],
   "type": "object"
  },
  "IntermediateSourceConfiguration": {
   "additionalProperties": false,
   "properties": {
    "IntermediateS3Path": {
     "maxLength": 1024,
     "minLength": 1,
     "pattern": "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$",
     "type": "string"
    }
   },
   "required": [
    "IntermediateS3Path"
   ],
   "type": "object"
  },
  "KMSArn": {
   "format": "AWS::KMS::Key.Arn",
   "pattern": "^arn:(aws|aws-us-gov|aws-cn):kms:.*:[0-9]+:.*$",
   "type": "string"
  },
  "ProviderProperties": {
   "additionalProperties": false,
   "properties": {
    "IntermediateSourceConfiguration": {
     "$ref": "#/definitions/IntermediateSourceConfiguration"
    },
    "ProviderConfiguration": {
     "additionalProperties": false,
     "patternProperties": {
      "^.+$": {
       "type": "string"
      }
     },
     "type": "object"
    },
    "ProviderServiceArn": {
     "maxLength": 255,
     "minLength": 20,
     "pattern": "^arn:(aws|aws-us-gov|aws-cn):(entityresolution):([a-z]{2}-[a-z]{1,10}-[0-9])::providerservice/([a-zA-Z0-9_-]{1,255})/([a-zA-Z0-9_-]{1,255})$",
     "type": "string"
    }
   },
   "required": [
    "ProviderServiceArn"
   ],
   "type": "object"
  },
  "Rule": {
   "additionalProperties": false,
   "properties": {
    "MatchingKeys": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/AttributeName"
     },
     "maxItems": 15,
     "minItems": 1,
     "type": "array"
    },
    "RuleName": {
     "maxLength": 255,
     "minLength": 0,
     "pattern": "^[a-zA-Z_0-9- \\t]*$",
     "type": "string"
    }
   },
   "required": [
    "RuleName",
    "MatchingKeys"
   ],
   "type": "object"
  },
  "SchemaMappingArn": {
   "pattern": "^arn:(aws|aws-us-gov|aws-cn):entityresolution:.*:[0-9]+:(schemamapping/.*)$",
   "type": "string"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "UpdatedAt": {
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/WorkflowName"
 ],
 "properties": {
  "CreatedAt": {
   "$ref": "#/definitions/CreatedAt"
  },
  "Description": {
   "$ref": "#/definitions/Description"
  },
  "IdMappingIncrementalRunConfig": {
   "$ref": "#/definitions/IdMappingIncrementalRunConfig"
  },
  "IdMappingTechniques": {
   "$ref": "#/definitions/IdMappingTechniques"
  },
  "InputSourceConfig": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/IdMappingWorkflowInputSource"
   },
   "maxItems": 20,
   "minItems": 1,
   "type": "array"
  },
  "OutputSourceConfig": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/IdMappingWorkflowOutputSource"
   },
   "maxItems": 1,
   "minItems": 1,
   "type": "array"
  },
  "RoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "maxLength": 512,
   "minLength": 0,
   "pattern": "^arn:(aws|aws-us-gov|aws-cn):iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 200,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "UpdatedAt": {
   "$ref": "#/definitions/UpdatedAt"
  },
  "WorkflowArn": {
   "$ref": "#/definitions/IdMappingWorkflowArn"
  },
  "WorkflowName": {
   "$ref": "#/definitions/EntityName"
  }
 },
 "readOnlyProperties": [
  "/properties/WorkflowArn",
  "/properties/UpdatedAt",
  "/properties/CreatedAt"
 ],
 "required": [
  "WorkflowName",
  "InputSourceConfig",
  "IdMappingTechniques",
  "RoleArn"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-entity-resolution.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::EntityResolution::IdMappingWorkflow"
}
