aws_sdk_datasync/operation/create_location_fsx_windows/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_location_fsx_windows::_create_location_fsx_windows_output::CreateLocationFsxWindowsOutputBuilder;
3
4pub use crate::operation::create_location_fsx_windows::_create_location_fsx_windows_input::CreateLocationFsxWindowsInputBuilder;
5
6impl crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsInputBuilder {
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_location_fsx_windows::CreateLocationFsxWindowsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_location_fsx_windows();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateLocationFsxWindows`.
24///
25/// <p>Creates a transfer <i>location</i> for an Amazon FSx for Windows File Server file system. DataSync can use this location as a source or destination for transferring data.</p>
26/// <p>Before you begin, make sure that you understand how DataSync <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-location-access">accesses FSx for Windows File Server file systems</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateLocationFsxWindowsFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput,
36 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsError,
37 > for CreateLocationFsxWindowsFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput,
45 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateLocationFsxWindowsFluentBuilder {
52 /// Creates a new `CreateLocationFsxWindowsFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the CreateLocationFsxWindows as a reference.
61 pub fn as_input(&self) -> &crate::operation::create_location_fsx_windows::builders::CreateLocationFsxWindowsInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::create_location_fsx_windows::CreateLocationFsxWindows::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_location_fsx_windows::CreateLocationFsxWindows::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsOutput,
98 crate::operation::create_location_fsx_windows::CreateLocationFsxWindowsError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).</p>
113 pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.subdirectory(input.into());
115 self
116 }
117 /// <p>Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).</p>
118 pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_subdirectory(input);
120 self
121 }
122 /// <p>Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).</p>
123 pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_subdirectory()
125 }
126 /// <p>Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.</p>
127 pub fn fsx_filesystem_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.fsx_filesystem_arn(input.into());
129 self
130 }
131 /// <p>Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.</p>
132 pub fn set_fsx_filesystem_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_fsx_filesystem_arn(input);
134 self
135 }
136 /// <p>Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.</p>
137 pub fn get_fsx_filesystem_arn(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_fsx_filesystem_arn()
139 }
140 ///
141 /// Appends an item to `SecurityGroupArns`.
142 ///
143 /// To override the contents of this collection use [`set_security_group_arns`](Self::set_security_group_arns).
144 ///
145 /// <p>Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.</p>
146 /// <p>The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/limit-access-security-groups.html"> <i>Amazon FSx for Windows File Server User Guide</i> </a>.</p><note>
147 /// <p>If you choose a security group that doesn't allow connections from within itself, do one of the following:</p>
148 /// <ul>
149 /// <li>
150 /// <p>Configure the security group to allow it to communicate within itself.</p></li>
151 /// <li>
152 /// <p>Choose a different security group that can communicate with the mount target's security group.</p></li>
153 /// </ul>
154 /// </note>
155 pub fn security_group_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.security_group_arns(input.into());
157 self
158 }
159 /// <p>Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.</p>
160 /// <p>The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/limit-access-security-groups.html"> <i>Amazon FSx for Windows File Server User Guide</i> </a>.</p><note>
161 /// <p>If you choose a security group that doesn't allow connections from within itself, do one of the following:</p>
162 /// <ul>
163 /// <li>
164 /// <p>Configure the security group to allow it to communicate within itself.</p></li>
165 /// <li>
166 /// <p>Choose a different security group that can communicate with the mount target's security group.</p></li>
167 /// </ul>
168 /// </note>
169 pub fn set_security_group_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
170 self.inner = self.inner.set_security_group_arns(input);
171 self
172 }
173 /// <p>Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.</p>
174 /// <p>The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/limit-access-security-groups.html"> <i>Amazon FSx for Windows File Server User Guide</i> </a>.</p><note>
175 /// <p>If you choose a security group that doesn't allow connections from within itself, do one of the following:</p>
176 /// <ul>
177 /// <li>
178 /// <p>Configure the security group to allow it to communicate within itself.</p></li>
179 /// <li>
180 /// <p>Choose a different security group that can communicate with the mount target's security group.</p></li>
181 /// </ul>
182 /// </note>
183 pub fn get_security_group_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184 self.inner.get_security_group_arns()
185 }
186 ///
187 /// Appends an item to `Tags`.
188 ///
189 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
190 ///
191 /// <p>Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.</p>
192 pub fn tags(mut self, input: crate::types::TagListEntry) -> Self {
193 self.inner = self.inner.tags(input);
194 self
195 }
196 /// <p>Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.</p>
197 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>) -> Self {
198 self.inner = self.inner.set_tags(input);
199 self
200 }
201 /// <p>Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.</p>
202 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>> {
203 self.inner.get_tags()
204 }
205 /// <p>Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
206 /// <p>For information about choosing a user with the right level of access for your transfer, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-windows-location-permissions">required permissions</a> for FSx for Windows File Server locations.</p>
207 pub fn user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208 self.inner = self.inner.user(input.into());
209 self
210 }
211 /// <p>Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
212 /// <p>For information about choosing a user with the right level of access for your transfer, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-windows-location-permissions">required permissions</a> for FSx for Windows File Server locations.</p>
213 pub fn set_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214 self.inner = self.inner.set_user(input);
215 self
216 }
217 /// <p>Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
218 /// <p>For information about choosing a user with the right level of access for your transfer, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-windows-location-permissions">required permissions</a> for FSx for Windows File Server locations.</p>
219 pub fn get_user(&self) -> &::std::option::Option<::std::string::String> {
220 self.inner.get_user()
221 }
222 /// <p>Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.</p>
223 /// <p>If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.</p>
224 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.inner = self.inner.domain(input.into());
226 self
227 }
228 /// <p>Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.</p>
229 /// <p>If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.</p>
230 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.inner = self.inner.set_domain(input);
232 self
233 }
234 /// <p>Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.</p>
235 /// <p>If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.</p>
236 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
237 self.inner.get_domain()
238 }
239 /// <p>Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
240 pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.inner = self.inner.password(input.into());
242 self
243 }
244 /// <p>Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
245 pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246 self.inner = self.inner.set_password(input);
247 self
248 }
249 /// <p>Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.</p>
250 pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
251 self.inner.get_password()
252 }
253}