Skip to content

CreateSpaceRequest

Source code in docs_src/capo_opensearchmemory/types/create_space_request.py
class CreateSpaceRequest(TypedDict, closed=True):
    name: "capo_opensearchmemory.types.space_name.SpaceName"
    """<p>A name for the space, unique within your account in the Region. If another space already has the name, the request fails with <code>ConflictException</code>.</p>"""
    memory_strategies: NotRequired[
        "capo_opensearchmemory.types.memory_strategy_list.MemoryStrategyList"
    ]
    """<p>The memory strategies that extract memories from the space's events: up to 10 strategies, each with a name that is unique within the space.</p> <p>Optional. Omit it, or send an empty list, to create a space with no memory strategies. Such a space stores the conversation events you send it and returns them through <code>SearchEvents</code> and <code>ListEvents</code>, but extracts no memories and has none to search. You can add strategies later with <code>UpdateSpace</code>.</p> <p>The serialized list can be at most 384 KiB.</p>"""
    event_expiry_days: NotRequired[
        "capo_opensearchmemory.types.event_expiry_days.EventExpiryDays"
    ]
    """<p>How many days the space keeps each event, from 1 to 365. The default is 90.</p>"""
    memory_expiry_days: NotRequired[
        "capo_opensearchmemory.types.memory_expiry_days.MemoryExpiryDays"
    ]
    """<p>How many days the space keeps each memory, from 0 to 3650, counted from when the service writes the memory. Updating a memory with <code>UpdateMemory</code> doesn't restart the count. 0 means memories never expire. If you omit it, memories never expire.</p> <p>Searches and lists leave out a memory past its expiry, and reading, updating, or deleting it returns <code>ResourceNotFoundException</code>.</p>"""
    extraction_model_id: NotRequired[
        "capo_opensearchmemory.types.extraction_model_id.ExtractionModelId"
    ]
    """<p>The model that extracts and consolidates memories for every strategy in the space, as an Amazon Bedrock model ID without an inference-profile prefix: <code>anthropic.claude-opus-5-5</code> or <code>anthropic.claude-haiku-5-5</code>. Another value fails with <code>ValidationException</code>, and the message lists the supported IDs. Omit it to use the service default, which can change over time and isn't returned by <code>GetSpace</code>. Setting a value pins the model.</p>"""
    encryption_configuration: NotRequired[
        "capo_opensearchmemory.types.encryption_configuration.EncryptionConfiguration"
    ]
    """<p>The AWS KMS key that encrypts the space's data. Omit it, or omit its <code>kmsKeyArn</code>, to use an AWS owned key. You can't change the key after you create the space.</p>"""
    tags: NotRequired["capo_opensearchmemory.types.tag_list.TagList"]
    """<p>The tags to add to the space.</p>"""
    client_token: NotRequired["capo_opensearchmemory.types.client_token.ClientToken"]
    """<p>A unique, case-sensitive identifier that makes the request idempotent. A retry with the same token and the same parameters within 2 hours returns the space that the first request created, instead of creating another. Reusing the token with different parameters, or while the first request is still in progress, fails with <code>ConflictException</code>.</p>"""

client_token instance-attribute

client_token: NotRequired[ClientToken]

A unique, case-sensitive identifier that makes the request idempotent. A retry with the same token and the same parameters within 2 hours returns the space that the first request created, instead of creating another. Reusing the token with different parameters, or while the first request is still in progress, fails with ConflictException.

encryption_configuration instance-attribute

encryption_configuration: NotRequired[EncryptionConfiguration]

The AWS KMS key that encrypts the space's data. Omit it, or omit its kmsKeyArn, to use an AWS owned key. You can't change the key after you create the space.

event_expiry_days instance-attribute

event_expiry_days: NotRequired[EventExpiryDays]

How many days the space keeps each event, from 1 to 365. The default is 90.

extraction_model_id instance-attribute

extraction_model_id: NotRequired[ExtractionModelId]

The model that extracts and consolidates memories for every strategy in the space, as an Amazon Bedrock model ID without an inference-profile prefix: anthropic.claude-opus-5-5 or anthropic.claude-haiku-5-5. Another value fails with ValidationException, and the message lists the supported IDs. Omit it to use the service default, which can change over time and isn't returned by GetSpace. Setting a value pins the model.

memory_expiry_days instance-attribute

memory_expiry_days: NotRequired[MemoryExpiryDays]

How many days the space keeps each memory, from 0 to 3650, counted from when the service writes the memory. Updating a memory with UpdateMemory doesn't restart the count. 0 means memories never expire. If you omit it, memories never expire.

Searches and lists leave out a memory past its expiry, and reading, updating, or deleting it returns ResourceNotFoundException.

memory_strategies instance-attribute

memory_strategies: NotRequired[MemoryStrategyList]

The memory strategies that extract memories from the space's events: up to 10 strategies, each with a name that is unique within the space.

Optional. Omit it, or send an empty list, to create a space with no memory strategies. Such a space stores the conversation events you send it and returns them through SearchEvents and ListEvents, but extracts no memories and has none to search. You can add strategies later with UpdateSpace.

The serialized list can be at most 384 KiB.

name instance-attribute

name: SpaceName

A name for the space, unique within your account in the Region. If another space already has the name, the request fails with ConflictException.

tags instance-attribute

tags: NotRequired[TagList]

The tags to add to the space.