{
 "additionalProperties": false,
 "definitions": {
  "ConfigOwner": {
   "enum": [
    "ACCOUNT"
   ],
   "type": "string"
  },
  "ModelEnforcement": {
   "additionalProperties": false,
   "properties": {
    "ExcludedModels": {
     "items": {
      "pattern": "^([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12}){0,1}$",
      "type": "string"
     },
     "minItems": 0,
     "type": "array"
    },
    "IncludedModels": {
     "items": {
      "pattern": "^(ALL|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12}){0,1})$",
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "IncludedModels",
    "ExcludedModels"
   ],
   "type": "object"
  },
  "SelectiveContentGuarding": {
   "additionalProperties": false,
   "properties": {
    "Messages": {
     "enum": [
      "SELECTIVE",
      "COMPREHENSIVE"
     ],
     "type": "string"
    },
    "System": {
     "enum": [
      "SELECTIVE",
      "COMPREHENSIVE"
     ],
     "type": "string"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/ConfigId"
 ],
 "properties": {
  "ConfigId": {
   "pattern": "^[a-z0-9]+$",
   "type": "string"
  },
  "CreatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "CreatedBy": {
   "type": "string"
  },
  "GuardrailArn": {
   "maxLength": 2048,
   "minLength": 0,
   "pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+$",
   "type": "string"
  },
  "GuardrailId": {
   "maxLength": 64,
   "minLength": 0,
   "pattern": "^[a-z0-9]+$",
   "type": "string"
  },
  "GuardrailIdentifier": {
   "maxLength": 2048,
   "minLength": 0,
   "pattern": "^(([a-z0-9]+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+))$",
   "type": "string"
  },
  "GuardrailVersion": {
   "pattern": "^[1-9][0-9]{0,7}$",
   "type": "string"
  },
  "ModelEnforcement": {
   "$ref": "#/definitions/ModelEnforcement"
  },
  "Owner": {
   "$ref": "#/definitions/ConfigOwner"
  },
  "SelectiveContentGuarding": {
   "$ref": "#/definitions/SelectiveContentGuarding"
  },
  "UpdatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "UpdatedBy": {
   "type": "string"
  }
 },
 "propertyTransform": {
  "/properties/GuardrailIdentifier": "$substringAfter(GuardrailIdentifier, \"/\") $OR GuardrailIdentifier"
 },
 "readOnlyProperties": [
  "/properties/ConfigId",
  "/properties/GuardrailArn",
  "/properties/GuardrailId",
  "/properties/CreatedAt",
  "/properties/CreatedBy",
  "/properties/UpdatedAt",
  "/properties/UpdatedBy",
  "/properties/Owner"
 ],
 "required": [
  "GuardrailIdentifier",
  "GuardrailVersion"
 ],
 "tagging": {
  "taggable": false
 },
 "typeName": "AWS::Bedrock::EnforcedGuardrailConfiguration"
}
