{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-batch-create-memory-records-input-schema.json",
  "title": "BatchCreateMemoryRecordsInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-memoryrecords-api-openapi.yml#/components/schemas/BatchCreateMemoryRecordsInput",
  "type": "object",
  "properties": {
    "memoryId": {
      "type": "string",
      "description": "The unique ID of the memory resource where records will be created."
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MemoryRecordCreateInput"
      },
      "description": "A list of memory record creation inputs to be processed in the batch operation."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure idempotent processing of the batch request."
    },
    "recordExpirySpecification": {
      "$ref": "#/$defs/RecordExpirySpecification"
    }
  },
  "required": [
    "memoryId",
    "records"
  ],
  "$defs": {
    "MemoryContent": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The text content of the memory record."
        }
      },
      "description": "Exactly one member is set."
    },
    "MemoryRecordCreateInput": {
      "type": "object",
      "properties": {
        "requestIdentifier": {
          "type": "string",
          "description": "A client-provided identifier for tracking this specific record creation request."
        },
        "namespaces": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of namespace identifiers that categorize or group the memory record."
        },
        "content": {
          "$ref": "#/$defs/MemoryContent"
        },
        "timestamp": {
          "type": "string",
          "description": "Time at which the memory record was created."
        },
        "memoryStrategyId": {
          "type": "string",
          "description": "The ID of the memory strategy that defines how this memory record is grouped."
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/MemoryRecordMetadataValue"
          },
          "description": "Metadata key-value pairs to be stored with the memory record."
        }
      },
      "required": [
        "requestIdentifier",
        "namespaces",
        "content",
        "timestamp"
      ]
    },
    "MemoryRecordMetadataValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "A string value."
        },
        "stringListValue": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of string values."
        },
        "numberValue": {
          "type": "number",
          "description": "A numeric value."
        },
        "dateTimeValue": {
          "type": "string",
          "description": "A timestamp value in ISO 8601 UTC format."
        }
      },
      "description": "Exactly one member is set."
    },
    "RecordExpirySpecification": {
      "type": "object",
      "properties": {
        "recordExpiryDurationDays": {
          "type": "integer",
          "description": "The duration, in days, after which the records in this request expire. The minimum is 31 days."
        },
        "action": {
          "type": "string",
          "enum": [
            "REMOVE"
          ],
          "description": "The action to apply to the existing record expiry configuration. Set to REMOVE to remove a previously configured expiry so that the records no longer expire. This value does not apply when creating records."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}