{
  "typeName" : "AWS::WorkSpacesWeb::UserSettings",
  "description" : "Definition of AWS::WorkSpacesWeb::UserSettings Resource Type",
  "definitions" : {
    "BrandingConfiguration" : {
      "type" : "object",
      "properties" : {
        "Logo" : {
          "type" : "string",
          "pattern" : "(^s3://[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]/.+$)|(^(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$)"
        },
        "Wallpaper" : {
          "type" : "string",
          "pattern" : "(^s3://[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]/.+$)|(^(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$)"
        },
        "Favicon" : {
          "type" : "string",
          "pattern" : "(^s3://[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]/.+$)|(^(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$)"
        },
        "LogoMetadata" : {
          "$ref" : "#/definitions/ImageMetadata"
        },
        "WallpaperMetadata" : {
          "$ref" : "#/definitions/ImageMetadata"
        },
        "FaviconMetadata" : {
          "$ref" : "#/definitions/ImageMetadata"
        },
        "LocalizedStrings" : {
          "$ref" : "#/definitions/LocalizedBrandingStringMap"
        },
        "ColorTheme" : {
          "$ref" : "#/definitions/ColorTheme"
        },
        "TermsOfService" : {
          "type" : "string",
          "maxLength" : 153600
        }
      },
      "additionalProperties" : false
    },
    "CookieSpecification" : {
      "type" : "object",
      "properties" : {
        "Domain" : {
          "type" : "string",
          "maxLength" : 253,
          "minLength" : 0,
          "pattern" : "^(\\.?)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$"
        },
        "Name" : {
          "type" : "string",
          "maxLength" : 4096,
          "minLength" : 0
        },
        "Path" : {
          "type" : "string",
          "maxLength" : 2000,
          "minLength" : 0,
          "pattern" : "^/(\\S)*$"
        }
      },
      "required" : [ "Domain" ],
      "additionalProperties" : false
    },
    "CookieSynchronizationConfiguration" : {
      "type" : "object",
      "properties" : {
        "Allowlist" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/CookieSpecification"
          },
          "maxItems" : 10,
          "minItems" : 0,
          "insertionOrder" : false
        },
        "Blocklist" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/CookieSpecification"
          },
          "maxItems" : 10,
          "minItems" : 0,
          "insertionOrder" : false
        }
      },
      "required" : [ "Allowlist" ],
      "additionalProperties" : false
    },
    "EnabledType" : {
      "type" : "string",
      "enum" : [ "Disabled", "Enabled" ]
    },
    "EncryptionContextMap" : {
      "type" : "object",
      "patternProperties" : {
        "^[\\s\\S]*$" : {
          "type" : "string",
          "maxLength" : 131072,
          "minLength" : 0,
          "pattern" : "^[\\s\\S]*$"
        }
      },
      "additionalProperties" : false
    },
    "ColorTheme" : {
      "type" : "string",
      "enum" : [ "Light", "Dark" ]
    },
    "ImageMetadata" : {
      "type" : "object",
      "properties" : {
        "MimeType" : {
          "$ref" : "#/definitions/MimeType"
        },
        "FileExtension" : {
          "type" : "string",
          "maxLength" : 131072,
          "minLength" : 0,
          "pattern" : "^[\\s\\S]*$"
        },
        "LastUploadTimestamp" : {
          "type" : "string",
          "format" : "date-time"
        }
      },
      "required" : [ "FileExtension", "LastUploadTimestamp", "MimeType" ],
      "additionalProperties" : false
    },
    "Locale" : {
      "type" : "string",
      "enum" : [ "de-DE", "en-US", "es-ES", "fr-FR", "id-ID", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW" ]
    },
    "LocalizedBrandingStringMap" : {
      "type" : "object",
      "patternProperties" : {
        ".+" : {
          "$ref" : "#/definitions/LocalizedBrandingStrings"
        }
      },
      "additionalProperties" : false
    },
    "LocalizedBrandingStrings" : {
      "type" : "object",
      "properties" : {
        "BrowserTabTitle" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "WelcomeText" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "LoginTitle" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "LoginDescription" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "LoginButtonText" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "ContactLink" : {
          "type" : "string",
          "pattern" : "^(https?://|mailto:).*"
        },
        "ContactButtonText" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        },
        "LoadingText" : {
          "type" : "string",
          "pattern" : "^[^<>&'`~\\\\]*$"
        }
      },
      "required" : [ "BrowserTabTitle", "WelcomeText" ],
      "additionalProperties" : false
    },
    "MaxDisplayResolution" : {
      "type" : "string",
      "enum" : [ "size4096X2160", "size3840X2160", "size3440X1440", "size2560X1440", "size1920X1080", "size1280X720", "size1024X768", "size800X600" ]
    },
    "MimeType" : {
      "type" : "string",
      "enum" : [ "image/png", "image/jpeg", "image/x-icon" ]
    },
    "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
    },
    "ToolbarConfiguration" : {
      "type" : "object",
      "properties" : {
        "ToolbarType" : {
          "$ref" : "#/definitions/ToolbarType"
        },
        "VisualMode" : {
          "$ref" : "#/definitions/VisualMode"
        },
        "HiddenToolbarItems" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/ToolbarItem"
          }
        },
        "MaxDisplayResolution" : {
          "$ref" : "#/definitions/MaxDisplayResolution"
        }
      },
      "additionalProperties" : false
    },
    "ToolbarItem" : {
      "type" : "string",
      "enum" : [ "Windows", "DualMonitor", "FullScreen", "Webcam", "Microphone" ]
    },
    "ToolbarType" : {
      "type" : "string",
      "enum" : [ "Floating", "Docked" ]
    },
    "VisualMode" : {
      "type" : "string",
      "enum" : [ "Dark", "Light" ]
    }
  },
  "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})+$"
      },
      "insertionOrder" : false
    },
    "BrandingConfiguration" : {
      "$ref" : "#/definitions/BrandingConfiguration"
    },
    "CookieSynchronizationConfiguration" : {
      "$ref" : "#/definitions/CookieSynchronizationConfiguration"
    },
    "CopyAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "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-]+$"
    },
    "DisconnectTimeoutInMinutes" : {
      "type" : "number",
      "default" : null,
      "maximum" : 600,
      "minimum" : 1
    },
    "DownloadAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "IdleDisconnectTimeoutInMinutes" : {
      "type" : "number",
      "default" : null,
      "maximum" : 60,
      "minimum" : 0
    },
    "PasteAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "PrintAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 0,
      "insertionOrder" : false
    },
    "ToolbarConfiguration" : {
      "$ref" : "#/definitions/ToolbarConfiguration"
    },
    "UploadAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "UserSettingsArn" : {
      "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})+$"
    },
    "DeepLinkAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    },
    "WebAuthnAllowed" : {
      "$ref" : "#/definitions/EnabledType"
    }
  },
  "required" : [ "CopyAllowed", "DownloadAllowed", "PasteAllowed", "PrintAllowed", "UploadAllowed" ],
  "writeOnlyProperties" : [ "/properties/BrandingConfiguration/Logo", "/properties/BrandingConfiguration/Favicon", "/properties/BrandingConfiguration/Wallpaper" ],
  "readOnlyProperties" : [ "/properties/AssociatedPortalArns", "/properties/UserSettingsArn", "/properties/BrandingConfiguration/LogoMetadata", "/properties/BrandingConfiguration/FaviconMetadata", "/properties/BrandingConfiguration/WallpaperMetadata" ],
  "primaryIdentifier" : [ "/properties/UserSettingsArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "workspaces-web:CreateUserSettings", "workspaces-web:GetUserSettings", "workspaces-web:ListTagsForResource", "workspaces-web:TagResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt", "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptTo", "kms:ReEncryptFrom", "s3:GetObject" ]
    },
    "read" : {
      "permissions" : [ "workspaces-web:GetUserSettings", "workspaces-web:ListTagsForResource", "kms:CreateGrant", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "update" : {
      "permissions" : [ "workspaces-web:UpdateUserSettings", "workspaces-web:TagResource", "workspaces-web:UntagResource", "workspaces-web:GetUserSettings", "workspaces-web:ListTagsForResource", "kms:CreateGrant", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt", "s3:GetObject" ]
    },
    "delete" : {
      "permissions" : [ "workspaces-web:GetUserSettings", "workspaces-web:DeleteUserSettings", "kms:CreateGrant", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "list" : {
      "permissions" : [ "workspaces-web:ListUserSettings", "kms:CreateGrant", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : true,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "workspaces-web:UntagResource", "workspaces-web:ListTagsForResource", "workspaces-web:TagResource" ]
  },
  "additionalProperties" : false
}