aws_sdk_connect/client/
search_available_phone_numbers.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 [`SearchAvailablePhoneNumbers`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`target_arn(impl Into<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::target_arn) / [`set_target_arn(Option<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_target_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through. You must enter <code>InstanceId</code> or <code>TargetArn</code>.</p><br>
8    ///   - [`instance_id(impl Into<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_instance_id):<br>required: **false**<br><p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance. You must enter <code>InstanceId</code> or <code>TargetArn</code>.</p><br>
9    ///   - [`phone_number_country_code(PhoneNumberCountryCode)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::phone_number_country_code) / [`set_phone_number_country_code(Option<PhoneNumberCountryCode>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_phone_number_country_code):<br>required: **true**<br><p>The ISO country code.</p><br>
10    ///   - [`phone_number_type(PhoneNumberType)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::phone_number_type) / [`set_phone_number_type(Option<PhoneNumberType>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_phone_number_type):<br>required: **true**<br><p>The type of phone number.</p><br>
11    ///   - [`phone_number_prefix(impl Into<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::phone_number_prefix) / [`set_phone_number_prefix(Option<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_phone_number_prefix):<br>required: **false**<br><p>The prefix of the phone number. If provided, it must contain <code>+</code> as part of the country code.</p><br>
12    ///   - [`max_results(i32)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of results to return per page.</p><br>
13    ///   - [`next_token(impl Into<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::set_next_token):<br>required: **false**<br><p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p><br>
14    /// - On success, responds with [`SearchAvailablePhoneNumbersOutput`](crate::operation::search_available_phone_numbers::SearchAvailablePhoneNumbersOutput) with field(s):
15    ///   - [`next_token(Option<String>)`](crate::operation::search_available_phone_numbers::SearchAvailablePhoneNumbersOutput::next_token): <p>If there are additional results, this is the token for the next set of results.</p>
16    ///   - [`available_numbers_list(Option<Vec::<AvailableNumberSummary>>)`](crate::operation::search_available_phone_numbers::SearchAvailablePhoneNumbersOutput::available_numbers_list): <p>A list of available phone numbers that you can claim to your Amazon Connect instance or traffic distribution group.</p>
17    /// - On failure, responds with [`SdkError<SearchAvailablePhoneNumbersError>`](crate::operation::search_available_phone_numbers::SearchAvailablePhoneNumbersError)
18    pub fn search_available_phone_numbers(
19        &self,
20    ) -> crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder {
21        crate::operation::search_available_phone_numbers::builders::SearchAvailablePhoneNumbersFluentBuilder::new(self.handle.clone())
22    }
23}