{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/DataLakeArn"
 ],
 "definitions": {
  "AccessTypes": {
   "insertionOrder": true,
   "items": {
    "enum": [
     "LAKEFORMATION",
     "S3"
    ],
    "type": "string"
   },
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  },
  "AwsLogSource": {
   "additionalProperties": false,
   "properties": {
    "SourceName": {
     "type": "string"
    },
    "SourceVersion": {
     "pattern": "^(latest|[0-9]\\.[0-9])$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "CustomLogSource": {
   "additionalProperties": false,
   "properties": {
    "SourceName": {
     "maxLength": 64,
     "minLength": 1,
     "pattern": "^[\\\\\\w\\-_:/.]*$",
     "type": "string"
    },
    "SourceVersion": {
     "maxLength": 32,
     "minLength": 1,
     "pattern": "^[A-Za-z0-9\\-\\.\\_]*$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "Source": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "AwsLogSource"
     ]
    },
    {
     "required": [
      "CustomLogSource"
     ]
    }
   ],
   "properties": {
    "AwsLogSource": {
     "$ref": "#/definitions/AwsLogSource"
    },
    "CustomLogSource": {
     "$ref": "#/definitions/CustomLogSource"
    }
   }
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/SubscriberArn"
 ],
 "properties": {
  "AccessTypes": {
   "$ref": "#/definitions/AccessTypes"
  },
  "DataLakeArn": {
   "maxLength": 256,
   "minLength": 1,
   "type": "string"
  },
  "ResourceShareArn": {
   "type": "string"
  },
  "ResourceShareName": {
   "type": "string"
  },
  "S3BucketArn": {
   "type": "string"
  },
  "Sources": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Source"
   },
   "type": "array"
  },
  "SubscriberArn": {
   "type": "string"
  },
  "SubscriberDescription": {
   "pattern": "^[\\\\\\w\\s\\-_:/,.@=+]*$",
   "type": "string"
  },
  "SubscriberIdentity": {
   "additionalProperties": false,
   "properties": {
    "ExternalId": {
     "maxLength": 1224,
     "minLength": 2,
     "pattern": "^[\\w+=,.@:/-]*$",
     "type": "string"
    },
    "Principal": {
     "pattern": "^([0-9]{12}|[a-z0-9\\.\\-]*\\.(amazonaws|amazon)\\.com)$",
     "type": "string"
    }
   },
   "required": [
    "ExternalId",
    "Principal"
   ],
   "type": "object"
  },
  "SubscriberName": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^[\\\\\\w\\s\\-_:/,.@=+]*$",
   "type": "string"
  },
  "SubscriberRoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/SubscriberArn",
  "/properties/S3BucketArn",
  "/properties/SubscriberRoleArn",
  "/properties/ResourceShareArn",
  "/properties/ResourceShareName"
 ],
 "replacementStrategy": "delete_then_create",
 "required": [
  "AccessTypes",
  "DataLakeArn",
  "Sources",
  "SubscriberIdentity",
  "SubscriberName"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-securitylake.git",
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::SecurityLake::Subscriber"
}
