aws_sdk_bedrockagentruntime/client/create_session.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 [`CreateSession`](crate::operation::create_session::builders::CreateSessionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`session_metadata(impl Into<String>, impl Into<String>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::session_metadata) / [`set_session_metadata(Option<HashMap::<String, String>>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::set_session_metadata):<br>required: **false**<br><p>A map of key-value pairs containing attributes to be persisted across the session. For example, the user's ID, their language preference, and the type of device they are using.</p><br>
7 /// - [`encryption_key_arn(impl Into<String>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::encryption_key_arn) / [`set_encryption_key_arn(Option<String>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::set_encryption_key_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data. The user or role creating the session must have permission to use the key. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html">Amazon Bedrock session encryption</a>.</p><br>
8 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_session::builders::CreateSessionFluentBuilder::set_tags):<br>required: **false**<br><p>Specify the key-value pairs for the tags that you want to attach to the session.</p><br>
9 /// - On success, responds with [`CreateSessionOutput`](crate::operation::create_session::CreateSessionOutput) with field(s):
10 /// - [`session_id(String)`](crate::operation::create_session::CreateSessionOutput::session_id): <p>The unique identifier for the session.</p>
11 /// - [`session_arn(String)`](crate::operation::create_session::CreateSessionOutput::session_arn): <p>The Amazon Resource Name (ARN) of the created session.</p>
12 /// - [`session_status(SessionStatus)`](crate::operation::create_session::CreateSessionOutput::session_status): <p>The current status of the session.</p>
13 /// - [`created_at(DateTime)`](crate::operation::create_session::CreateSessionOutput::created_at): <p>The timestamp for when the session was created.</p>
14 /// - On failure, responds with [`SdkError<CreateSessionError>`](crate::operation::create_session::CreateSessionError)
15 pub fn create_session(&self) -> crate::operation::create_session::builders::CreateSessionFluentBuilder {
16 crate::operation::create_session::builders::CreateSessionFluentBuilder::new(self.handle.clone())
17 }
18}