{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-elasticache-user.json",
  "title": "AWSElastiCacheUserProperties",
  "description": "Resource Type definition for AWS::ElastiCache::User. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-elasticache>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-elasticache-user.json",
    "sourceSha256": "58fdbb288e9d247228af96825090732be602258609790f65a64aad3625ce11f4"
  },
  "type": "object",
  "properties": {
    "UserId": {
      "oneOf": [
        {
          "pattern": "[a-z][a-z0-9\\\\-]*",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ID of the user."
    },
    "UserName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The username of the user."
    },
    "Engine": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "redis"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Must be redis."
    },
    "AccessString": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Access permissions string used for this user account."
    },
    "NoPasswordRequired": {
      "description": "Indicates a password is not required for this user account.",
      "type": "boolean"
    },
    "Passwords": {
      "type": "array",
      "$comment": "List of passwords.",
      "uniqueItems": true,
      "insertionOrder": true,
      "items": {
        "type": "string"
      },
      "description": "Passwords used for this user account. You can create up to two passwords for each user."
    },
    "AuthenticationMode": {
      "type": "object",
      "required": [
        "Type"
      ],
      "properties": {
        "Type": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "password",
                "no-password-required",
                "iam"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Authentication Type"
        },
        "Passwords": {
          "type": "array",
          "$comment": "List of passwords.",
          "uniqueItems": true,
          "insertionOrder": true,
          "items": {
            "type": "string"
          },
          "description": "Passwords used for this user account. You can create up to two passwords for each user."
        }
      },
      "additionalProperties": false
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this user.",
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::ElastiCache::User",
  "primaryIdentifier": [
    "/properties/UserId"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-elasticache",
  "additionalProperties": false,
  "writeOnlyProperties": [
    "/properties/Passwords",
    "/properties/NoPasswordRequired",
    "/properties/AccessString",
    "/properties/AuthenticationMode"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": false,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "title": "AWSElastiCacheUserTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(?!aws:)[a-zA-Z0-9 _\\.\\/=+:\\-@]*$",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$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",
              "pattern": "^[a-zA-Z0-9 _\\.\\/=+:\\-@]*$",
              "minLength": 0,
              "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 0 to 256 Unicode characters in length. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "UserId",
    "UserName",
    "Engine"
  ],
  "readOnlyProperties": [
    "/properties/Status",
    "/properties/Arn"
  ],
  "createOnlyProperties": [
    "/properties/UserId",
    "/properties/UserName",
    "/properties/Engine"
  ]
}
