Interface OpenSearchMemoryAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableFuture<BatchGetEventResponse> batchGetEvent(Consumer<BatchGetEventRequest.Builder> batchGetEventRequest) Gets up to 10 events by ID, each asGetEventreturns it, including its payload.default CompletableFuture<BatchGetEventResponse> batchGetEvent(BatchGetEventRequest batchGetEventRequest) Gets up to 10 events by ID, each asGetEventreturns it, including its payload.builder()Create a builder that can be used to configure and create aOpenSearchMemoryAsyncClient.static OpenSearchMemoryAsyncClientcreate()Create aOpenSearchMemoryAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.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.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.default CompletableFuture<CreateMemoryResponse> createMemory(Consumer<CreateMemoryRequest.Builder> createMemoryRequest) Writes a memory that you have already formed, without extracting it from events.default CompletableFuture<CreateMemoryResponse> createMemory(CreateMemoryRequest createMemoryRequest) Writes a memory that you have already formed, without extracting it from events.default CompletableFuture<CreateSpaceResponse> createSpace(Consumer<CreateSpaceRequest.Builder> createSpaceRequest) Creates a space.default CompletableFuture<CreateSpaceResponse> createSpace(CreateSpaceRequest createSpaceRequest) Creates a space.default CompletableFuture<DeleteEventResponse> deleteEvent(Consumer<DeleteEventRequest.Builder> deleteEventRequest) Deletes an event.default CompletableFuture<DeleteEventResponse> deleteEvent(DeleteEventRequest deleteEventRequest) Deletes an event.default CompletableFuture<DeleteMemoryResponse> deleteMemory(Consumer<DeleteMemoryRequest.Builder> deleteMemoryRequest) Deletes a memory, including its content and embedding.default CompletableFuture<DeleteMemoryResponse> deleteMemory(DeleteMemoryRequest deleteMemoryRequest) Deletes a memory, including its content and embedding.default CompletableFuture<DeleteSpaceResponse> deleteSpace(Consumer<DeleteSpaceRequest.Builder> deleteSpaceRequest) Deletes a space and its memories.default CompletableFuture<DeleteSpaceResponse> deleteSpace(DeleteSpaceRequest deleteSpaceRequest) Deletes a space and its memories.default CompletableFuture<GetEventResponse> getEvent(Consumer<GetEventRequest.Builder> getEventRequest) Gets an event by ID, including its payload.default CompletableFuture<GetEventResponse> getEvent(GetEventRequest getEventRequest) Gets an event by ID, including its payload.default CompletableFuture<GetMemoryResponse> getMemory(Consumer<GetMemoryRequest.Builder> getMemoryRequest) Gets a memory by ID, as returned bySearchMemoriesorListMemories.default CompletableFuture<GetMemoryResponse> getMemory(GetMemoryRequest getMemoryRequest) Gets a memory by ID, as returned bySearchMemoriesorListMemories.default CompletableFuture<GetSpaceResponse> getSpace(Consumer<GetSpaceRequest.Builder> getSpaceRequest) Returns a space's configuration and status.default CompletableFuture<GetSpaceResponse> getSpace(GetSpaceRequest getSpaceRequest) Returns a space's configuration and status.default CompletableFuture<ListEventsResponse> listEvents(Consumer<ListEventsRequest.Builder> listEventsRequest) Lists the events in a session, sorted by time.default CompletableFuture<ListEventsResponse> listEvents(ListEventsRequest listEventsRequest) Lists the events in a session, sorted by time.default ListEventsPublisherlistEventsPaginator(Consumer<ListEventsRequest.Builder> listEventsRequest) This is a variant oflistEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest)operation.default ListEventsPublisherlistEventsPaginator(ListEventsRequest listEventsRequest) This is a variant oflistEvents(software.amazon.awssdk.services.opensearchmemory.model.ListEventsRequest)operation.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.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.default ListMemoriesPublisherlistMemoriesPaginator(Consumer<ListMemoriesRequest.Builder> listMemoriesRequest) This is a variant oflistMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest)operation.default ListMemoriesPublisherlistMemoriesPaginator(ListMemoriesRequest listMemoriesRequest) This is a variant oflistMemories(software.amazon.awssdk.services.opensearchmemory.model.ListMemoriesRequest)operation.default CompletableFuture<ListSpacesResponse> listSpaces(Consumer<ListSpacesRequest.Builder> listSpacesRequest) Lists the spaces in your account in the current Region.default CompletableFuture<ListSpacesResponse> listSpaces(ListSpacesRequest listSpacesRequest) Lists the spaces in your account in the current Region.default ListSpacesPublisherlistSpacesPaginator(Consumer<ListSpacesRequest.Builder> listSpacesRequest) This is a variant oflistSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest)operation.default ListSpacesPublisherlistSpacesPaginator(ListSpacesRequest listSpacesRequest) This is a variant oflistSpaces(software.amazon.awssdk.services.opensearchmemory.model.ListSpacesRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the tags for the specified space.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the tags for the specified space.default CompletableFuture<SearchEventsResponse> searchEvents(Consumer<SearchEventsRequest.Builder> searchEventsRequest) Searches a space's events by relevance.default CompletableFuture<SearchEventsResponse> searchEvents(SearchEventsRequest searchEventsRequest) Searches a space's events by relevance.default SearchEventsPublishersearchEventsPaginator(Consumer<SearchEventsRequest.Builder> searchEventsRequest) This is a variant ofsearchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest)operation.default SearchEventsPublishersearchEventsPaginator(SearchEventsRequest searchEventsRequest) This is a variant ofsearchEvents(software.amazon.awssdk.services.opensearchmemory.model.SearchEventsRequest)operation.default CompletableFuture<SearchMemoriesResponse> searchMemories(Consumer<SearchMemoriesRequest.Builder> searchMemoriesRequest) Searches a space's memories by relevance.default CompletableFuture<SearchMemoriesResponse> searchMemories(SearchMemoriesRequest searchMemoriesRequest) Searches a space's memories by relevance.default SearchMemoriesPublishersearchMemoriesPaginator(Consumer<SearchMemoriesRequest.Builder> searchMemoriesRequest) This is a variant ofsearchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest)operation.default SearchMemoriesPublishersearchMemoriesPaginator(SearchMemoriesRequest searchMemoriesRequest) This is a variant ofsearchMemories(software.amazon.awssdk.services.opensearchmemory.model.SearchMemoriesRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Adds the specified tags to the specified space.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Adds the specified tags to the specified space.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes the specified tags from the specified space.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes the specified tags from the specified space.default CompletableFuture<UpdateMemoryResponse> updateMemory(Consumer<UpdateMemoryRequest.Builder> updateMemoryRequest) Updates a memory in place.default CompletableFuture<UpdateMemoryResponse> updateMemory(UpdateMemoryRequest updateMemoryRequest) Updates a memory in place.default CompletableFuture<UpdateSpaceResponse> updateSpace(Consumer<UpdateSpaceRequest.Builder> updateSpaceRequest) Updates a space's memory strategies, retention settings, or extraction model.default CompletableFuture<UpdateSpaceResponse> updateSpace(UpdateSpaceRequest updateSpaceRequest) Updates a space's memory strategies, retention settings, or extraction model.default OpenSearchMemoryAsyncWaiterwaiter()Create an instance ofOpenSearchMemoryAsyncWaiterusing this client.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
batchGetEvent
default CompletableFuture<BatchGetEventResponse> batchGetEvent(BatchGetEventRequest batchGetEventRequest) Gets up to 10 events by ID, each as
GetEventreturns it, including its payload.If you supply
actorIdorsessionId, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return inerrorsinstead of failing, with an error code named for the exception thatGetEventwould return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope asRESOURCE_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, asGetEventdoes.- 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 invokeThrowable.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, andfieldListmembers 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
GetEventreturns it, including its payload.If you supply
actorIdorsessionId, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return inerrorsinstead of failing, with an error code named for the exception thatGetEventwould return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope asRESOURCE_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, asGetEventdoes.
This is a convenience which creates an instance of the
BatchGetEventRequest.Builderavoiding the need to create one manually viaBatchGetEventRequest.builder()- Parameters:
batchGetEventRequest- AConsumerthat will call methods onBatchGetEventRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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.
GetEventandListEventsreturn it immediately.SearchEventsreturns it after it's indexed.SearchMemoriesreturns 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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.
GetEventandListEventsreturn it immediately.SearchEventsreturns it after it's indexed.SearchMemoriesreturns 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
CreateEventRequest.Builderavoiding the need to create one manually viaCreateEventRequest.builder()- Parameters:
createEventRequest- AConsumerthat will call methods onCreateEventRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
CreateEventinstead.The operation returns before the memory is searchable. The returned
memoryIdis final, but until the memory is indexed,GetMemory,UpdateMemory, andDeleteMemoryreturnResourceNotFoundExceptionfor 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.- Parameters:
createMemoryRequest- The request forCreateMemory.- 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 invokeThrowable.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, andfieldListmembers 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
CreateEventinstead.The operation returns before the memory is searchable. The returned
memoryIdis final, but until the memory is indexed,GetMemory,UpdateMemory, andDeleteMemoryreturnResourceNotFoundExceptionfor 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
CreateMemoryRequest.Builderavoiding the need to create one manually viaCreateMemoryRequest.builder()- Parameters:
createMemoryRequest- AConsumerthat will call methods onCreateMemoryRequest.Builderto create a request. The request forCreateMemory.- 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 invokeThrowable.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, andfieldListmembers 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
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
statusCREATING. CallGetSpaceuntil the status isACTIVE, and then use the space. If provisioning fails, the status becomesFAILEDandstatusReasonsays 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 invokeThrowable.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, andfieldListmembers 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
statusCREATING. CallGetSpaceuntil the status isACTIVE, and then use the space. If provisioning fails, the status becomesFAILEDandstatusReasonsays why.
This is a convenience which creates an instance of the
CreateSpaceRequest.Builderavoiding the need to create one manually viaCreateSpaceRequest.builder()- Parameters:
createSpaceRequest- AConsumerthat will call methods onCreateSpaceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
Deletes an event. Deletion can't be undone. The event stops appearing in
SearchEventsresults shortly after you delete it. Deleting an event that doesn't exist returnsResourceNotFoundException.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
SearchEventsresults shortly after you delete it. Deleting an event that doesn't exist returnsResourceNotFoundException.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
DeleteEventRequest.Builderavoiding the need to create one manually viaDeleteEventRequest.builder()- Parameters:
deleteEventRequest- AConsumerthat will call methods onDeleteEventRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
memoryExpiryDayswhen the memory is written) reads as not found: the operation returnsResourceNotFoundException, 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
memoryExpiryDayswhen the memory is written) reads as not found: the operation returnsResourceNotFoundException, 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
DeleteMemoryRequest.Builderavoiding the need to create one manually viaDeleteMemoryRequest.builder()- Parameters:
deleteMemoryRequest- AConsumerthat will call methods onDeleteMemoryRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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
statusDELETING. When deletion finishes,GetSpacereturnsResourceNotFoundException. If deletion fails, the status becomesFAILED. A space that isCREATINGorUPDATINGcan't be deleted until that finishes: the request fails withConflictException. Deleting a space that is alreadyDELETINGreturnsDELETINGagain.- 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 invokeThrowable.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, andfieldListmembers 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
statusDELETING. When deletion finishes,GetSpacereturnsResourceNotFoundException. If deletion fails, the status becomesFAILED. A space that isCREATINGorUPDATINGcan't be deleted until that finishes: the request fails withConflictException. Deleting a space that is alreadyDELETINGreturnsDELETINGagain.
This is a convenience which creates an instance of the
DeleteSpaceRequest.Builderavoiding the need to create one manually viaDeleteSpaceRequest.builder()- Parameters:
deleteSpaceRequest- AConsumerthat will call methods onDeleteSpaceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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(Consumer<GetEventRequest.Builder> 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
GetEventRequest.Builderavoiding the need to create one manually viaGetEventRequest.builder()- Parameters:
getEventRequest- AConsumerthat will call methods onGetEventRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
Gets a memory by ID, as returned by
SearchMemoriesorListMemories. A memory that doesn't exist returnsResourceNotFoundException. UnlikeSearchMemories, this operation also returns memories that consolidation has superseded.A memory past its expiry (set from the space's
memoryExpiryDayswhen 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
SearchMemoriesorListMemories. A memory that doesn't exist returnsResourceNotFoundException. UnlikeSearchMemories, this operation also returns memories that consolidation has superseded.A memory past its expiry (set from the space's
memoryExpiryDayswhen 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
GetMemoryRequest.Builderavoiding the need to create one manually viaGetMemoryRequest.builder()- Parameters:
getMemoryRequest- AConsumerthat will call methods onGetMemoryRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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.
- 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 invokeThrowable.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, andfieldListmembers 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(Consumer<GetSpaceRequest.Builder> getSpaceRequest) Returns a space's configuration and status.
This is a convenience which creates an instance of the
GetSpaceRequest.Builderavoiding the need to create one manually viaGetSpaceRequest.builder()- Parameters:
getSpaceRequest- AConsumerthat will call methods onGetSpaceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
Lists the events in a session, sorted by time. Optionally limit the results to events whose
eventTimestampfalls betweeneventTimestampAfterandeventTimestampBefore. Returns event metadata only. CallGetEventfor the payload. For full-text or relevance search, useSearchEvents.If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
eventTimestampfalls betweeneventTimestampAfterandeventTimestampBefore. Returns event metadata only. CallGetEventfor the payload. For full-text or relevance search, useSearchEvents.If the space uses a customer managed AWS KMS key, the call can also fail because of the key. It fails with
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
ListEventsRequest.Builderavoiding the need to create one manually viaListEventsRequest.builder()- Parameters:
listEventsRequest- AConsumerthat will call methods onListEventsRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaListEventsRequest.builder()- Parameters:
listEventsRequest- AConsumerthat will call methods onListEventsRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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(reasoninvalidNextToken), and the message gives the limit.Memories past their expiry (set from the space's
memoryExpiryDayswhen each memory is written) are left out. UnlikeSearchMemories, 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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(reasoninvalidNextToken), and the message gives the limit.Memories past their expiry (set from the space's
memoryExpiryDayswhen each memory is written) are left out. UnlikeSearchMemories, 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
ListMemoriesRequest.Builderavoiding the need to create one manually viaListMemoriesRequest.builder()- Parameters:
listMemoriesRequest- AConsumerthat will call methods onListMemoriesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListMemoriesPublisher publisher = client.listMemoriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaListMemoriesRequest.builder()- Parameters:
listMemoriesRequest- AConsumerthat will call methods onListMemoriesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 invokeThrowable.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, andfieldListmembers 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.Builderavoiding the need to create one manually viaListSpacesRequest.builder()- Parameters:
listSpacesRequest- AConsumerthat will call methods onListSpacesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.ListSpacesPublisher publisher = client.listSpacesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaListSpacesRequest.builder()- Parameters:
listSpacesRequest- AConsumerthat will call methods onListSpacesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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 invokeThrowable.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, andfieldListmembers 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.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
SearchMemorieswithout 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 inactorIdand the sessions insessionIds, 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 withValidationException(reasoninvalidNextToken), and the message gives the limit.If the results are larger than 5 MiB, the request fails with
ValidationException(reasonqueryBodyTooLarge). LowermaxResults.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
SearchMemorieswithout 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 inactorIdand the sessions insessionIds, 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 withValidationException(reasoninvalidNextToken), and the message gives the limit.If the results are larger than 5 MiB, the request fails with
ValidationException(reasonqueryBodyTooLarge). LowermaxResults.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
SearchEventsRequest.Builderavoiding the need to create one manually viaSearchEventsRequest.builder()- Parameters:
searchEventsRequest- AConsumerthat will call methods onSearchEventsRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.SearchEventsPublisher publisher = client.searchEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaSearchEventsRequest.builder()- Parameters:
searchEventsRequest- AConsumerthat will call methods onSearchEventsRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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 withValidationException(reasoninvalidNextToken), and the message gives the limit.Memories past their expiry (set from the space's
memoryExpiryDayswhen 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(reasonqueryBodyTooLarge). LowermaxResults.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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 withValidationException(reasoninvalidNextToken), and the message gives the limit.Memories past their expiry (set from the space's
memoryExpiryDayswhen 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(reasonqueryBodyTooLarge). LowermaxResults.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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
SearchMemoriesRequest.Builderavoiding the need to create one manually viaSearchMemoriesRequest.builder()- Parameters:
searchMemoriesRequest- AConsumerthat will call methods onSearchMemoriesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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, andfieldListmembers 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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.opensearchmemory.paginators.SearchMemoriesPublisher publisher = client.searchMemoriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaSearchMemoriesRequest.builder()- Parameters:
searchMemoriesRequest- AConsumerthat will call methods onSearchMemoriesRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 invokeThrowable.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, andfieldListmembers 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.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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 invokeThrowable.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, andfieldListmembers 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.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
contentormetadata, or it fails withValidationException. Supplyingcontentre-embeds the memory. A change to metadata alone doesn't.The memory keeps its
memoryIdacross updates. Shortly after an update, searches stop returning the previous content.memoryTypecan't be changed. To change it, delete the memory and create a new one.A memory past its expiry (set from the space's
memoryExpiryDayswhen the memory is written) reads as not found: the operation fails withResourceNotFoundExceptionand 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
contentand the request would exceed the service's rate for embedding requests, it fails withThrottlingException. 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif 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 invokeThrowable.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, andfieldListmembers 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
contentormetadata, or it fails withValidationException. Supplyingcontentre-embeds the memory. A change to metadata alone doesn't.The memory keeps its
memoryIdacross updates. Shortly after an update, searches stop returning the previous content.memoryTypecan't be changed. To change it, delete the memory and create a new one.A memory past its expiry (set from the space's
memoryExpiryDayswhen the memory is written) reads as not found: the operation fails withResourceNotFoundExceptionand 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
contentand the request would exceed the service's rate for embedding requests, it fails withThrottlingException. 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
AccessDeniedExceptionif you aren't allowed to use the key, and withThrottlingExceptionif AWS KMS throttles the request. It fails withValidationExceptionif the key is disabled, pending deletion, or deleted.
This is a convenience which creates an instance of the
UpdateMemoryRequest.Builderavoiding the need to create one manually viaUpdateMemoryRequest.builder()- Parameters:
updateMemoryRequest- AConsumerthat will call methods onUpdateMemoryRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
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 toACTIVE, or moves toFAILEDif the change can't be applied. While the space isUPDATING,GetSpacereturns 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 toUPDATING, even one that matches the behavior without it, such as 90 foreventExpiryDaysor 0 formemoryExpiryDays. A space that isCREATING,UPDATING, orDELETINGcan't be updated: the request fails withConflictException.- 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 invokeThrowable.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, andfieldListmembers 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 toACTIVE, or moves toFAILEDif the change can't be applied. While the space isUPDATING,GetSpacereturns 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 toUPDATING, even one that matches the behavior without it, such as 90 foreventExpiryDaysor 0 formemoryExpiryDays. A space that isCREATING,UPDATING, orDELETINGcan't be updated: the request fails withConflictException.
This is a convenience which creates an instance of the
UpdateSpaceRequest.Builderavoiding the need to create one manually viaUpdateSpaceRequest.builder()- Parameters:
updateSpaceRequest- AConsumerthat will call methods onUpdateSpaceRequest.Builderto 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 invokeThrowable.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, andfieldListmembers 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
Create an instance ofOpenSearchMemoryAsyncWaiterusing 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
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aOpenSearchMemoryAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aOpenSearchMemoryAsyncClient.
-