{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-connect-user.json",
  "title": "AWSConnectUserProperties",
  "description": "Resource Type definition for AWS::Connect::User. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-connect-user.json",
    "sourceSha256": "07f8e2f185d55cc8300b9ba84d80b39a1a3a2f6d6d73252dbd94dd8a2b97717f"
  },
  "type": "object",
  "properties": {
    "InstanceArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the Amazon Connect instance."
    },
    "DirectoryUserId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the user account in the directory used for identity management."
    },
    "HierarchyGroupArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/agent-group/[-a-zA-Z0-9]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the hierarchy group for the user."
    },
    "Username": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "[a-zA-Z0-9\\_\\-\\.\\@]+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The user name for the account."
    },
    "Password": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z0-9\\S]{8,64}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password."
    },
    "RoutingProfileArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/routing-profile/[-a-zA-Z0-9]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the routing profile for the user."
    },
    "IdentityInfo": {
      "description": "The information about the identity of the user.",
      "$ref": "#/$defs/UserIdentityInfo"
    },
    "PhoneConfig": {
      "description": "The phone settings for the user.",
      "$ref": "#/$defs/UserPhoneConfig"
    },
    "SecurityProfileArns": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "uniqueItems": true,
      "insertionOrder": false,
      "description": "One or more security profile arns for the user",
      "items": {
        "$ref": "#/$defs/SecurityProfileArn"
      }
    },
    "Tags": {
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "insertionOrder": false,
      "description": "One or more tags.",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Connect::User",
  "writeOnlyProperties": [
    "/properties/Password"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/UserArn"
  ],
  "required": [
    "InstanceArn",
    "PhoneConfig",
    "RoutingProfileArn",
    "SecurityProfileArns",
    "Username"
  ],
  "$defs": {
    "FirstName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The first name. This is required if you are using Amazon Connect or SAML for identity management.",
      "title": "AWSConnectUserFirstNameDefinition"
    },
    "LastName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The last name. This is required if you are using Amazon Connect or SAML for identity management.",
      "title": "AWSConnectUserLastNameDefinition"
    },
    "Email": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The email address. If you are using SAML for identity management and include this parameter, an error is returned.",
      "title": "AWSConnectUserEmailDefinition"
    },
    "SecondaryEmail": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "(?=^.{0,265}$)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The secondary email address. If you provide a secondary email, the user receives email notifications -- other than password reset notifications -- to this email address instead of to their primary email address.",
      "title": "AWSConnectUserSecondaryEmailDefinition"
    },
    "Mobile": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^\\+[1-9]\\d{1,14}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The mobile phone number.",
      "title": "AWSConnectUserMobileDefinition"
    },
    "SecurityProfileArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/security-profile/[-a-zA-Z0-9]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the security profile for the user.",
      "title": "AWSConnectUserSecurityProfileArnDefinition"
    },
    "AfterContactWorkTimeLimit": {
      "description": "The After Call Work (ACW) timeout setting, in seconds.",
      "type": "integer",
      "minimum": 0,
      "title": "AWSConnectUserAfterContactWorkTimeLimitDefinition"
    },
    "AutoAccept": {
      "description": "The Auto accept setting.",
      "type": "boolean",
      "title": "AWSConnectUserAutoAcceptDefinition"
    },
    "DeskPhoneNumber": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The phone number for the user's desk phone.",
      "title": "AWSConnectUserDeskPhoneNumberDefinition"
    },
    "PhoneType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SOFT_PHONE",
            "DESK_PHONE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The phone type.",
      "title": "AWSConnectUserPhoneTypeDefinition"
    },
    "UserIdentityInfo": {
      "description": "Contains information about the identity of a user.",
      "type": "object",
      "title": "AWSConnectUserUserIdentityInfoDefinition",
      "properties": {
        "FirstName": {
          "$ref": "#/$defs/FirstName"
        },
        "LastName": {
          "$ref": "#/$defs/LastName"
        },
        "Email": {
          "$ref": "#/$defs/Email"
        },
        "SecondaryEmail": {
          "$ref": "#/$defs/SecondaryEmail"
        },
        "Mobile": {
          "$ref": "#/$defs/Mobile"
        }
      },
      "additionalProperties": false
    },
    "UserPhoneConfig": {
      "description": "Contains information about the phone configuration settings for a user.",
      "type": "object",
      "title": "AWSConnectUserUserPhoneConfigDefinition",
      "properties": {
        "AfterContactWorkTimeLimit": {
          "$ref": "#/$defs/AfterContactWorkTimeLimit"
        },
        "AutoAccept": {
          "$ref": "#/$defs/AutoAccept"
        },
        "DeskPhoneNumber": {
          "$ref": "#/$defs/DeskPhoneNumber"
        },
        "PhoneType": {
          "$ref": "#/$defs/PhoneType"
        }
      },
      "required": [
        "PhoneType"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "title": "AWSConnectUserTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is maximum of 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/UserArn"
  ]
}
