aws_sdk_pinpointsmsvoicev2/client/
send_text_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 [`SendTextMessage`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`destination_phone_number(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::destination_phone_number) / [`set_destination_phone_number(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_destination_phone_number):<br>required: **true**<br><p>The destination phone number in E.164 format.</p><br>
7    ///   - [`origination_identity(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::origination_identity) / [`set_origination_identity(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_origination_identity):<br>required: **false**<br><p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>  <p>If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).</p> </important><br>
8    ///   - [`message_body(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::message_body) / [`set_message_body(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_message_body):<br>required: **false**<br><p>The body of the text message.</p><br>
9    ///   - [`message_type(MessageType)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::message_type) / [`set_message_type(Option<MessageType>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_message_type):<br>required: **false**<br><p>The type of message. Valid values are for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.</p><br>
10    ///   - [`keyword(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::keyword) / [`set_keyword(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_keyword):<br>required: **false**<br><p>When you register a short code in the US, you must specify a program name. If you don’t have a US short code, omit this attribute.</p><br>
11    ///   - [`configuration_set_name(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::configuration_set_name) / [`set_configuration_set_name(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_configuration_set_name):<br>required: **false**<br><p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p><br>
12    ///   - [`max_price(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::max_price) / [`set_max_price(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_max_price):<br>required: **false**<br><p>The maximum amount that you want to spend, in US dollars, per each text message. If the calculated amount to send the text message is greater than <code>MaxPrice</code>, the message is not sent and an error is returned.</p><br>
13    ///   - [`time_to_live(i32)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::time_to_live) / [`set_time_to_live(Option<i32>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_time_to_live):<br>required: **false**<br><p>How long the text message is valid for, in seconds. By default this is 72 hours. If the messages isn't handed off before the TTL expires we stop attempting to hand off the message and return <code>TTL_EXPIRED</code> event.</p><br>
14    ///   - [`context(impl Into<String>, impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::context) / [`set_context(Option<HashMap::<String, String>>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_context):<br>required: **false**<br><p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p><br>
15    ///   - [`destination_country_parameters(DestinationCountryParameterKey, impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::destination_country_parameters) / [`set_destination_country_parameters(Option<HashMap::<DestinationCountryParameterKey, String>>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_destination_country_parameters):<br>required: **false**<br><p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p> <ul>  <li>   <p><code>IN_ENTITY_ID</code> The entity ID or Principal Entity (PE) ID that you received after completing the sender ID registration process.</p></li>  <li>   <p><code>IN_TEMPLATE_ID</code> The template ID that you received after completing the sender ID registration process.</p><important>    <p>Make sure that the Template ID that you specify matches your message template exactly. If your message doesn't match the template that you provided during the registration process, the mobile carriers might reject your message.</p>   </important></li> </ul><br>
16    ///   - [`dry_run(bool)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_dry_run):<br>required: **false**<br><p>When set to true, the message is checked and validated, but isn't sent to the end recipient. You are not charged for using <code>DryRun</code>.</p> <p>The Message Parts per Second (MPS) limit when using <code>DryRun</code> is five. If your origination identity has a lower MPS limit then the lower MPS limit is used. For more information about MPS limits, see <a href="https://docs.aws.amazon.com/sms-voice/latest/userguide/sms-limitations-mps.html">Message Parts per Second (MPS) limits</a> in the <i>AWS End User Messaging SMS User Guide</i>..</p><br>
17    ///   - [`protect_configuration_id(impl Into<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::protect_configuration_id) / [`set_protect_configuration_id(Option<String>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_protect_configuration_id):<br>required: **false**<br><p>The unique identifier for the protect configuration.</p><br>
18    ///   - [`message_feedback_enabled(bool)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::message_feedback_enabled) / [`set_message_feedback_enabled(Option<bool>)`](crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::set_message_feedback_enabled):<br>required: **false**<br><p>Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using <code>PutMessageFeedback</code>.</p><br>
19    /// - On success, responds with [`SendTextMessageOutput`](crate::operation::send_text_message::SendTextMessageOutput) with field(s):
20    ///   - [`message_id(Option<String>)`](crate::operation::send_text_message::SendTextMessageOutput::message_id): <p>The unique identifier for the message.</p>
21    /// - On failure, responds with [`SdkError<SendTextMessageError>`](crate::operation::send_text_message::SendTextMessageError)
22    pub fn send_text_message(&self) -> crate::operation::send_text_message::builders::SendTextMessageFluentBuilder {
23        crate::operation::send_text_message::builders::SendTextMessageFluentBuilder::new(self.handle.clone())
24    }
25}