Skip to main content

aws_sdk_opensearchmemory/client/
get_memory.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetMemory`](crate::operation::get_memory::builders::GetMemoryFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`space_id(impl Into<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::space_id) / [`set_space_id(Option<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::set_space_id):<br>required: **true**<br><p>The ID of the space that holds the memory.</p><br>
7    ///   - [`memory_id(impl Into<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::memory_id) / [`set_memory_id(Option<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::set_memory_id):<br>required: **true**<br><p>The memory's ID, as returned by <code>SearchMemories</code> or <code>ListMemories</code>.</p><br>
8    ///   - [`actor_id(impl Into<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::actor_id) / [`set_actor_id(Option<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::set_actor_id):<br>required: **false**<br><p>The ID of the actor the memory must belong to. Omit it to skip this check. If it doesn't match the stored memory, the call fails with <code>ResourceNotFoundException</code>, as if the memory did not exist.</p><br>
9    ///   - [`strategy_name(impl Into<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::strategy_name) / [`set_strategy_name(Option<String>)`](crate::operation::get_memory::builders::GetMemoryFluentBuilder::set_strategy_name):<br>required: **false**<br><p>The name of the strategy the memory must belong to. Omit it to skip this check. If it doesn't match the stored memory, the call fails with <code>ResourceNotFoundException</code>, as if the memory did not exist.</p><br>
10    /// - On success, responds with [`GetMemoryOutput`](crate::operation::get_memory::GetMemoryOutput) with field(s):
11    ///   - [`memory(Option<Memory>)`](crate::operation::get_memory::GetMemoryOutput::memory): <p>The memory. Always present: a memory that doesn't exist returns <code>ResourceNotFoundException</code>.</p>
12    /// - On failure, responds with [`SdkError<GetMemoryError>`](crate::operation::get_memory::GetMemoryError)
13    pub fn get_memory(&self) -> crate::operation::get_memory::builders::GetMemoryFluentBuilder {
14        crate::operation::get_memory::builders::GetMemoryFluentBuilder::new(self.handle.clone())
15    }
16}