aws_sdk_s3control/operation/create_multi_region_access_point/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_multi_region_access_point::_create_multi_region_access_point_output::CreateMultiRegionAccessPointOutputBuilder;
3
4pub use crate::operation::create_multi_region_access_point::_create_multi_region_access_point_input::CreateMultiRegionAccessPointInputBuilder;
5
6impl crate::operation::create_multi_region_access_point::builders::CreateMultiRegionAccessPointInputBuilder {
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::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_multi_region_access_point();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateMultiRegionAccessPoint`.
24///
25/// <note>
26/// <p>This operation is not supported by directory buckets.</p>
27/// </note>
28/// <p>Creates a Multi-Region Access Point and associates it with the specified buckets. For more information about creating Multi-Region Access Points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html">Creating Multi-Region Access Points</a> in the <i>Amazon S3 User Guide</i>.</p>
29/// <p>This action will always be routed to the US West (Oregon) Region. For more information about the restrictions around working with Multi-Region Access Points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html">Multi-Region Access Point restrictions and limitations</a> in the <i>Amazon S3 User Guide</i>.</p>
30/// <p>This request is asynchronous, meaning that you might receive a response before the command has completed. When this request provides a response, it provides a token that you can use to monitor the status of the request with <code>DescribeMultiRegionAccessPointOperation</code>.</p>
31/// <p>The following actions are related to <code>CreateMultiRegionAccessPoint</code>:</p>
32/// <ul>
33/// <li>
34/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteMultiRegionAccessPoint.html">DeleteMultiRegionAccessPoint</a></p></li>
35/// <li>
36/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DescribeMultiRegionAccessPointOperation.html">DescribeMultiRegionAccessPointOperation</a></p></li>
37/// <li>
38/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetMultiRegionAccessPoint.html">GetMultiRegionAccessPoint</a></p></li>
39/// <li>
40/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListMultiRegionAccessPoints.html">ListMultiRegionAccessPoints</a></p></li>
41/// </ul><important>
42/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
43/// </important>
44#[derive(::std::clone::Clone, ::std::fmt::Debug)]
45pub struct CreateMultiRegionAccessPointFluentBuilder {
46    handle: ::std::sync::Arc<crate::client::Handle>,
47    inner: crate::operation::create_multi_region_access_point::builders::CreateMultiRegionAccessPointInputBuilder,
48    config_override: ::std::option::Option<crate::config::Builder>,
49}
50impl
51    crate::client::customize::internal::CustomizableSend<
52        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
53        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
54    > for CreateMultiRegionAccessPointFluentBuilder
55{
56    fn send(
57        self,
58        config_override: crate::config::Builder,
59    ) -> crate::client::customize::internal::BoxFuture<
60        crate::client::customize::internal::SendResult<
61            crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
62            crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
63        >,
64    > {
65        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
66    }
67}
68impl CreateMultiRegionAccessPointFluentBuilder {
69    /// Creates a new `CreateMultiRegionAccessPointFluentBuilder`.
70    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
71        Self {
72            handle,
73            inner: ::std::default::Default::default(),
74            config_override: ::std::option::Option::None,
75        }
76    }
77    /// Access the CreateMultiRegionAccessPoint as a reference.
78    pub fn as_input(&self) -> &crate::operation::create_multi_region_access_point::builders::CreateMultiRegionAccessPointInputBuilder {
79        &self.inner
80    }
81    /// Sends the request and returns the response.
82    ///
83    /// If an error occurs, an `SdkError` will be returned with additional details that
84    /// can be matched against.
85    ///
86    /// By default, any retryable failures will be retried twice. Retry behavior
87    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
88    /// set when configuring the client.
89    pub async fn send(
90        self,
91    ) -> ::std::result::Result<
92        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
93        ::aws_smithy_runtime_api::client::result::SdkError<
94            crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
95            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
96        >,
97    > {
98        let input = self
99            .inner
100            .build()
101            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
102        let runtime_plugins = crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPoint::operation_runtime_plugins(
103            self.handle.runtime_plugins.clone(),
104            &self.handle.conf,
105            self.config_override,
106        );
107        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPoint::orchestrate(&runtime_plugins, input).await
108    }
109
110    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
111    pub fn customize(
112        self,
113    ) -> crate::client::customize::CustomizableOperation<
114        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointOutput,
115        crate::operation::create_multi_region_access_point::CreateMultiRegionAccessPointError,
116        Self,
117    > {
118        crate::client::customize::CustomizableOperation::new(self)
119    }
120    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
121        self.set_config_override(::std::option::Option::Some(config_override.into()));
122        self
123    }
124
125    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
126        self.config_override = config_override;
127        self
128    }
129    /// <p>The Amazon Web Services account ID for the owner of the Multi-Region Access Point. The owner of the Multi-Region Access Point also must own the underlying buckets.</p>
130    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.account_id(input.into());
132        self
133    }
134    /// <p>The Amazon Web Services account ID for the owner of the Multi-Region Access Point. The owner of the Multi-Region Access Point also must own the underlying buckets.</p>
135    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_account_id(input);
137        self
138    }
139    /// <p>The Amazon Web Services account ID for the owner of the Multi-Region Access Point. The owner of the Multi-Region Access Point also must own the underlying buckets.</p>
140    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_account_id()
142    }
143    /// <p>An idempotency token used to identify the request and guarantee that requests are unique.</p>
144    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.client_token(input.into());
146        self
147    }
148    /// <p>An idempotency token used to identify the request and guarantee that requests are unique.</p>
149    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_client_token(input);
151        self
152    }
153    /// <p>An idempotency token used to identify the request and guarantee that requests are unique.</p>
154    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_client_token()
156    }
157    /// <p>A container element containing details about the Multi-Region Access Point.</p>
158    pub fn details(mut self, input: crate::types::CreateMultiRegionAccessPointInput) -> Self {
159        self.inner = self.inner.details(input);
160        self
161    }
162    /// <p>A container element containing details about the Multi-Region Access Point.</p>
163    pub fn set_details(mut self, input: ::std::option::Option<crate::types::CreateMultiRegionAccessPointInput>) -> Self {
164        self.inner = self.inner.set_details(input);
165        self
166    }
167    /// <p>A container element containing details about the Multi-Region Access Point.</p>
168    pub fn get_details(&self) -> &::std::option::Option<crate::types::CreateMultiRegionAccessPointInput> {
169        self.inner.get_details()
170    }
171}