Interface OpenSearchMemoryAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface OpenSearchMemoryAsyncClient extends AwsClient
Service client for accessing Amazon OpenSearch Memory asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.

Amazon OpenSearch Memory lets your AI agents and applications recall facts and summaries across sessions. Your agents send events, such as conversation turns, and search the memories derived from them.

A space groups related events and memories, and holds the memory strategies that you configure for them. Use the space operations to create, get, list, update, and delete spaces. Use the event and memory operations to write, read, list, search, update, and delete a space's events and memories.

  • Field Details

  • Method Details

    • batchGetEvent

      default CompletableFuture<BatchGetEventResponse> batchGetEvent(BatchGetEventRequest batchGetEventRequest)

      Gets up to 10 events by ID, each as GetEvent returns it, including its payload.

      If you supply actorId or sessionId, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return in errors instead of failing, with an error code named for the exception that GetEvent would return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope as RESOURCE_NOT_FOUND.

      The exception is the space's customer managed AWS KMS key: if it is disabled, pending deletion, can't be used for decryption, or was deleted, the whole call fails with ValidationException, as GetEvent does.

      Parameters:
      batchGetEventRequest -
      Returns:
      A Java Future containing the result of the BatchGetEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • batchGetEvent

      default CompletableFuture<BatchGetEventResponse> batchGetEvent(Consumer<BatchGetEventRequest.Builder> batchGetEventRequest)

      Gets up to 10 events by ID, each as GetEvent returns it, including its payload.

      If you supply actorId or sessionId, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return in errors instead of failing, with an error code named for the exception that GetEvent would return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope as RESOURCE_NOT_FOUND.

      The exception is the space's customer managed AWS KMS key: if it is disabled, pending deletion, can't be used for decryption, or was deleted, the whole call fails with ValidationException, as GetEvent does.


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

      Parameters:
      batchGetEventRequest - A Consumer that will call methods on BatchGetEventRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the BatchGetEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createEvent

      default CompletableFuture<CreateEventResponse> createEvent(CreateEventRequest createEventRequest)

      Submits an event (conversation turns, structured data, or a PDF document stored in Amazon S3) to a session in a space.

      The operation returns as soon as the event is saved. GetEvent and ListEvents return it immediately. SearchEvents returns it after it's indexed. SearchMemories returns memories extracted from it only after a strategy's extraction trigger fires and the memories are indexed.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      createEventRequest -
      Returns:
      A Java Future containing the result of the CreateEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createEvent

      default CompletableFuture<CreateEventResponse> createEvent(Consumer<CreateEventRequest.Builder> createEventRequest)

      Submits an event (conversation turns, structured data, or a PDF document stored in Amazon S3) to a session in a space.

      The operation returns as soon as the event is saved. GetEvent and ListEvents return it immediately. SearchEvents returns it after it's indexed. SearchMemories returns memories extracted from it only after a strategy's extraction trigger fires and the memories are indexed.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      createEventRequest - A Consumer that will call methods on CreateEventRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createMemory

      default CompletableFuture<CreateMemoryResponse> createMemory(CreateMemoryRequest createMemoryRequest)

      Writes a memory that you have already formed, without extracting it from events. The service embeds the text as given and stores it as a memory of the named strategy. To have the service extract memories from conversation turns, use CreateEvent instead.

      The operation returns before the memory is searchable. The returned memoryId is final, but until the memory is indexed, GetMemory, UpdateMemory, and DeleteMemory return ResourceNotFoundException for it.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      createMemoryRequest - The request for CreateMemory.
      Returns:
      A Java Future containing the result of the CreateMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createMemory

      default CompletableFuture<CreateMemoryResponse> createMemory(Consumer<CreateMemoryRequest.Builder> createMemoryRequest)

      Writes a memory that you have already formed, without extracting it from events. The service embeds the text as given and stores it as a memory of the named strategy. To have the service extract memories from conversation turns, use CreateEvent instead.

      The operation returns before the memory is searchable. The returned memoryId is final, but until the memory is indexed, GetMemory, UpdateMemory, and DeleteMemory return ResourceNotFoundException for it.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      createMemoryRequest - A Consumer that will call methods on CreateMemoryRequest.Builder to create a request. The request for CreateMemory.
      Returns:
      A Java Future containing the result of the CreateMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createSpace

      default CompletableFuture<CreateSpaceResponse> createSpace(CreateSpaceRequest createSpaceRequest)

      Creates a space. A space is an AWS resource that stores the events you send and the memories extracted from them, and defines the memory strategies that extract those memories.

      The operation returns before provisioning finishes, with status CREATING. Call GetSpace until the status is ACTIVE, and then use the space. If provisioning fails, the status becomes FAILED and statusReason says why.

      Parameters:
      createSpaceRequest -
      Returns:
      A Java Future containing the result of the CreateSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • ServiceQuotaExceededException The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createSpace

      default CompletableFuture<CreateSpaceResponse> createSpace(Consumer<CreateSpaceRequest.Builder> createSpaceRequest)

      Creates a space. A space is an AWS resource that stores the events you send and the memories extracted from them, and defines the memory strategies that extract those memories.

      The operation returns before provisioning finishes, with status CREATING. Call GetSpace until the status is ACTIVE, and then use the space. If provisioning fails, the status becomes FAILED and statusReason says why.


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

      Parameters:
      createSpaceRequest - A Consumer that will call methods on CreateSpaceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • ServiceQuotaExceededException The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteEvent

      default CompletableFuture<DeleteEventResponse> deleteEvent(DeleteEventRequest deleteEventRequest)

      Deletes an event. Deletion can't be undone. The event stops appearing in SearchEvents results shortly after you delete it. Deleting an event that doesn't exist returns ResourceNotFoundException.

      Deleting an event doesn't delete the memories derived from it, because a memory can combine content from several events. To remove them, use DeleteMemory.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      deleteEventRequest -
      Returns:
      A Java Future containing the result of the DeleteEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteEvent

      default CompletableFuture<DeleteEventResponse> deleteEvent(Consumer<DeleteEventRequest.Builder> deleteEventRequest)

      Deletes an event. Deletion can't be undone. The event stops appearing in SearchEvents results shortly after you delete it. Deleting an event that doesn't exist returns ResourceNotFoundException.

      Deleting an event doesn't delete the memories derived from it, because a memory can combine content from several events. To remove them, use DeleteMemory.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      deleteEventRequest - A Consumer that will call methods on DeleteEventRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteMemory

      default CompletableFuture<DeleteMemoryResponse> deleteMemory(DeleteMemoryRequest deleteMemoryRequest)

      Deletes a memory, including its content and embedding. Deletion can't be undone. Searches stop returning the memory shortly after you delete it.

      Deleting a memory that no longer exists returns ResourceNotFoundException, so the operation is not idempotent. If you retry deletes, treat that error as success.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: the operation returns ResourceNotFoundException, as for a memory that was already deleted.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      deleteMemoryRequest -
      Returns:
      A Java Future containing the result of the DeleteMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteMemory

      default CompletableFuture<DeleteMemoryResponse> deleteMemory(Consumer<DeleteMemoryRequest.Builder> deleteMemoryRequest)

      Deletes a memory, including its content and embedding. Deletion can't be undone. Searches stop returning the memory shortly after you delete it.

      Deleting a memory that no longer exists returns ResourceNotFoundException, so the operation is not idempotent. If you retry deletes, treat that error as success.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: the operation returns ResourceNotFoundException, as for a memory that was already deleted.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      deleteMemoryRequest - A Consumer that will call methods on DeleteMemoryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteSpace

      default CompletableFuture<DeleteSpaceResponse> deleteSpace(DeleteSpaceRequest deleteSpaceRequest)

      Deletes a space and its memories. Deletion can't be undone. After you delete the space, you can't retrieve its events, and the service removes them when they reach their expiry.

      The operation returns with status DELETING. When deletion finishes, GetSpace returns ResourceNotFoundException. If deletion fails, the status becomes FAILED. A space that is CREATING or UPDATING can't be deleted until that finishes: the request fails with ConflictException. Deleting a space that is already DELETING returns DELETING again.

      Parameters:
      deleteSpaceRequest -
      Returns:
      A Java Future containing the result of the DeleteSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteSpace

      default CompletableFuture<DeleteSpaceResponse> deleteSpace(Consumer<DeleteSpaceRequest.Builder> deleteSpaceRequest)

      Deletes a space and its memories. Deletion can't be undone. After you delete the space, you can't retrieve its events, and the service removes them when they reach their expiry.

      The operation returns with status DELETING. When deletion finishes, GetSpace returns ResourceNotFoundException. If deletion fails, the status becomes FAILED. A space that is CREATING or UPDATING can't be deleted until that finishes: the request fails with ConflictException. Deleting a space that is already DELETING returns DELETING again.


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

      Parameters:
      deleteSpaceRequest - A Consumer that will call methods on DeleteSpaceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getEvent

      default CompletableFuture<GetEventResponse> getEvent(GetEventRequest getEventRequest)

      Gets an event by ID, including its payload.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      getEventRequest -
      Returns:
      A Java Future containing the result of the GetEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getEvent

      Gets an event by ID, including its payload.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      getEventRequest - A Consumer that will call methods on GetEventRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetEvent operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getMemory

      default CompletableFuture<GetMemoryResponse> getMemory(GetMemoryRequest getMemoryRequest)

      Gets a memory by ID, as returned by SearchMemories or ListMemories. A memory that doesn't exist returns ResourceNotFoundException. Unlike SearchMemories, this operation also returns memories that consolidation has superseded.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: ResourceNotFoundException, the same answer as for an ID that does not exist.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      getMemoryRequest -
      Returns:
      A Java Future containing the result of the GetMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getMemory

      default CompletableFuture<GetMemoryResponse> getMemory(Consumer<GetMemoryRequest.Builder> getMemoryRequest)

      Gets a memory by ID, as returned by SearchMemories or ListMemories. A memory that doesn't exist returns ResourceNotFoundException. Unlike SearchMemories, this operation also returns memories that consolidation has superseded.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: ResourceNotFoundException, the same answer as for an ID that does not exist.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      getMemoryRequest - A Consumer that will call methods on GetMemoryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getSpace

      default CompletableFuture<GetSpaceResponse> getSpace(GetSpaceRequest getSpaceRequest)

      Returns a space's configuration and status.

      Parameters:
      getSpaceRequest -
      Returns:
      A Java Future containing the result of the GetSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getSpace

      Returns a space's configuration and status.


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

      Parameters:
      getSpaceRequest - A Consumer that will call methods on GetSpaceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEvents

      default CompletableFuture<ListEventsResponse> listEvents(ListEventsRequest listEventsRequest)

      Lists the events in a session, sorted by time. Optionally limit the results to events whose eventTimestamp falls between eventTimestampAfter and eventTimestampBefore. Returns event metadata only. Call GetEvent for the payload. For full-text or relevance search, use SearchEvents.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      listEventsRequest -
      Returns:
      A Java Future containing the result of the ListEvents operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEvents

      default CompletableFuture<ListEventsResponse> listEvents(Consumer<ListEventsRequest.Builder> listEventsRequest)

      Lists the events in a session, sorted by time. Optionally limit the results to events whose eventTimestamp falls between eventTimestampAfter and eventTimestampBefore. Returns event metadata only. Call GetEvent for the payload. For full-text or relevance search, use SearchEvents.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      listEventsRequest - A Consumer that will call methods on ListEventsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListEvents operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEventsPaginator

      default ListEventsPublisher listEventsPaginator(ListEventsRequest listEventsRequest)

      This is a variant of listEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest) operation.

      Parameters:
      listEventsRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listEventsPaginator

      default ListEventsPublisher listEventsPaginator(Consumer<ListEventsRequest.Builder> listEventsRequest)

      This is a variant of listEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest) operation.


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

      Parameters:
      listEventsRequest - A Consumer that will call methods on ListEventsRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listMemories

      default CompletableFuture<ListMemoriesResponse> listMemories(ListMemoriesRequest listMemoriesRequest)

      Lists a space's memories without a query, for example the most recent memories or the memories of one strategy. Filter by strategy and optionally by owning actor or session, sort by creation or update time, and page through the results. Results have no relevance score. To query or filter by metadata, use SearchMemories.

      If memories are written or deleted while you page, the results can skip a memory or return it twice. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      Memories past their expiry (set from the space's memoryExpiryDays when each memory is written) are left out. Unlike SearchMemories, this operation also returns memories that consolidation has superseded.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      listMemoriesRequest -
      Returns:
      A Java Future containing the result of the ListMemories operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listMemories

      default CompletableFuture<ListMemoriesResponse> listMemories(Consumer<ListMemoriesRequest.Builder> listMemoriesRequest)

      Lists a space's memories without a query, for example the most recent memories or the memories of one strategy. Filter by strategy and optionally by owning actor or session, sort by creation or update time, and page through the results. Results have no relevance score. To query or filter by metadata, use SearchMemories.

      If memories are written or deleted while you page, the results can skip a memory or return it twice. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      Memories past their expiry (set from the space's memoryExpiryDays when each memory is written) are left out. Unlike SearchMemories, this operation also returns memories that consolidation has superseded.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      listMemoriesRequest - A Consumer that will call methods on ListMemoriesRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListMemories operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listMemoriesPaginator

      default ListMemoriesPublisher listMemoriesPaginator(ListMemoriesRequest listMemoriesRequest)

      This is a variant of listMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest) operation.

      Parameters:
      listMemoriesRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listMemoriesPaginator

      default ListMemoriesPublisher listMemoriesPaginator(Consumer<ListMemoriesRequest.Builder> listMemoriesRequest)

      This is a variant of listMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest) operation.


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

      Parameters:
      listMemoriesRequest - A Consumer that will call methods on ListMemoriesRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listSpaces

      default CompletableFuture<ListSpacesResponse> listSpaces(ListSpacesRequest listSpacesRequest)

      Lists the spaces in your account in the current Region.

      Parameters:
      listSpacesRequest -
      Returns:
      A Java Future containing the result of the ListSpaces operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listSpaces

      default CompletableFuture<ListSpacesResponse> listSpaces(Consumer<ListSpacesRequest.Builder> listSpacesRequest)

      Lists the spaces in your account in the current Region.


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

      Parameters:
      listSpacesRequest - A Consumer that will call methods on ListSpacesRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListSpaces operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listSpacesPaginator

      default ListSpacesPublisher listSpacesPaginator(ListSpacesRequest listSpacesRequest)

      This is a variant of listSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListSpacesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest) operation.

      Parameters:
      listSpacesRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listSpacesPaginator

      default ListSpacesPublisher listSpacesPaginator(Consumer<ListSpacesRequest.Builder> listSpacesRequest)

      This is a variant of listSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.ListSpacesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest) operation.


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

      Parameters:
      listSpacesRequest - A Consumer that will call methods on ListSpacesRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)

      Lists the tags for the specified space.

      Parameters:
      listTagsForResourceRequest -
      Returns:
      A Java Future containing the result of the ListTagsForResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)

      Lists the tags for the specified space.


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

      Parameters:
      listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListTagsForResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchEvents

      default CompletableFuture<SearchEventsResponse> searchEvents(SearchEventsRequest searchEventsRequest)

      Searches a space's events by relevance. It works like SearchMemories without the memory type and strategy selector. The query is a subset of the OpenSearch Query DSL. The service validates it, limits the search to the actor in actorId and the sessions in sessionIds, and returns ranked results. Each result is the matching chunk of an event, not the whole event. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      If the results are larger than 5 MiB, the request fails with ValidationException (reason queryBodyTooLarge). Lower maxResults.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      searchEventsRequest -
      Returns:
      A Java Future containing the result of the SearchEvents operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchEvents

      default CompletableFuture<SearchEventsResponse> searchEvents(Consumer<SearchEventsRequest.Builder> searchEventsRequest)

      Searches a space's events by relevance. It works like SearchMemories without the memory type and strategy selector. The query is a subset of the OpenSearch Query DSL. The service validates it, limits the search to the actor in actorId and the sessions in sessionIds, and returns ranked results. Each result is the matching chunk of an event, not the whole event. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      If the results are larger than 5 MiB, the request fails with ValidationException (reason queryBodyTooLarge). Lower maxResults.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      searchEventsRequest - A Consumer that will call methods on SearchEventsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the SearchEvents operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchEventsPaginator

      default SearchEventsPublisher searchEventsPaginator(SearchEventsRequest searchEventsRequest)

      This is a variant of searchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.SearchEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the searchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest) operation.

      Parameters:
      searchEventsRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchEventsPaginator

      default SearchEventsPublisher searchEventsPaginator(Consumer<SearchEventsRequest.Builder> searchEventsRequest)

      This is a variant of searchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.SearchEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the searchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest) operation.


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

      Parameters:
      searchEventsRequest - A Consumer that will call methods on SearchEventsRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchMemories

      default CompletableFuture<SearchMemoriesResponse> searchMemories(SearchMemoriesRequest searchMemoriesRequest)

      Searches a space's memories by relevance. The query is a subset of the OpenSearch Query DSL. The service validates it, limits the search to the requested strategies and to the actor in actorId, and returns one ranked list of memories. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      Memories past their expiry (set from the space's memoryExpiryDays when each memory is written) are left out of the results. Only current memories are returned: a memory that consolidation has superseded (an older version of a fact that a newer memory replaced) is left out.

      If the results are larger than 5 MiB, the request fails with ValidationException (reason queryBodyTooLarge). Lower maxResults.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      searchMemoriesRequest -
      Returns:
      A Java Future containing the result of the SearchMemories operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchMemories

      default CompletableFuture<SearchMemoriesResponse> searchMemories(Consumer<SearchMemoriesRequest.Builder> searchMemoriesRequest)

      Searches a space's memories by relevance. The query is a subset of the OpenSearch Query DSL. The service validates it, limits the search to the requested strategies and to the actor in actorId, and returns one ranked list of memories. You can page through only a limited number of results. A request past that limit fails with ValidationException (reason invalidNextToken), and the message gives the limit.

      Memories past their expiry (set from the space's memoryExpiryDays when each memory is written) are left out of the results. Only current memories are returned: a memory that consolidation has superseded (an older version of a fact that a newer memory replaced) is left out.

      If the results are larger than 5 MiB, the request fails with ValidationException (reason queryBodyTooLarge). Lower maxResults.

      If the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      searchMemoriesRequest - A Consumer that will call methods on SearchMemoriesRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the SearchMemories operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchMemoriesPaginator

      default SearchMemoriesPublisher searchMemoriesPaginator(SearchMemoriesRequest searchMemoriesRequest)

      This is a variant of searchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the searchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest) operation.

      Parameters:
      searchMemoriesRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchMemoriesPaginator

      default SearchMemoriesPublisher searchMemoriesPaginator(Consumer<SearchMemoriesRequest.Builder> searchMemoriesRequest)

      This is a variant of searchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the searchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest) operation.


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

      Parameters:
      searchMemoriesRequest - A Consumer that will call methods on SearchMemoriesRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)

      Adds the specified tags to the specified space.

      Parameters:
      tagResourceRequest -
      Returns:
      A Java Future containing the result of the TagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)

      Adds the specified tags to the specified space.


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

      Parameters:
      tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the TagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)

      Removes the specified tags from the specified space.

      Parameters:
      untagResourceRequest -
      Returns:
      A Java Future containing the result of the UntagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)

      Removes the specified tags from the specified space.


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

      Parameters:
      untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UntagResource operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateMemory

      default CompletableFuture<UpdateMemoryResponse> updateMemory(UpdateMemoryRequest updateMemoryRequest)

      Updates a memory in place. Supply only the fields to change. Omitted fields keep their stored values. A request must supply content or metadata, or it fails with ValidationException. Supplying content re-embeds the memory. A change to metadata alone doesn't.

      The memory keeps its memoryId across updates. Shortly after an update, searches stop returning the previous content.

      memoryType can't be changed. To change it, delete the memory and create a new one.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: the operation fails with ResourceNotFoundException and changes nothing. An update does not move the expiry.

      Concurrent updates to one memory are last-writer-wins. There is no version check. To avoid lost updates, serialize your updates to a memory.

      If you supply content and the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.

      Parameters:
      updateMemoryRequest -
      Returns:
      A Java Future containing the result of the UpdateMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateMemory

      default CompletableFuture<UpdateMemoryResponse> updateMemory(Consumer<UpdateMemoryRequest.Builder> updateMemoryRequest)

      Updates a memory in place. Supply only the fields to change. Omitted fields keep their stored values. A request must supply content or metadata, or it fails with ValidationException. Supplying content re-embeds the memory. A change to metadata alone doesn't.

      The memory keeps its memoryId across updates. Shortly after an update, searches stop returning the previous content.

      memoryType can't be changed. To change it, delete the memory and create a new one.

      A memory past its expiry (set from the space's memoryExpiryDays when the memory is written) reads as not found: the operation fails with ResourceNotFoundException and changes nothing. An update does not move the expiry.

      Concurrent updates to one memory are last-writer-wins. There is no version check. To avoid lost updates, serialize your updates to a memory.

      If you supply content and the request would exceed the service's rate for embedding requests, it fails with ThrottlingException. Retry with exponential backoff.

      If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with AccessDeniedException if you aren't allowed to use the key, and with ThrottlingException if AWS KMS throttles the request. It fails with ValidationException if the key is disabled, pending deletion, or deleted.


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

      Parameters:
      updateMemoryRequest - A Consumer that will call methods on UpdateMemoryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UpdateMemory operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateSpace

      default CompletableFuture<UpdateSpaceResponse> updateSpace(UpdateSpaceRequest updateSpaceRequest)

      Updates a space's memory strategies, retention settings, or extraction model. Supply only the fields to change. Omitted fields keep their current values.

      If the request changes the set of strategies, a strategy's configuration, a retention setting, or the extraction model, the space moves to UPDATING. When the change is complete, the space returns to ACTIVE, or moves to FAILED if the change can't be applied. While the space is UPDATING, GetSpace returns the previous configuration. A request that only changes strategy descriptions or repeats the values the space has stored is applied immediately and doesn't change the status. Sending a retention value that the space never set also moves the space to UPDATING, even one that matches the behavior without it, such as 90 for eventExpiryDays or 0 for memoryExpiryDays. A space that is CREATING, UPDATING, or DELETING can't be updated: the request fails with ConflictException.

      Parameters:
      updateSpaceRequest -
      Returns:
      A Java Future containing the result of the UpdateSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • ServiceQuotaExceededException The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateSpace

      default CompletableFuture<UpdateSpaceResponse> updateSpace(Consumer<UpdateSpaceRequest.Builder> updateSpaceRequest)

      Updates a space's memory strategies, retention settings, or extraction model. Supply only the fields to change. Omitted fields keep their current values.

      If the request changes the set of strategies, a strategy's configuration, a retention setting, or the extraction model, the space moves to UPDATING. When the change is complete, the space returns to ACTIVE, or moves to FAILED if the change can't be applied. While the space is UPDATING, GetSpace returns the previous configuration. A request that only changes strategy descriptions or repeats the values the space has stored is applied immediately and doesn't change the status. Sending a retention value that the space never set also moves the space to UPDATING, even one that matches the behavior without it, such as 90 for eventExpiryDays or 0 for memoryExpiryDays. A space that is CREATING, UPDATING, or DELETING can't be updated: the request fails with ConflictException.


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

      Parameters:
      updateSpaceRequest - A Consumer that will call methods on UpdateSpaceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UpdateSpace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
      • ResourceNotFoundException The specified resource doesn't exist. Check the IDs in the request.
      • AccessDeniedException You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
      • ThrottlingException The service throttled the request. Retry the request with exponential backoff.
      • ServiceQuotaExceededException The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.
      • InternalServerException The service couldn't process the request because of an internal error. Retry the request.
      • ValidationException The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • OpenSearchMemoryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • waiter

      default OpenSearchMemoryAsyncWaiter waiter()
      Create an instance of OpenSearchMemoryAsyncWaiter using this client.

      Waiters created via this method are managed by the SDK and resources will be released when the service client is closed.

      Returns:
      an instance of OpenSearchMemoryAsyncWaiter
    • serviceClientConfiguration

      default OpenSearchMemoryServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static OpenSearchMemoryAsyncClient create()
      Create a OpenSearchMemoryAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a OpenSearchMemoryAsyncClient.