aws_sdk_fsx/operation/describe_s3_access_point_attachments/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_s3_access_point_attachments::_describe_s3_access_point_attachments_output::DescribeS3AccessPointAttachmentsOutputBuilder;
3
4pub use crate::operation::describe_s3_access_point_attachments::_describe_s3_access_point_attachments_input::DescribeS3AccessPointAttachmentsInputBuilder;
5
6impl crate::operation::describe_s3_access_point_attachments::builders::DescribeS3AccessPointAttachmentsInputBuilder {
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::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_s3_access_point_attachments();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeS3AccessPointAttachments`.
24///
25/// <p>Describes one or more S3 access points attached to Amazon FSx volumes.</p>
26/// <p>The requester requires the following permission to perform this action:</p>
27/// <ul>
28/// <li>
29/// <p><code>fsx:DescribeS3AccessPointAttachments</code></p></li>
30/// </ul>
31#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct DescribeS3AccessPointAttachmentsFluentBuilder {
33    handle: ::std::sync::Arc<crate::client::Handle>,
34    inner: crate::operation::describe_s3_access_point_attachments::builders::DescribeS3AccessPointAttachmentsInputBuilder,
35    config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38    crate::client::customize::internal::CustomizableSend<
39        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsOutput,
40        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsError,
41    > for DescribeS3AccessPointAttachmentsFluentBuilder
42{
43    fn send(
44        self,
45        config_override: crate::config::Builder,
46    ) -> crate::client::customize::internal::BoxFuture<
47        crate::client::customize::internal::SendResult<
48            crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsOutput,
49            crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsError,
50        >,
51    > {
52        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53    }
54}
55impl DescribeS3AccessPointAttachmentsFluentBuilder {
56    /// Creates a new `DescribeS3AccessPointAttachmentsFluentBuilder`.
57    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
58        Self {
59            handle,
60            inner: ::std::default::Default::default(),
61            config_override: ::std::option::Option::None,
62        }
63    }
64    /// Access the DescribeS3AccessPointAttachments as a reference.
65    pub fn as_input(&self) -> &crate::operation::describe_s3_access_point_attachments::builders::DescribeS3AccessPointAttachmentsInputBuilder {
66        &self.inner
67    }
68    /// Sends the request and returns the response.
69    ///
70    /// If an error occurs, an `SdkError` will be returned with additional details that
71    /// can be matched against.
72    ///
73    /// By default, any retryable failures will be retried twice. Retry behavior
74    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75    /// set when configuring the client.
76    pub async fn send(
77        self,
78    ) -> ::std::result::Result<
79        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsError,
82            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83        >,
84    > {
85        let input = self
86            .inner
87            .build()
88            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89        let runtime_plugins = crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachments::operation_runtime_plugins(
90            self.handle.runtime_plugins.clone(),
91            &self.handle.conf,
92            self.config_override,
93        );
94        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachments::orchestrate(&runtime_plugins, input).await
95    }
96
97    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98    pub fn customize(
99        self,
100    ) -> crate::client::customize::CustomizableOperation<
101        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsOutput,
102        crate::operation::describe_s3_access_point_attachments::DescribeS3AccessPointAttachmentsError,
103        Self,
104    > {
105        crate::client::customize::CustomizableOperation::new(self)
106    }
107    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108        self.set_config_override(::std::option::Option::Some(config_override.into()));
109        self
110    }
111
112    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113        self.config_override = config_override;
114        self
115    }
116    /// Create a paginator for this request
117    ///
118    /// Paginators are used by calling [`send().await`](crate::operation::describe_s3_access_point_attachments::paginator::DescribeS3AccessPointAttachmentsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
119    pub fn into_paginator(self) -> crate::operation::describe_s3_access_point_attachments::paginator::DescribeS3AccessPointAttachmentsPaginator {
120        crate::operation::describe_s3_access_point_attachments::paginator::DescribeS3AccessPointAttachmentsPaginator::new(self.handle, self.inner)
121    }
122    ///
123    /// Appends an item to `Names`.
124    ///
125    /// To override the contents of this collection use [`set_names`](Self::set_names).
126    ///
127    /// <p>The names of the S3 access point attachments whose descriptions you want to retrieve.</p>
128    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.names(input.into());
130        self
131    }
132    /// <p>The names of the S3 access point attachments whose descriptions you want to retrieve.</p>
133    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
134        self.inner = self.inner.set_names(input);
135        self
136    }
137    /// <p>The names of the S3 access point attachments whose descriptions you want to retrieve.</p>
138    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
139        self.inner.get_names()
140    }
141    ///
142    /// Appends an item to `Filters`.
143    ///
144    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
145    ///
146    /// <p>Enter a filter Name and Values pair to view a select set of S3 access point attachments.</p>
147    pub fn filters(mut self, input: crate::types::S3AccessPointAttachmentsFilter) -> Self {
148        self.inner = self.inner.filters(input);
149        self
150    }
151    /// <p>Enter a filter Name and Values pair to view a select set of S3 access point attachments.</p>
152    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::S3AccessPointAttachmentsFilter>>) -> Self {
153        self.inner = self.inner.set_filters(input);
154        self
155    }
156    /// <p>Enter a filter Name and Values pair to view a select set of S3 access point attachments.</p>
157    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::S3AccessPointAttachmentsFilter>> {
158        self.inner.get_filters()
159    }
160    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
161    pub fn max_results(mut self, input: i32) -> Self {
162        self.inner = self.inner.max_results(input);
163        self
164    }
165    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
166    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
167        self.inner = self.inner.set_max_results(input);
168        self
169    }
170    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
171    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
172        self.inner.get_max_results()
173    }
174    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
175    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.inner = self.inner.next_token(input.into());
177        self
178    }
179    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
180    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181        self.inner = self.inner.set_next_token(input);
182        self
183    }
184    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
185    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
186        self.inner.get_next_token()
187    }
188}