aws_sdk_connectparticipant/client/send_message.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 [`SendMessage`](crate::operation::send_message::builders::SendMessageFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`content_type(impl Into<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::content_type) / [`set_content_type(Option<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::set_content_type):<br>required: **true**<br><p>The type of the content. Possible types are <code>text/plain</code>, <code>text/markdown</code>, <code>application/json</code>, and <code>application/vnd.amazonaws.connect.message.interactive.response</code>.</p> <p>Supported types on the contact are configured through <code>SupportedMessagingContentTypes</code> on <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> and <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundChatContact.html">StartOutboundChatContact</a>.</p> <p>For Apple Messages for Business, SMS, and WhatsApp Business Messaging contacts, only <code>text/plain</code> is supported.</p><br>
7 /// - [`content(impl Into<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::content) / [`set_content(Option<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::set_content):<br>required: **true**<br><p>The content of the message.</p> <ul> <li> <p>For <code>text/plain</code> and <code>text/markdown</code>, the Length Constraints are Minimum of 1, Maximum of 1024.</p></li> <li> <p>For <code>application/json</code>, the Length Constraints are Minimum of 1, Maximum of 12000.</p></li> <li> <p>For <code>application/vnd.amazonaws.connect.message.interactive.response</code>, the Length Constraints are Minimum of 1, Maximum of 12288.</p></li> </ul><br>
8 /// - [`client_token(impl Into<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p><br>
9 /// - [`connection_token(impl Into<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::connection_token) / [`set_connection_token(Option<String>)`](crate::operation::send_message::builders::SendMessageFluentBuilder::set_connection_token):<br>required: **true**<br><p>The authentication token associated with the connection.</p><br>
10 /// - On success, responds with [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput) with field(s):
11 /// - [`id(Option<String>)`](crate::operation::send_message::SendMessageOutput::id): <p>The ID of the message.</p>
12 /// - [`absolute_time(Option<String>)`](crate::operation::send_message::SendMessageOutput::absolute_time): <p>The time when the message was sent.</p> <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
13 /// - On failure, responds with [`SdkError<SendMessageError>`](crate::operation::send_message::SendMessageError)
14 pub fn send_message(&self) -> crate::operation::send_message::builders::SendMessageFluentBuilder {
15 crate::operation::send_message::builders::SendMessageFluentBuilder::new(self.handle.clone())
16 }
17}