aws_sdk_efs/operation/describe_file_systems/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_file_systems::_describe_file_systems_output::DescribeFileSystemsOutputBuilder;
3
4pub use crate::operation::describe_file_systems::_describe_file_systems_input::DescribeFileSystemsInputBuilder;
5
6impl crate::operation::describe_file_systems::builders::DescribeFileSystemsInputBuilder {
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_file_systems::DescribeFileSystemsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_file_systems::DescribeFileSystemsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_file_systems();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeFileSystems`.
24///
25/// <p>Returns the description of a specific Amazon EFS file system if either the file system <code>CreationToken</code> or the <code>FileSystemId</code> is provided. Otherwise, it returns descriptions of all file systems owned by the caller's Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling.</p>
26/// <p>When retrieving all file system descriptions, you can optionally specify the <code>MaxItems</code> parameter to limit the number of descriptions in a response. This number is automatically set to 100. If more file system descriptions remain, Amazon EFS returns a <code>NextMarker</code>, an opaque token, in the response. In this case, you should send a subsequent request with the <code>Marker</code> request parameter set to the value of <code>NextMarker</code>.</p>
27/// <p>To retrieve a list of your file system descriptions, this operation is used in an iterative process, where <code>DescribeFileSystems</code> is called first without the <code>Marker</code> and then the operation continues to call it with the <code>Marker</code> parameter set to the value of the <code>NextMarker</code> from the previous response until the response has no <code>NextMarker</code>.</p>
28/// <p>The order of file systems returned in the response of one <code>DescribeFileSystems</code> call and the order of file systems returned across the responses of a multi-call iteration is unspecified.</p>
29/// <p>This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystems</code> action.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct DescribeFileSystemsFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::describe_file_systems::builders::DescribeFileSystemsInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::describe_file_systems::DescribeFileSystemsOutput,
39        crate::operation::describe_file_systems::DescribeFileSystemsError,
40    > for DescribeFileSystemsFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::describe_file_systems::DescribeFileSystemsOutput,
48            crate::operation::describe_file_systems::DescribeFileSystemsError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl DescribeFileSystemsFluentBuilder {
55    /// Creates a new `DescribeFileSystemsFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the DescribeFileSystems as a reference.
64    pub fn as_input(&self) -> &crate::operation::describe_file_systems::builders::DescribeFileSystemsInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::describe_file_systems::DescribeFileSystemsOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::describe_file_systems::DescribeFileSystemsError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::describe_file_systems::DescribeFileSystems::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::describe_file_systems::DescribeFileSystems::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::describe_file_systems::DescribeFileSystemsOutput,
101        crate::operation::describe_file_systems::DescribeFileSystemsError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// Create a paginator for this request
116    ///
117    /// Paginators are used by calling [`send().await`](crate::operation::describe_file_systems::paginator::DescribeFileSystemsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
118    pub fn into_paginator(self) -> crate::operation::describe_file_systems::paginator::DescribeFileSystemsPaginator {
119        crate::operation::describe_file_systems::paginator::DescribeFileSystemsPaginator::new(self.handle, self.inner)
120    }
121    /// <p>(Optional) Specifies the maximum number of file systems to return in the response (integer). This number is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems.</p>
122    pub fn max_items(mut self, input: i32) -> Self {
123        self.inner = self.inner.max_items(input);
124        self
125    }
126    /// <p>(Optional) Specifies the maximum number of file systems to return in the response (integer). This number is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems.</p>
127    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
128        self.inner = self.inner.set_max_items(input);
129        self
130    }
131    /// <p>(Optional) Specifies the maximum number of file systems to return in the response (integer). This number is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems.</p>
132    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
133        self.inner.get_max_items()
134    }
135    /// <p>(Optional) Opaque pagination token returned from a previous <code>DescribeFileSystems</code> operation (String). If present, specifies to continue the list from where the returning call had left off.</p>
136    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.inner = self.inner.marker(input.into());
138        self
139    }
140    /// <p>(Optional) Opaque pagination token returned from a previous <code>DescribeFileSystems</code> operation (String). If present, specifies to continue the list from where the returning call had left off.</p>
141    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.inner = self.inner.set_marker(input);
143        self
144    }
145    /// <p>(Optional) Opaque pagination token returned from a previous <code>DescribeFileSystems</code> operation (String). If present, specifies to continue the list from where the returning call had left off.</p>
146    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
147        self.inner.get_marker()
148    }
149    /// <p>(Optional) Restricts the list to the file system with this creation token (String). You specify a creation token when you create an Amazon EFS file system.</p>
150    pub fn creation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.inner = self.inner.creation_token(input.into());
152        self
153    }
154    /// <p>(Optional) Restricts the list to the file system with this creation token (String). You specify a creation token when you create an Amazon EFS file system.</p>
155    pub fn set_creation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.inner = self.inner.set_creation_token(input);
157        self
158    }
159    /// <p>(Optional) Restricts the list to the file system with this creation token (String). You specify a creation token when you create an Amazon EFS file system.</p>
160    pub fn get_creation_token(&self) -> &::std::option::Option<::std::string::String> {
161        self.inner.get_creation_token()
162    }
163    /// <p>(Optional) ID of the file system whose description you want to retrieve (String).</p>
164    pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.inner = self.inner.file_system_id(input.into());
166        self
167    }
168    /// <p>(Optional) ID of the file system whose description you want to retrieve (String).</p>
169    pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.inner = self.inner.set_file_system_id(input);
171        self
172    }
173    /// <p>(Optional) ID of the file system whose description you want to retrieve (String).</p>
174    pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
175        self.inner.get_file_system_id()
176    }
177}