aws_sdk_cloudfront/operation/list_conflicting_aliases/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_conflicting_aliases::_list_conflicting_aliases_output::ListConflictingAliasesOutputBuilder;
3
4pub use crate::operation::list_conflicting_aliases::_list_conflicting_aliases_input::ListConflictingAliasesInputBuilder;
5
6impl crate::operation::list_conflicting_aliases::builders::ListConflictingAliasesInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::list_conflicting_aliases::ListConflictingAliasesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_conflicting_aliases::ListConflictingAliasesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_conflicting_aliases();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListConflictingAliases`.
24///
25/// <note>
26/// <p>The <code>ListConflictingAliases</code> API operation only supports standard distributions. To list domain conflicts for both standard distributions and distribution tenants, we recommend that you use the <a href="https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListDomainConflicts.html">ListDomainConflicts</a> API operation instead.</p>
27/// </note>
28/// <p>Gets a list of aliases that conflict or overlap with the provided alias, and the associated CloudFront standard distribution and Amazon Web Services accounts for each conflicting alias. An alias is commonly known as a custom domain or vanity domain. It can also be called a CNAME or alternate domain name.</p>
29/// <p>In the returned list, the standard distribution and account IDs are partially hidden, which allows you to identify the standard distribution and accounts that you own, and helps to protect the information of ones that you don't own.</p>
30/// <p>Use this operation to find aliases that are in use in CloudFront that conflict or overlap with the provided alias. For example, if you provide <code>www.example.com</code> as input, the returned list can include <code>www.example.com</code> and the overlapping wildcard alternate domain name (<code>*.example.com</code>), if they exist. If you provide <code>*.example.com</code> as input, the returned list can include <code>*.example.com</code> and any alternate domain names covered by that wildcard (for example, <code>www.example.com</code>, <code>test.example.com</code>, <code>dev.example.com</code>, and so on), if they exist.</p>
31/// <p>To list conflicting aliases, specify the alias to search and the ID of a standard distribution in your account that has an attached TLS certificate that includes the provided alias. For more information, including how to set up the standard distribution and certificate, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move">Moving an alternate domain name to a different standard distribution or distribution tenant</a> in the <i>Amazon CloudFront Developer Guide</i>.</p>
32/// <p>You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the <code>NextMarker</code> value from the current response as the <code>Marker</code> value in the subsequent request.</p>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct ListConflictingAliasesFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::list_conflicting_aliases::builders::ListConflictingAliasesInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::list_conflicting_aliases::ListConflictingAliasesOutput,
42        crate::operation::list_conflicting_aliases::ListConflictingAliasesError,
43    > for ListConflictingAliasesFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::list_conflicting_aliases::ListConflictingAliasesOutput,
51            crate::operation::list_conflicting_aliases::ListConflictingAliasesError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl ListConflictingAliasesFluentBuilder {
58    /// Creates a new `ListConflictingAliasesFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the ListConflictingAliases as a reference.
67    pub fn as_input(&self) -> &crate::operation::list_conflicting_aliases::builders::ListConflictingAliasesInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::list_conflicting_aliases::ListConflictingAliasesOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::list_conflicting_aliases::ListConflictingAliasesError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::list_conflicting_aliases::ListConflictingAliases::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::list_conflicting_aliases::ListConflictingAliases::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::list_conflicting_aliases::ListConflictingAliasesOutput,
104        crate::operation::list_conflicting_aliases::ListConflictingAliasesError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>The ID of a standard distribution in your account that has an attached TLS certificate that includes the provided alias.</p>
119    pub fn distribution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.distribution_id(input.into());
121        self
122    }
123    /// <p>The ID of a standard distribution in your account that has an attached TLS certificate that includes the provided alias.</p>
124    pub fn set_distribution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_distribution_id(input);
126        self
127    }
128    /// <p>The ID of a standard distribution in your account that has an attached TLS certificate that includes the provided alias.</p>
129    pub fn get_distribution_id(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_distribution_id()
131    }
132    /// <p>The alias (also called a CNAME) to search for conflicting aliases.</p>
133    pub fn alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.inner = self.inner.alias(input.into());
135        self
136    }
137    /// <p>The alias (also called a CNAME) to search for conflicting aliases.</p>
138    pub fn set_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.inner = self.inner.set_alias(input);
140        self
141    }
142    /// <p>The alias (also called a CNAME) to search for conflicting aliases.</p>
143    pub fn get_alias(&self) -> &::std::option::Option<::std::string::String> {
144        self.inner.get_alias()
145    }
146    /// <p>Use this field when paginating results to indicate where to begin in the list of conflicting aliases. The response includes conflicting aliases in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
147    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.inner = self.inner.marker(input.into());
149        self
150    }
151    /// <p>Use this field when paginating results to indicate where to begin in the list of conflicting aliases. The response includes conflicting aliases in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
152    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.inner = self.inner.set_marker(input);
154        self
155    }
156    /// <p>Use this field when paginating results to indicate where to begin in the list of conflicting aliases. The response includes conflicting aliases in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
157    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
158        self.inner.get_marker()
159    }
160    /// <p>The maximum number of conflicting aliases that you want in the response.</p>
161    pub fn max_items(mut self, input: i32) -> Self {
162        self.inner = self.inner.max_items(input);
163        self
164    }
165    /// <p>The maximum number of conflicting aliases that you want in the response.</p>
166    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
167        self.inner = self.inner.set_max_items(input);
168        self
169    }
170    /// <p>The maximum number of conflicting aliases that you want in the response.</p>
171    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
172        self.inner.get_max_items()
173    }
174}