{
  "typeName" : "AWS::WorkSpacesWeb::DataProtectionSettings",
  "description" : "Definition of AWS::WorkSpacesWeb::DataProtectionSettings Resource Type",
  "definitions" : {
    "CustomPattern" : {
      "type" : "object",
      "properties" : {
        "PatternName" : {
          "type" : "string",
          "maxLength" : 20,
          "minLength" : 1,
          "pattern" : "^[_\\-\\d\\w]+$"
        },
        "PatternRegex" : {
          "type" : "string",
          "maxLength" : 300,
          "minLength" : 0,
          "pattern" : "^\\/((?:[^\\n])+)\\/([gimsuyvd]{0,8})$"
        },
        "PatternDescription" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 1,
          "pattern" : "^[ _\\-\\d\\w]+$"
        },
        "KeywordRegex" : {
          "type" : "string",
          "maxLength" : 300,
          "minLength" : 0,
          "pattern" : "^\\/((?:[^\\n])+)\\/([gimsuyvd]{0,8})$"
        }
      },
      "required" : [ "PatternName", "PatternRegex" ],
      "additionalProperties" : false
    },
    "EncryptionContextMap" : {
      "type" : "object",
      "patternProperties" : {
        "^[\\s\\S]*$" : {
          "type" : "string",
          "maxLength" : 131072,
          "minLength" : 0,
          "pattern" : "^[\\s\\S]*$"
        }
      },
      "additionalProperties" : false
    },
    "InlineRedactionConfiguration" : {
      "type" : "object",
      "properties" : {
        "InlineRedactionPatterns" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/InlineRedactionPattern"
          },
          "maxItems" : 150,
          "minItems" : 0
        },
        "GlobalEnforcedUrls" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "pattern" : "^((([a-zA-Z][a-zA-Z0-9+.-]*):\\/\\/(\\*|[\\w%._\\-\\+~#=@]+)?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?)|(\\*|[\\w%._\\-\\+~#=@]+\\.[\\w%._\\-\\+~#=@]+)(?::(\\d{1,5}))?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?|(([a-zA-Z][a-zA-Z0-9+.-]*):(\\/\\/)?\\*))$"
          },
          "maxItems" : 100,
          "minItems" : 1
        },
        "GlobalExemptUrls" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "pattern" : "^((([a-zA-Z][a-zA-Z0-9+.-]*):\\/\\/(\\*|[\\w%._\\-\\+~#=@]+)?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?)|(\\*|[\\w%._\\-\\+~#=@]+\\.[\\w%._\\-\\+~#=@]+)(?::(\\d{1,5}))?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?|(([a-zA-Z][a-zA-Z0-9+.-]*):(\\/\\/)?\\*))$"
          },
          "maxItems" : 100,
          "minItems" : 1
        },
        "GlobalConfidenceLevel" : {
          "type" : "number",
          "maximum" : 3,
          "minimum" : 1
        }
      },
      "required" : [ "InlineRedactionPatterns" ],
      "additionalProperties" : false
    },
    "InlineRedactionPattern" : {
      "type" : "object",
      "properties" : {
        "BuiltInPatternId" : {
          "type" : "string",
          "maxLength" : 50,
          "minLength" : 1,
          "pattern" : "^[_\\-\\d\\w]+$"
        },
        "CustomPattern" : {
          "$ref" : "#/definitions/CustomPattern"
        },
        "RedactionPlaceHolder" : {
          "$ref" : "#/definitions/RedactionPlaceHolder"
        },
        "EnforcedUrls" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "pattern" : "^((([a-zA-Z][a-zA-Z0-9+.-]*):\\/\\/(\\*|[\\w%._\\-\\+~#=@]+)?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?)|(\\*|[\\w%._\\-\\+~#=@]+\\.[\\w%._\\-\\+~#=@]+)(?::(\\d{1,5}))?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?|(([a-zA-Z][a-zA-Z0-9+.-]*):(\\/\\/)?\\*))$"
          },
          "maxItems" : 20,
          "minItems" : 1
        },
        "ExemptUrls" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "pattern" : "^((([a-zA-Z][a-zA-Z0-9+.-]*):\\/\\/(\\*|[\\w%._\\-\\+~#=@]+)?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?)|(\\*|[\\w%._\\-\\+~#=@]+\\.[\\w%._\\-\\+~#=@]+)(?::(\\d{1,5}))?(\\/[^@\\s]*)?(?:\\?([^*\\s]+(?:\\*?)))?|(([a-zA-Z][a-zA-Z0-9+.-]*):(\\/\\/)?\\*))$"
          },
          "maxItems" : 20,
          "minItems" : 1
        },
        "ConfidenceLevel" : {
          "type" : "number",
          "maximum" : 3,
          "minimum" : 1
        }
      },
      "required" : [ "RedactionPlaceHolder" ],
      "additionalProperties" : false
    },
    "RedactionPlaceHolder" : {
      "type" : "object",
      "properties" : {
        "RedactionPlaceHolderType" : {
          "$ref" : "#/definitions/RedactionPlaceHolderType"
        },
        "RedactionPlaceHolderText" : {
          "type" : "string",
          "maxLength" : 20,
          "minLength" : 1,
          "pattern" : "^[*_\\-\\d\\w]+$"
        }
      },
      "required" : [ "RedactionPlaceHolderType" ],
      "additionalProperties" : false
    },
    "RedactionPlaceHolderType" : {
      "type" : "string",
      "enum" : [ "CustomText" ]
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "maxLength" : 128,
          "minLength" : 1,
          "pattern" : "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
        },
        "Value" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 0,
          "pattern" : "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "AdditionalEncryptionContext" : {
      "$ref" : "#/definitions/EncryptionContextMap"
    },
    "AssociatedPortalArns" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "maxLength" : 2048,
        "minLength" : 20,
        "pattern" : "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$"
      }
    },
    "CreationDate" : {
      "type" : "string",
      "format" : "date-time"
    },
    "CustomerManagedKey" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 20,
      "pattern" : "^arn:[\\w+=\\/,.@-]+:kms:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:key\\/[a-zA-Z0-9-]+$"
    },
    "DataProtectionSettingsArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 20,
      "pattern" : "^arn:[\\w+=\\/,.@-]+:[a-zA-Z0-9\\-]+:[a-zA-Z0-9\\-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(\\/[a-fA-F0-9\\-]{36})+$"
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 256,
      "minLength" : 1,
      "pattern" : "^[ _\\-\\d\\w]+$"
    },
    "DisplayName" : {
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^[ _\\-\\d\\w]+$"
    },
    "InlineRedactionConfiguration" : {
      "$ref" : "#/definitions/InlineRedactionConfiguration"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 0
    }
  },
  "readOnlyProperties" : [ "/properties/AssociatedPortalArns", "/properties/CreationDate", "/properties/DataProtectionSettingsArn" ],
  "createOnlyProperties" : [ "/properties/AdditionalEncryptionContext", "/properties/CustomerManagedKey" ],
  "primaryIdentifier" : [ "/properties/DataProtectionSettingsArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "workspaces-web:CreateDataProtectionSettings", "workspaces-web:GetDataProtectionSettings", "workspaces-web:ListDataProtectionSettings", "workspaces-web:ListTagsForResource", "workspaces-web:TagResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt", "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptTo", "kms:ReEncryptFrom" ]
    },
    "read" : {
      "permissions" : [ "workspaces-web:GetDataProtectionSettings", "workspaces-web:ListDataProtectionSettings", "workspaces-web:ListTagsForResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "update" : {
      "permissions" : [ "workspaces-web:UpdateDataProtectionSettings", "workspaces-web:GetDataProtectionSettings", "workspaces-web:ListDataProtectionSettings", "workspaces-web:TagResource", "workspaces-web:UntagResource", "workspaces-web:ListTagsForResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "delete" : {
      "permissions" : [ "workspaces-web:GetDataProtectionSettings", "workspaces-web:ListDataProtectionSettings", "workspaces-web:DeleteDataProtectionSettings", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "list" : {
      "permissions" : [ "workspaces-web:ListDataProtectionSettings", "kms:Decrypt", "kms:DescribeKey" ]
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : true,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "workspaces-web:UntagResource", "workspaces-web:ListTagsForResource", "workspaces-web:TagResource" ]
  },
  "additionalProperties" : false
}