aws_sdk_cloudfront/operation/list_domain_conflicts/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_domain_conflicts::_list_domain_conflicts_output::ListDomainConflictsOutputBuilder;
3
4pub use crate::operation::list_domain_conflicts::_list_domain_conflicts_input::ListDomainConflictsInputBuilder;
5
6impl crate::operation::list_domain_conflicts::builders::ListDomainConflictsInputBuilder {
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_domain_conflicts::ListDomainConflictsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_domain_conflicts::ListDomainConflictsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_domain_conflicts();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListDomainConflicts`.
24///
25/// <note>
26/// <p>We recommend that you use the <code>ListDomainConflicts</code> API operation to check for domain conflicts, as it supports both standard distributions and distribution tenants. <a href="https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListConflictingAliases.html">ListConflictingAliases</a> performs similar checks but only supports standard distributions.</p>
27/// </note>
28/// <p>Lists existing domain associations that conflict with the domain that you specify.</p>
29/// <p>You can use this API operation to identify potential domain conflicts when moving domains between standard distributions and/or distribution tenants. Domain conflicts must be resolved first before they can be moved.</p>
30/// <p>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 domains, specify the following:</p>
32/// <ul>
33/// <li>
34/// <p>The domain to search for</p></li>
35/// <li>
36/// <p>The ID of a standard distribution or distribution tenant in your account that has an attached TLS certificate, which covers the specified domain</p></li>
37/// </ul>
38/// <p>For more information, including how to set up the standard distribution or distribution tenant, and the 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>
39/// <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>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct ListDomainConflictsFluentBuilder {
42    handle: ::std::sync::Arc<crate::client::Handle>,
43    inner: crate::operation::list_domain_conflicts::builders::ListDomainConflictsInputBuilder,
44    config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47    crate::client::customize::internal::CustomizableSend<
48        crate::operation::list_domain_conflicts::ListDomainConflictsOutput,
49        crate::operation::list_domain_conflicts::ListDomainConflictsError,
50    > for ListDomainConflictsFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<
57            crate::operation::list_domain_conflicts::ListDomainConflictsOutput,
58            crate::operation::list_domain_conflicts::ListDomainConflictsError,
59        >,
60    > {
61        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62    }
63}
64impl ListDomainConflictsFluentBuilder {
65    /// Creates a new `ListDomainConflictsFluentBuilder`.
66    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67        Self {
68            handle,
69            inner: ::std::default::Default::default(),
70            config_override: ::std::option::Option::None,
71        }
72    }
73    /// Access the ListDomainConflicts as a reference.
74    pub fn as_input(&self) -> &crate::operation::list_domain_conflicts::builders::ListDomainConflictsInputBuilder {
75        &self.inner
76    }
77    /// Sends the request and returns the response.
78    ///
79    /// If an error occurs, an `SdkError` will be returned with additional details that
80    /// can be matched against.
81    ///
82    /// By default, any retryable failures will be retried twice. Retry behavior
83    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84    /// set when configuring the client.
85    pub async fn send(
86        self,
87    ) -> ::std::result::Result<
88        crate::operation::list_domain_conflicts::ListDomainConflictsOutput,
89        ::aws_smithy_runtime_api::client::result::SdkError<
90            crate::operation::list_domain_conflicts::ListDomainConflictsError,
91            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92        >,
93    > {
94        let input = self
95            .inner
96            .build()
97            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98        let runtime_plugins = crate::operation::list_domain_conflicts::ListDomainConflicts::operation_runtime_plugins(
99            self.handle.runtime_plugins.clone(),
100            &self.handle.conf,
101            self.config_override,
102        );
103        crate::operation::list_domain_conflicts::ListDomainConflicts::orchestrate(&runtime_plugins, input).await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::list_domain_conflicts::ListDomainConflictsOutput,
111        crate::operation::list_domain_conflicts::ListDomainConflictsError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// Create a paginator for this request
126    ///
127    /// Paginators are used by calling [`send().await`](crate::operation::list_domain_conflicts::paginator::ListDomainConflictsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
128    pub fn into_paginator(self) -> crate::operation::list_domain_conflicts::paginator::ListDomainConflictsPaginator {
129        crate::operation::list_domain_conflicts::paginator::ListDomainConflictsPaginator::new(self.handle, self.inner)
130    }
131    /// <p>The domain to check for conflicts.</p>
132    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.domain(input.into());
134        self
135    }
136    /// <p>The domain to check for conflicts.</p>
137    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.inner = self.inner.set_domain(input);
139        self
140    }
141    /// <p>The domain to check for conflicts.</p>
142    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_domain()
144    }
145    /// <p>The distribution resource identifier. This can be the standard distribution or distribution tenant that has a valid certificate, which covers the domain that you specify.</p>
146    pub fn domain_control_validation_resource(mut self, input: crate::types::DistributionResourceId) -> Self {
147        self.inner = self.inner.domain_control_validation_resource(input);
148        self
149    }
150    /// <p>The distribution resource identifier. This can be the standard distribution or distribution tenant that has a valid certificate, which covers the domain that you specify.</p>
151    pub fn set_domain_control_validation_resource(mut self, input: ::std::option::Option<crate::types::DistributionResourceId>) -> Self {
152        self.inner = self.inner.set_domain_control_validation_resource(input);
153        self
154    }
155    /// <p>The distribution resource identifier. This can be the standard distribution or distribution tenant that has a valid certificate, which covers the domain that you specify.</p>
156    pub fn get_domain_control_validation_resource(&self) -> &::std::option::Option<crate::types::DistributionResourceId> {
157        self.inner.get_domain_control_validation_resource()
158    }
159    /// <p>The maximum number of domain conflicts to return.</p>
160    pub fn max_items(mut self, input: i32) -> Self {
161        self.inner = self.inner.max_items(input);
162        self
163    }
164    /// <p>The maximum number of domain conflicts to return.</p>
165    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
166        self.inner = self.inner.set_max_items(input);
167        self
168    }
169    /// <p>The maximum number of domain conflicts to return.</p>
170    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
171        self.inner.get_max_items()
172    }
173    /// <p>The marker for the next set of domain conflicts.</p>
174    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.marker(input.into());
176        self
177    }
178    /// <p>The marker for the next set of domain conflicts.</p>
179    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_marker(input);
181        self
182    }
183    /// <p>The marker for the next set of domain conflicts.</p>
184    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_marker()
186    }
187}