aws_sdk_pinpointsmsvoicev2/client/
request_phone_number.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 [`RequestPhoneNumber`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`iso_country_code(impl Into<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::iso_country_code) / [`set_iso_country_code(Option<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_iso_country_code):<br>required: **true**<br><p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p><br>
7    ///   - [`message_type(MessageType)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::message_type) / [`set_message_type(Option<MessageType>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_message_type):<br>required: **true**<br><p>The type of message. Valid values are <code>TRANSACTIONAL</code> for messages that are critical or time-sensitive and <code>PROMOTIONAL</code> for messages that aren't critical or time-sensitive.</p><br>
8    ///   - [`number_capabilities(NumberCapability)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::number_capabilities) / [`set_number_capabilities(Option<Vec::<NumberCapability>>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_number_capabilities):<br>required: **true**<br><p>Indicates if the phone number will be used for text messages, voice messages, or both.</p><br>
9    ///   - [`number_type(RequestableNumberType)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::number_type) / [`set_number_type(Option<RequestableNumberType>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_number_type):<br>required: **true**<br><p>The type of phone number to request.</p> <p>When you request a <code>SIMULATOR</code> phone number, you must set <b>MessageType</b> as <code>TRANSACTIONAL</code>.</p><br>
10    ///   - [`opt_out_list_name(impl Into<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::opt_out_list_name) / [`set_opt_out_list_name(Option<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_opt_out_list_name):<br>required: **false**<br><p>The name of the OptOutList to associate with the phone number. You can use the OptOutListName or OptOutListArn.</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>
11    ///   - [`pool_id(impl Into<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::pool_id) / [`set_pool_id(Option<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_pool_id):<br>required: **false**<br><p>The pool to associated with the phone number. You can use the 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>
12    ///   - [`registration_id(impl Into<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::registration_id) / [`set_registration_id(Option<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_registration_id):<br>required: **false**<br><p>Use this field to attach your phone number for an external registration process.</p><br>
13    ///   - [`international_sending_enabled(bool)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::international_sending_enabled) / [`set_international_sending_enabled(Option<bool>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_international_sending_enabled):<br>required: **false**<br><p>By default this is set to false. When set to true the international sending of phone number is Enabled.</p><br>
14    ///   - [`deletion_protection_enabled(bool)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::deletion_protection_enabled) / [`set_deletion_protection_enabled(Option<bool>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_deletion_protection_enabled):<br>required: **false**<br><p>By default this is set to false. When set to true the phone number can't be deleted.</p><br>
15    ///   - [`tags(Tag)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_tags):<br>required: **false**<br><p>An array of tags (key and value pairs) associate with the requested phone number.</p><br>
16    ///   - [`client_token(impl Into<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::set_client_token):<br>required: **false**<br><p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p><br>
17    /// - On success, responds with [`RequestPhoneNumberOutput`](crate::operation::request_phone_number::RequestPhoneNumberOutput) with field(s):
18    ///   - [`phone_number_arn(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::phone_number_arn): <p>The Amazon Resource Name (ARN) of the requested phone number.</p>
19    ///   - [`phone_number_id(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::phone_number_id): <p>The unique identifier of the new phone number.</p>
20    ///   - [`phone_number(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::phone_number): <p>The new phone number that was requested.</p>
21    ///   - [`status(Option<NumberStatus>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::status): <p>The current status of the request.</p>
22    ///   - [`iso_country_code(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::iso_country_code): <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.</p>
23    ///   - [`message_type(Option<MessageType>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::message_type): <p>The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.</p>
24    ///   - [`number_capabilities(Option<Vec::<NumberCapability>>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::number_capabilities): <p>Indicates if the phone number will be used for text messages, voice messages or both.</p>
25    ///   - [`number_type(Option<RequestableNumberType>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::number_type): <p>The type of number that was released.</p>
26    ///   - [`monthly_leasing_price(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::monthly_leasing_price): <p>The monthly price, in US dollars, to lease the phone number.</p>
27    ///   - [`two_way_enabled(bool)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::two_way_enabled): <p>By default this is set to false. When set to true you can receive incoming text messages from your end recipients.</p>
28    ///   - [`two_way_channel_arn(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::two_way_channel_arn): <p>The ARN used to identify the two way channel.</p>
29    ///   - [`two_way_channel_role(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::two_way_channel_role): <p>An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.</p>
30    ///   - [`self_managed_opt_outs_enabled(bool)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::self_managed_opt_outs_enabled): <p>By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.</p>
31    ///   - [`opt_out_list_name(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::opt_out_list_name): <p>The name of the OptOutList that is associated with the requested phone number.</p>
32    ///   - [`international_sending_enabled(bool)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::international_sending_enabled): <p>By default this is set to false. When set to true the international sending of phone number is Enabled.</p>
33    ///   - [`deletion_protection_enabled(bool)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::deletion_protection_enabled): <p>By default this is set to false. When set to true the phone number can't be deleted.</p>
34    ///   - [`pool_id(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::pool_id): <p>The unique identifier of the pool associated with the phone number</p>
35    ///   - [`registration_id(Option<String>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::registration_id): <p>The unique identifier for the registration.</p>
36    ///   - [`tags(Option<Vec::<Tag>>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::tags): <p>An array of key and value pair tags that are associated with the phone number.</p>
37    ///   - [`created_timestamp(Option<DateTime>)`](crate::operation::request_phone_number::RequestPhoneNumberOutput::created_timestamp): <p>The time when the phone number was created, in <a href="https://www.epochconverter.com/">UNIX epoch time</a> format.</p>
38    /// - On failure, responds with [`SdkError<RequestPhoneNumberError>`](crate::operation::request_phone_number::RequestPhoneNumberError)
39    pub fn request_phone_number(&self) -> crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder {
40        crate::operation::request_phone_number::builders::RequestPhoneNumberFluentBuilder::new(self.handle.clone())
41    }
42}