{
  "typeName" : "AWS::WorkSpacesWeb::Portal",
  "description" : "Definition of AWS::WorkSpacesWeb::Portal Resource Type",
  "definitions" : {
    "AuthenticationType" : {
      "type" : "string",
      "enum" : [ "Standard", "IAM_Identity_Center" ]
    },
    "BrowserType" : {
      "type" : "string",
      "enum" : [ "Chrome" ]
    },
    "EncryptionContextMap" : {
      "type" : "object",
      "patternProperties" : {
        "^[\\s\\S]*$" : {
          "type" : "string",
          "maxLength" : 131072,
          "minLength" : 0,
          "pattern" : "^[\\s\\S]*$"
        }
      },
      "additionalProperties" : false
    },
    "InstanceType" : {
      "type" : "string",
      "enum" : [ "standard.regular", "standard.large", "standard.xlarge" ]
    },
    "PortalStatus" : {
      "type" : "string",
      "enum" : [ "Incomplete", "Pending", "Active" ]
    },
    "RendererType" : {
      "type" : "string",
      "enum" : [ "AppStream" ]
    },
    "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"
    },
    "AuthenticationType" : {
      "$ref" : "#/definitions/AuthenticationType"
    },
    "BrowserSettingsArn" : {
      "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})+$"
    },
    "BrowserType" : {
      "$ref" : "#/definitions/BrowserType"
    },
    "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})+$"
    },
    "DisplayName" : {
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^.+$"
    },
    "InstanceType" : {
      "$ref" : "#/definitions/InstanceType"
    },
    "IpAccessSettingsArn" : {
      "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})+$"
    },
    "MaxConcurrentSessions" : {
      "type" : "number",
      "maximum" : 5000,
      "minimum" : 1
    },
    "NetworkSettingsArn" : {
      "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})+$"
    },
    "PortalArn" : {
      "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})+$"
    },
    "PortalEndpoint" : {
      "type" : "string",
      "maxLength" : 253,
      "minLength" : 1,
      "pattern" : "^[a-zA-Z0-9]?((?!-)([A-Za-z0-9-]*[A-Za-z0-9])\\.)+[a-zA-Z0-9]+$"
    },
    "PortalCustomDomain" : {
      "type" : "string",
      "maxLength" : 128,
      "minLength" : 0,
      "pattern" : "^[a-zA-Z0-9]?((?!-)([A-Za-z0-9-]*[A-Za-z0-9])\\.)+[a-zA-Z0-9]+$"
    },
    "PortalStatus" : {
      "$ref" : "#/definitions/PortalStatus"
    },
    "RendererType" : {
      "$ref" : "#/definitions/RendererType"
    },
    "ServiceProviderSamlMetadata" : {
      "type" : "string",
      "maxLength" : 204800,
      "minLength" : 0,
      "pattern" : "^.*$"
    },
    "SessionLoggerArn" : {
      "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})+$"
    },
    "StatusReason" : {
      "type" : "string",
      "maxLength" : 1024,
      "minLength" : 1,
      "pattern" : ".*"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 0,
      "insertionOrder" : false
    },
    "TrustStoreArn" : {
      "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})+$"
    },
    "UserAccessLoggingSettingsArn" : {
      "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})+$"
    },
    "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})+$"
    }
  },
  "readOnlyProperties" : [ "/properties/BrowserType", "/properties/CreationDate", "/properties/PortalArn", "/properties/PortalEndpoint", "/properties/PortalStatus", "/properties/RendererType", "/properties/ServiceProviderSamlMetadata", "/properties/StatusReason" ],
  "createOnlyProperties" : [ "/properties/AdditionalEncryptionContext", "/properties/CustomerManagedKey" ],
  "primaryIdentifier" : [ "/properties/PortalArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "workspaces-web:CreatePortal", "workspaces-web:GetPortal*", "workspaces-web:AssociateBrowserSettings", "workspaces-web:AssociateIpAccessSettings", "workspaces-web:AssociateNetworkSettings", "workspaces-web:AssociateTrustStore", "workspaces-web:AssociateUserAccessLoggingSettings", "workspaces-web:AssociateUserSettings", "workspaces-web:AssociateDataProtectionSettings", "workspaces-web:AssociateSessionLogger", "workspaces-web:List*", "workspaces-web:TagResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt", "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptTo", "kms:ReEncryptFrom", "ec2:CreateNetworkInterface", "ec2:CreateNetworkInterfacePermission", "ec2:DeleteNetworkInterface", "ec2:DeleteNetworkInterfacePermission", "ec2:ModifyNetworkInterfaceAttribute", "kinesis:PutRecord", "kinesis:PutRecords", "kinesis:Describe*", "sso:CreateManagedApplicationInstance", "sso:Describe*", "s3:PutObject" ]
    },
    "read" : {
      "permissions" : [ "workspaces-web:GetPortal*", "workspaces-web:List*", "kms:Decrypt", "kms:DescribeKey" ]
    },
    "update" : {
      "permissions" : [ "workspaces-web:GetPortal*", "workspaces-web:UpdatePortal", "workspaces-web:AssociateBrowserSettings", "workspaces-web:AssociateIpAccessSettings", "workspaces-web:AssociateNetworkSettings", "workspaces-web:AssociateTrustStore", "workspaces-web:AssociateUserAccessLoggingSettings", "workspaces-web:AssociateUserSettings", "workspaces-web:AssociateDataProtectionSettings", "workspaces-web:AssociateSessionLogger", "workspaces-web:DisassociateBrowserSettings", "workspaces-web:DisassociateIpAccessSettings", "workspaces-web:DisassociateNetworkSettings", "workspaces-web:DisassociateTrustStore", "workspaces-web:DisassociateUserAccessLoggingSettings", "workspaces-web:DisassociateUserSettings", "workspaces-web:DisassociateDataProtectionSettings", "workspaces-web:DisassociateSessionLogger", "workspaces-web:List*", "workspaces-web:TagResource", "workspaces-web:UntagResource", "kms:CreateGrant", "kms:Encrypt", "kms:GenerateDataKey", "kms:Decrypt", "kms:DescribeKey", "ec2:CreateNetworkInterface", "ec2:CreateNetworkInterfacePermission", "ec2:DeleteNetworkInterface", "ec2:DeleteNetworkInterfacePermission", "ec2:ModifyNetworkInterfaceAttribute", "kinesis:PutRecord", "kinesis:PutRecords", "kinesis:Describe*", "sso:CreateManagedApplicationInstance", "sso:DeleteManagedApplicationInstance", "sso:Describe*", "sso:GetApplicationInstance", "sso:List*", "s3:PutObject" ]
    },
    "delete" : {
      "permissions" : [ "workspaces-web:GetPortal*", "workspaces-web:DeletePortal", "workspaces-web:DisassociateBrowserSettings", "workspaces-web:DisassociateIpAccessSettings", "workspaces-web:DisassociateNetworkSettings", "workspaces-web:DisassociateTrustStore", "workspaces-web:DisassociateUserAccessLoggingSettings", "workspaces-web:DisassociateUserSettings", "workspaces-web:DisassociateDataProtectionSettings", "workspaces-web:DisassociateSessionLogger", "kms:Decrypt", "kms:DescribeKey", "sso:DeleteManagedApplicationInstance" ]
    },
    "list" : {
      "permissions" : [ "workspaces-web:List*", "kms:Decrypt", "kms:DescribeKey" ]
    }
  },
  "tagging" : {
    "cloudFormationSystemTags" : true,
    "tagOnCreate" : true,
    "tagProperty" : "/properties/Tags",
    "tagUpdatable" : true,
    "taggable" : true,
    "permissions" : [ "workspaces-web:UntagResource", "workspaces-web:List*", "workspaces-web:TagResource" ]
  },
  "additionalProperties" : false
}