Interface CreateSpaceRequest.Builder

  • Method Details

    • name

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

      Parameters:
      name - A name for the space, unique within your account in the Region. If another space already has the name, the request fails with ConflictException.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      CreateSpaceRequest.Builder memoryStrategies(Collection<MemoryStrategy> memoryStrategies)

      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.

      Parameters:
      memoryStrategies - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      CreateSpaceRequest.Builder memoryStrategies(MemoryStrategy... memoryStrategies)

      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.

      Parameters:
      memoryStrategies - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryStrategies

      CreateSpaceRequest.Builder memoryStrategies(Consumer<MemoryStrategy.Builder>... memoryStrategies)

      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.

      This is a convenience method that creates an instance of the MemoryStrategy.Builder avoiding the need to create one manually via MemoryStrategy.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to memoryStrategies(List<MemoryStrategy>).

      Parameters:
      memoryStrategies - a consumer that will call methods on MemoryStrategy.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • eventExpiryDays

      CreateSpaceRequest.Builder eventExpiryDays(Integer eventExpiryDays)

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

      Parameters:
      eventExpiryDays - How many days the space keeps each event, from 1 to 365. The default is 90.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryExpiryDays

      CreateSpaceRequest.Builder memoryExpiryDays(Integer 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • extractionModelId

      CreateSpaceRequest.Builder extractionModelId(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • encryptionConfiguration

      CreateSpaceRequest.Builder encryptionConfiguration(EncryptionConfiguration 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • encryptionConfiguration

      default CreateSpaceRequest.Builder encryptionConfiguration(Consumer<EncryptionConfiguration.Builder> 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.

      This is a convenience method that creates an instance of the EncryptionConfiguration.Builder avoiding the need to create one manually via EncryptionConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to encryptionConfiguration(EncryptionConfiguration).

      Parameters:
      encryptionConfiguration - a consumer that will call methods on EncryptionConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      The tags to add to the space.

      Parameters:
      tags - The tags to add to the space.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      The tags to add to the space.

      Parameters:
      tags - The tags to add to the space.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      The tags to add to the space.

      This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • clientToken

      CreateSpaceRequest.Builder clientToken(String 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      CreateSpaceRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.