aws_sdk_s3control/operation/list_access_points/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_access_points::_list_access_points_output::ListAccessPointsOutputBuilder;
3
4pub use crate::operation::list_access_points::_list_access_points_input::ListAccessPointsInputBuilder;
5
6impl crate::operation::list_access_points::builders::ListAccessPointsInputBuilder {
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_access_points::ListAccessPointsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_access_points::ListAccessPointsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_access_points();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListAccessPoints`.
24///
25/// <note>
26/// <p>This operation is not supported by directory buckets.</p>
27/// </note>
28/// <p>Returns a list of the access points. You can retrieve up to 1,000 access points per call. If the call returns more than 1,000 access points (or the number specified in <code>maxResults</code>, whichever is less), the response will include a continuation token that you can use to list the additional access points.</p>
29/// <p>Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p>
30/// <p></p>
31/// <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>
32/// <p>The following actions are related to <code>ListAccessPoints</code>:</p>
33/// <ul>
34/// <li>
35/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html">CreateAccessPoint</a></p></li>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPoint.html">DeleteAccessPoint</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html">GetAccessPoint</a></p></li>
40/// </ul><important>
41/// <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>
42/// </important>
43#[derive(::std::clone::Clone, ::std::fmt::Debug)]
44pub struct ListAccessPointsFluentBuilder {
45 handle: ::std::sync::Arc<crate::client::Handle>,
46 inner: crate::operation::list_access_points::builders::ListAccessPointsInputBuilder,
47 config_override: ::std::option::Option<crate::config::Builder>,
48}
49impl
50 crate::client::customize::internal::CustomizableSend<
51 crate::operation::list_access_points::ListAccessPointsOutput,
52 crate::operation::list_access_points::ListAccessPointsError,
53 > for ListAccessPointsFluentBuilder
54{
55 fn send(
56 self,
57 config_override: crate::config::Builder,
58 ) -> crate::client::customize::internal::BoxFuture<
59 crate::client::customize::internal::SendResult<
60 crate::operation::list_access_points::ListAccessPointsOutput,
61 crate::operation::list_access_points::ListAccessPointsError,
62 >,
63 > {
64 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
65 }
66}
67impl ListAccessPointsFluentBuilder {
68 /// Creates a new `ListAccessPointsFluentBuilder`.
69 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
70 Self {
71 handle,
72 inner: ::std::default::Default::default(),
73 config_override: ::std::option::Option::None,
74 }
75 }
76 /// Access the ListAccessPoints as a reference.
77 pub fn as_input(&self) -> &crate::operation::list_access_points::builders::ListAccessPointsInputBuilder {
78 &self.inner
79 }
80 /// Sends the request and returns the response.
81 ///
82 /// If an error occurs, an `SdkError` will be returned with additional details that
83 /// can be matched against.
84 ///
85 /// By default, any retryable failures will be retried twice. Retry behavior
86 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
87 /// set when configuring the client.
88 pub async fn send(
89 self,
90 ) -> ::std::result::Result<
91 crate::operation::list_access_points::ListAccessPointsOutput,
92 ::aws_smithy_runtime_api::client::result::SdkError<
93 crate::operation::list_access_points::ListAccessPointsError,
94 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
95 >,
96 > {
97 let input = self
98 .inner
99 .build()
100 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
101 let runtime_plugins = crate::operation::list_access_points::ListAccessPoints::operation_runtime_plugins(
102 self.handle.runtime_plugins.clone(),
103 &self.handle.conf,
104 self.config_override,
105 );
106 crate::operation::list_access_points::ListAccessPoints::orchestrate(&runtime_plugins, input).await
107 }
108
109 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
110 pub fn customize(
111 self,
112 ) -> crate::client::customize::CustomizableOperation<
113 crate::operation::list_access_points::ListAccessPointsOutput,
114 crate::operation::list_access_points::ListAccessPointsError,
115 Self,
116 > {
117 crate::client::customize::CustomizableOperation::new(self)
118 }
119 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
120 self.set_config_override(::std::option::Option::Some(config_override.into()));
121 self
122 }
123
124 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
125 self.config_override = config_override;
126 self
127 }
128 /// Create a paginator for this request
129 ///
130 /// Paginators are used by calling [`send().await`](crate::operation::list_access_points::paginator::ListAccessPointsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
131 pub fn into_paginator(self) -> crate::operation::list_access_points::paginator::ListAccessPointsPaginator {
132 crate::operation::list_access_points::paginator::ListAccessPointsPaginator::new(self.handle, self.inner)
133 }
134 /// <p>The Amazon Web Services account ID for the account that owns the specified access points.</p>
135 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.inner = self.inner.account_id(input.into());
137 self
138 }
139 /// <p>The Amazon Web Services account ID for the account that owns the specified access points.</p>
140 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_account_id(input);
142 self
143 }
144 /// <p>The Amazon Web Services account ID for the account that owns the specified access points.</p>
145 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_account_id()
147 }
148 /// <p>The name of the bucket whose associated access points you want to list.</p>
149 /// <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>
150 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
151 /// :
152 /// <account-id>
153 /// :outpost/
154 /// <outpost-id>
155 /// /bucket/
156 /// <my-bucket-name></my-bucket-name>
157 /// </outpost-id>
158 /// </account-id>
159 /// </region></code>. For example, to access the bucket <code>reports</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/bucket/reports</code>. The value must be URL encoded.</p>
160 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.bucket(input.into());
162 self
163 }
164 /// <p>The name of the bucket whose associated access points you want to list.</p>
165 /// <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>
166 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
167 /// :
168 /// <account-id>
169 /// :outpost/
170 /// <outpost-id>
171 /// /bucket/
172 /// <my-bucket-name></my-bucket-name>
173 /// </outpost-id>
174 /// </account-id>
175 /// </region></code>. For example, to access the bucket <code>reports</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/bucket/reports</code>. The value must be URL encoded.</p>
176 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_bucket(input);
178 self
179 }
180 /// <p>The name of the bucket whose associated access points you want to list.</p>
181 /// <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>
182 /// <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region>
183 /// :
184 /// <account-id>
185 /// :outpost/
186 /// <outpost-id>
187 /// /bucket/
188 /// <my-bucket-name></my-bucket-name>
189 /// </outpost-id>
190 /// </account-id>
191 /// </region></code>. For example, to access the bucket <code>reports</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/bucket/reports</code>. The value must be URL encoded.</p>
192 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
193 self.inner.get_bucket()
194 }
195 /// <p>A continuation token. If a previous call to <code>ListAccessPoints</code> returned a continuation token in the <code>NextToken</code> field, then providing that value here causes Amazon S3 to retrieve the next page of results.</p>
196 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197 self.inner = self.inner.next_token(input.into());
198 self
199 }
200 /// <p>A continuation token. If a previous call to <code>ListAccessPoints</code> returned a continuation token in the <code>NextToken</code> field, then providing that value here causes Amazon S3 to retrieve the next page of results.</p>
201 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202 self.inner = self.inner.set_next_token(input);
203 self
204 }
205 /// <p>A continuation token. If a previous call to <code>ListAccessPoints</code> returned a continuation token in the <code>NextToken</code> field, then providing that value here causes Amazon S3 to retrieve the next page of results.</p>
206 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
207 self.inner.get_next_token()
208 }
209 /// <p>The maximum number of access points that you want to include in the list. If the specified bucket has more than this number of access points, then the response will include a continuation token in the <code>NextToken</code> field that you can use to retrieve the next page of access points.</p>
210 pub fn max_results(mut self, input: i32) -> Self {
211 self.inner = self.inner.max_results(input);
212 self
213 }
214 /// <p>The maximum number of access points that you want to include in the list. If the specified bucket has more than this number of access points, then the response will include a continuation token in the <code>NextToken</code> field that you can use to retrieve the next page of access points.</p>
215 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
216 self.inner = self.inner.set_max_results(input);
217 self
218 }
219 /// <p>The maximum number of access points that you want to include in the list. If the specified bucket has more than this number of access points, then the response will include a continuation token in the <code>NextToken</code> field that you can use to retrieve the next page of access points.</p>
220 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
221 self.inner.get_max_results()
222 }
223 /// <p>The unique identifier for the data source of the access point.</p>
224 pub fn data_source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.inner = self.inner.data_source_id(input.into());
226 self
227 }
228 /// <p>The unique identifier for the data source of the access point.</p>
229 pub fn set_data_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.inner = self.inner.set_data_source_id(input);
231 self
232 }
233 /// <p>The unique identifier for the data source of the access point.</p>
234 pub fn get_data_source_id(&self) -> &::std::option::Option<::std::string::String> {
235 self.inner.get_data_source_id()
236 }
237 /// <p>The type of the data source that the access point is attached to. Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p>
238 pub fn data_source_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 self.inner = self.inner.data_source_type(input.into());
240 self
241 }
242 /// <p>The type of the data source that the access point is attached to. Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p>
243 pub fn set_data_source_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.inner = self.inner.set_data_source_type(input);
245 self
246 }
247 /// <p>The type of the data source that the access point is attached to. Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p>
248 pub fn get_data_source_type(&self) -> &::std::option::Option<::std::string::String> {
249 self.inner.get_data_source_type()
250 }
251}