aws_sdk_s3control/operation/get_access_point/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_access_point::_get_access_point_output::GetAccessPointOutputBuilder;
3
4pub use crate::operation::get_access_point::_get_access_point_input::GetAccessPointInputBuilder;
5
6impl crate::operation::get_access_point::builders::GetAccessPointInputBuilder {
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::get_access_point::GetAccessPointOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_access_point::GetAccessPointError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_access_point();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetAccessPoint`.
24///
25/// <p>Returns configuration information about the specified access point.</p>
26/// <p></p>
27/// <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html#API_control_GetAccessPoint_Examples">Examples</a> section.</p>
28/// <p>The following actions are related to <code>GetAccessPoint</code>:</p>
29/// <ul>
30/// <li>
31/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html">CreateAccessPoint</a></p></li>
32/// <li>
33/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPoint.html">DeleteAccessPoint</a></p></li>
34/// <li>
35/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListAccessPoints.html">ListAccessPoints</a></p></li>
36/// </ul><important>
37/// <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>
38/// </important>
39#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct GetAccessPointFluentBuilder {
41    handle: ::std::sync::Arc<crate::client::Handle>,
42    inner: crate::operation::get_access_point::builders::GetAccessPointInputBuilder,
43    config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46    crate::client::customize::internal::CustomizableSend<
47        crate::operation::get_access_point::GetAccessPointOutput,
48        crate::operation::get_access_point::GetAccessPointError,
49    > for GetAccessPointFluentBuilder
50{
51    fn send(
52        self,
53        config_override: crate::config::Builder,
54    ) -> crate::client::customize::internal::BoxFuture<
55        crate::client::customize::internal::SendResult<
56            crate::operation::get_access_point::GetAccessPointOutput,
57            crate::operation::get_access_point::GetAccessPointError,
58        >,
59    > {
60        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61    }
62}
63impl GetAccessPointFluentBuilder {
64    /// Creates a new `GetAccessPointFluentBuilder`.
65    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66        Self {
67            handle,
68            inner: ::std::default::Default::default(),
69            config_override: ::std::option::Option::None,
70        }
71    }
72    /// Access the GetAccessPoint as a reference.
73    pub fn as_input(&self) -> &crate::operation::get_access_point::builders::GetAccessPointInputBuilder {
74        &self.inner
75    }
76    /// Sends the request and returns the response.
77    ///
78    /// If an error occurs, an `SdkError` will be returned with additional details that
79    /// can be matched against.
80    ///
81    /// By default, any retryable failures will be retried twice. Retry behavior
82    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
83    /// set when configuring the client.
84    pub async fn send(
85        self,
86    ) -> ::std::result::Result<
87        crate::operation::get_access_point::GetAccessPointOutput,
88        ::aws_smithy_runtime_api::client::result::SdkError<
89            crate::operation::get_access_point::GetAccessPointError,
90            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91        >,
92    > {
93        let input = self
94            .inner
95            .build()
96            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97        let runtime_plugins = crate::operation::get_access_point::GetAccessPoint::operation_runtime_plugins(
98            self.handle.runtime_plugins.clone(),
99            &self.handle.conf,
100            self.config_override,
101        );
102        crate::operation::get_access_point::GetAccessPoint::orchestrate(&runtime_plugins, input).await
103    }
104
105    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106    pub fn customize(
107        self,
108    ) -> crate::client::customize::CustomizableOperation<
109        crate::operation::get_access_point::GetAccessPointOutput,
110        crate::operation::get_access_point::GetAccessPointError,
111        Self,
112    > {
113        crate::client::customize::CustomizableOperation::new(self)
114    }
115    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116        self.set_config_override(::std::option::Option::Some(config_override.into()));
117        self
118    }
119
120    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121        self.config_override = config_override;
122        self
123    }
124    /// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
125    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.account_id(input.into());
127        self
128    }
129    /// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
130    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_account_id(input);
132        self
133    }
134    /// <p>The Amazon Web Services account ID for the account that owns the specified access point.</p>
135    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_account_id()
137    }
138    /// <p>The name of the access point whose configuration information you want to retrieve.</p>
139    /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
140    /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the access point accessed in the format <code>arn:aws:s3-outposts:<region>
141    /// :
142    /// <account-id>
143    /// :outpost/
144    /// <outpost-id>
145    /// /accesspoint/
146    /// <my-accesspoint-name></my-accesspoint-name>
147    /// </outpost-id>
148    /// </account-id>
149    /// </region></code>. For example, to access the access point <code>reports-ap</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/accesspoint/reports-ap</code>. The value must be URL encoded.</p>
150    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.inner = self.inner.name(input.into());
152        self
153    }
154    /// <p>The name of the access point whose configuration information you want to retrieve.</p>
155    /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
156    /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the access point accessed in the format <code>arn:aws:s3-outposts:<region>
157    /// :
158    /// <account-id>
159    /// :outpost/
160    /// <outpost-id>
161    /// /accesspoint/
162    /// <my-accesspoint-name></my-accesspoint-name>
163    /// </outpost-id>
164    /// </account-id>
165    /// </region></code>. For example, to access the access point <code>reports-ap</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/accesspoint/reports-ap</code>. The value must be URL encoded.</p>
166    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.inner = self.inner.set_name(input);
168        self
169    }
170    /// <p>The name of the access point whose configuration information you want to retrieve.</p>
171    /// <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p>
172    /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the access point accessed in the format <code>arn:aws:s3-outposts:<region>
173    /// :
174    /// <account-id>
175    /// :outpost/
176    /// <outpost-id>
177    /// /accesspoint/
178    /// <my-accesspoint-name></my-accesspoint-name>
179    /// </outpost-id>
180    /// </account-id>
181    /// </region></code>. For example, to access the access point <code>reports-ap</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/accesspoint/reports-ap</code>. The value must be URL encoded.</p>
182    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
183        self.inner.get_name()
184    }
185}