{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/PolicyStoreId"
 ],
 "definitions": {
  "EntityIdentifier": {
   "additionalProperties": false,
   "properties": {
    "EntityId": {
     "maxLength": 200,
     "minLength": 1,
     "pattern": "^.*$",
     "type": "string"
    },
    "EntityType": {
     "maxLength": 200,
     "minLength": 1,
     "pattern": "^.*$",
     "type": "string"
    }
   },
   "required": [
    "EntityId",
    "EntityType"
   ],
   "type": "object"
  },
  "PolicyDefinition": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "Static": {
       "$ref": "#/definitions/StaticPolicyDefinition"
      }
     },
     "required": [
      "Static"
     ],
     "title": "Static",
     "type": "object"
    },
    {
     "additionalProperties": false,
     "properties": {
      "TemplateLinked": {
       "$ref": "#/definitions/TemplateLinkedPolicyDefinition"
      }
     },
     "required": [
      "TemplateLinked"
     ],
     "title": "TemplateLinked",
     "type": "object"
    }
   ]
  },
  "PolicyType": {
   "enum": [
    "STATIC",
    "TEMPLATE_LINKED"
   ],
   "type": "string"
  },
  "StaticPolicyDefinition": {
   "additionalProperties": false,
   "properties": {
    "Description": {
     "maxLength": 150,
     "minLength": 0,
     "type": "string"
    },
    "Statement": {
     "maxLength": 10000,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Statement"
   ],
   "type": "object"
  },
  "TemplateLinkedPolicyDefinition": {
   "additionalProperties": false,
   "properties": {
    "PolicyTemplateId": {
     "maxLength": 200,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9-]*$",
     "type": "string"
    },
    "Principal": {
     "$ref": "#/definitions/EntityIdentifier"
    },
    "Resource": {
     "$ref": "#/definitions/EntityIdentifier"
    }
   },
   "required": [
    "PolicyTemplateId"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/PolicyId",
  "/properties/PolicyStoreId"
 ],
 "properties": {
  "Definition": {
   "$ref": "#/definitions/PolicyDefinition"
  },
  "PolicyId": {
   "maxLength": 200,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9-]*$",
   "type": "string"
  },
  "PolicyStoreId": {
   "maxLength": 200,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9-]*$",
   "type": "string"
  },
  "PolicyType": {
   "$ref": "#/definitions/PolicyType"
  }
 },
 "readOnlyProperties": [
  "/properties/PolicyId",
  "/properties/PolicyType"
 ],
 "required": [
  "Definition",
  "PolicyStoreId"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-avp",
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": false,
  "tagUpdatable": false,
  "taggable": false
 },
 "typeName": "AWS::VerifiedPermissions::Policy"
}
