{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-elasticache/json-schema/amazon-elasticache-create-user-message-schema.json",
  "title": "CreateUserMessage",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-elasticache-user-api-openapi.yml#/components/schemas/CreateUserMessage",
  "type": "object",
  "properties": {
    "UserId": {
      "type": "string",
      "description": "The ID of the user. This value is stored as a lowercase string."
    },
    "UserName": {
      "type": "string",
      "description": "The username of the user."
    },
    "Engine": {
      "type": "string",
      "description": "The options are valkey or redis."
    },
    "Passwords": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Passwords used for this user. You can create up to two passwords for each user."
    },
    "AccessString": {
      "type": "string",
      "description": "Access permissions string used for this user."
    },
    "NoPasswordRequired": {
      "type": "boolean",
      "description": "Indicates a password is not required for this user."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted."
    },
    "AuthenticationMode": {
      "$ref": "#/$defs/AuthenticationMode"
    }
  },
  "required": [
    "UserId",
    "UserName",
    "Engine",
    "AccessString"
  ],
  "$defs": {
    "AuthenticationMode": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "password",
            "no-password-required",
            "iam"
          ],
          "description": "Specifies the authentication type. Possible options are IAM authentication, password and no password."
        },
        "Passwords": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specifies the passwords to use for authentication if Type is set to password."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for the tag. May not be null."
        },
        "Value": {
          "type": "string",
          "description": "The tag's value. May be null."
        }
      }
    }
  }
}