{
  "typeName" : "AWS::Kendra::Faq",
  "description" : "A Kendra FAQ resource",
  "sourceUrl" : "https://docs.aws.amazon.com/kendra/latest/dg/in-creating-faq.html",
  "definitions" : {
    "Tag" : {
      "description" : "A label for tagging Kendra resources",
      "type" : "object",
      "properties" : {
        "Key" : {
          "description" : "A string used to identify this tag",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "description" : "A string containing the value for the tag",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "TagList" : {
      "description" : "List of tags",
      "type" : "array",
      "maxItems" : 200,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "IndexId" : {
      "description" : "Unique ID of Index",
      "type" : "string",
      "minLength" : 36,
      "maxLength" : 36
    },
    "Description" : {
      "description" : "Description of the FAQ",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1000
    },
    "LanguageCode" : {
      "description" : "The code for a language.",
      "type" : "string",
      "minLength" : 2,
      "maxLength" : 10,
      "pattern" : "[a-zA-Z-]*"
    },
    "FileFormat" : {
      "description" : "Format of the input file",
      "enum" : [ "CSV", "CSV_WITH_HEADER", "JSON" ],
      "type" : "string"
    },
    "S3Path" : {
      "type" : "object",
      "properties" : {
        "Bucket" : {
          "$ref" : "#/definitions/S3BucketName"
        },
        "Key" : {
          "$ref" : "#/definitions/S3ObjectKey"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Bucket", "Key" ]
    },
    "S3BucketName" : {
      "type" : "string",
      "minLength" : 3,
      "maxLength" : 63,
      "pattern" : "[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]"
    },
    "S3ObjectKey" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1024
    },
    "FaqName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "RoleArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1284,
      "pattern" : "arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}"
    },
    "Id" : {
      "description" : "Unique ID of the FAQ",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    }
  },
  "properties" : {
    "Id" : {
      "$ref" : "#/definitions/Id"
    },
    "IndexId" : {
      "description" : "Index ID",
      "$ref" : "#/definitions/IndexId"
    },
    "Name" : {
      "description" : "FAQ name",
      "$ref" : "#/definitions/FaqName"
    },
    "Description" : {
      "description" : "FAQ description",
      "$ref" : "#/definitions/Description"
    },
    "FileFormat" : {
      "description" : "FAQ file format",
      "$ref" : "#/definitions/FileFormat"
    },
    "S3Path" : {
      "description" : "FAQ S3 path",
      "$ref" : "#/definitions/S3Path"
    },
    "RoleArn" : {
      "description" : "FAQ role ARN",
      "$ref" : "#/definitions/RoleArn"
    },
    "Tags" : {
      "description" : "Tags for labeling the FAQ",
      "$ref" : "#/definitions/TagList"
    },
    "Arn" : {
      "type" : "string",
      "maxLength" : 1000
    },
    "LanguageCode" : {
      "$ref" : "#/definitions/LanguageCode"
    }
  },
  "required" : [ "IndexId", "Name", "S3Path", "RoleArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "kendra:CreateFaq", "kendra:DescribeFaq", "iam:PassRole", "kendra:ListTagsForResource", "kendra:TagResource" ]
    },
    "update" : {
      "permissions" : [ "kendra:DescribeFaq", "kendra:ListTagsForResource", "kendra:UntagResource", "kendra:TagResource" ]
    },
    "read" : {
      "permissions" : [ "kendra:DescribeFaq", "kendra:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "kendra:DeleteFaq", "kendra:DescribeFaq" ]
    },
    "list" : {
      "permissions" : [ "kendra:ListFaqs" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagUpdatable" : true,
    "tagOnCreate" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "kendra:UntagResource", "kendra:TagResource", "kendra:ListTagsForResource" ]
  },
  "additionalProperties" : false,
  "readOnlyProperties" : [ "/properties/Id", "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/IndexId", "/properties/Name", "/properties/S3Path", "/properties/RoleArn", "/properties/Description", "/properties/FileFormat" ],
  "primaryIdentifier" : [ "/properties/Id", "/properties/IndexId" ]
}