{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-memorydb/json-schema/amazon-memorydb-create-user-request-schema.json",
  "title": "CreateUserRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-memorydb-users-api-openapi.yml#/components/schemas/CreateUserRequest",
  "type": "object",
  "properties": {
    "UserName": {
      "type": "string",
      "description": "The name of the user. This value must be unique as it also serves as the user identifier."
    },
    "AuthenticationMode": {
      "$ref": "#/$defs/AuthenticationMode"
    },
    "AccessString": {
      "type": "string",
      "description": "Access permissions string used 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."
    }
  },
  "required": [
    "UserName",
    "AuthenticationMode",
    "AccessString"
  ],
  "$defs": {
    "AuthenticationMode": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "password",
            "iam"
          ],
          "description": "Indicates whether the user requires a password to authenticate. All newly-created users require a password."
        },
        "Passwords": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The password(s) used for authentication"
        }
      }
    },
    "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."
        }
      }
    }
  }
}