aws_sdk_fsx/operation/update_file_system/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_file_system::_update_file_system_output::UpdateFileSystemOutputBuilder;
3
4pub use crate::operation::update_file_system::_update_file_system_input::UpdateFileSystemInputBuilder;
5
6impl crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
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::update_file_system::UpdateFileSystemOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_file_system::UpdateFileSystemError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_file_system();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateFileSystem`.
24///
25/// <p>Use this operation to update the configuration of an existing Amazon FSx file system. You can update multiple properties in a single request.</p>
26/// <p>For FSx for Windows File Server file systems, you can update the following properties:</p>
27/// <ul>
28/// <li>
29/// <p><code>AuditLogConfiguration</code></p></li>
30/// <li>
31/// <p><code>AutomaticBackupRetentionDays</code></p></li>
32/// <li>
33/// <p><code>DailyAutomaticBackupStartTime</code></p></li>
34/// <li>
35/// <p><code>SelfManagedActiveDirectoryConfiguration</code></p></li>
36/// <li>
37/// <p><code>StorageCapacity</code></p></li>
38/// <li>
39/// <p><code>StorageType</code></p></li>
40/// <li>
41/// <p><code>ThroughputCapacity</code></p></li>
42/// <li>
43/// <p><code>DiskIopsConfiguration</code></p></li>
44/// <li>
45/// <p><code>WeeklyMaintenanceStartTime</code></p></li>
46/// </ul>
47/// <p>For FSx for Lustre file systems, you can update the following properties:</p>
48/// <ul>
49/// <li>
50/// <p><code>AutoImportPolicy</code></p></li>
51/// <li>
52/// <p><code>AutomaticBackupRetentionDays</code></p></li>
53/// <li>
54/// <p><code>DailyAutomaticBackupStartTime</code></p></li>
55/// <li>
56/// <p><code>DataCompressionType</code></p></li>
57/// <li>
58/// <p><code>FileSystemTypeVersion</code></p></li>
59/// <li>
60/// <p><code>LogConfiguration</code></p></li>
61/// <li>
62/// <p><code>LustreRootSquashConfiguration</code></p></li>
63/// <li>
64/// <p><code>MetadataConfiguration</code></p></li>
65/// <li>
66/// <p><code>PerUnitStorageThroughput</code></p></li>
67/// <li>
68/// <p><code>StorageCapacity</code></p></li>
69/// <li>
70/// <p><code>WeeklyMaintenanceStartTime</code></p></li>
71/// </ul>
72/// <p>For FSx for ONTAP file systems, you can update the following properties:</p>
73/// <ul>
74/// <li>
75/// <p><code>AddRouteTableIds</code></p></li>
76/// <li>
77/// <p><code>AutomaticBackupRetentionDays</code></p></li>
78/// <li>
79/// <p><code>DailyAutomaticBackupStartTime</code></p></li>
80/// <li>
81/// <p><code>DiskIopsConfiguration</code></p></li>
82/// <li>
83/// <p><code>FsxAdminPassword</code></p></li>
84/// <li>
85/// <p><code>HAPairs</code></p></li>
86/// <li>
87/// <p><code>RemoveRouteTableIds</code></p></li>
88/// <li>
89/// <p><code>StorageCapacity</code></p></li>
90/// <li>
91/// <p><code>ThroughputCapacity</code></p></li>
92/// <li>
93/// <p><code>ThroughputCapacityPerHAPair</code></p></li>
94/// <li>
95/// <p><code>WeeklyMaintenanceStartTime</code></p></li>
96/// </ul>
97/// <p>For FSx for OpenZFS file systems, you can update the following properties:</p>
98/// <ul>
99/// <li>
100/// <p><code>AddRouteTableIds</code></p></li>
101/// <li>
102/// <p><code>AutomaticBackupRetentionDays</code></p></li>
103/// <li>
104/// <p><code>CopyTagsToBackups</code></p></li>
105/// <li>
106/// <p><code>CopyTagsToVolumes</code></p></li>
107/// <li>
108/// <p><code>DailyAutomaticBackupStartTime</code></p></li>
109/// <li>
110/// <p><code>DiskIopsConfiguration</code></p></li>
111/// <li>
112/// <p><code>ReadCacheConfiguration</code></p></li>
113/// <li>
114/// <p><code>RemoveRouteTableIds</code></p></li>
115/// <li>
116/// <p><code>StorageCapacity</code></p></li>
117/// <li>
118/// <p><code>ThroughputCapacity</code></p></li>
119/// <li>
120/// <p><code>WeeklyMaintenanceStartTime</code></p></li>
121/// </ul>
122#[derive(::std::clone::Clone, ::std::fmt::Debug)]
123pub struct UpdateFileSystemFluentBuilder {
124 handle: ::std::sync::Arc<crate::client::Handle>,
125 inner: crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder,
126 config_override: ::std::option::Option<crate::config::Builder>,
127}
128impl
129 crate::client::customize::internal::CustomizableSend<
130 crate::operation::update_file_system::UpdateFileSystemOutput,
131 crate::operation::update_file_system::UpdateFileSystemError,
132 > for UpdateFileSystemFluentBuilder
133{
134 fn send(
135 self,
136 config_override: crate::config::Builder,
137 ) -> crate::client::customize::internal::BoxFuture<
138 crate::client::customize::internal::SendResult<
139 crate::operation::update_file_system::UpdateFileSystemOutput,
140 crate::operation::update_file_system::UpdateFileSystemError,
141 >,
142 > {
143 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
144 }
145}
146impl UpdateFileSystemFluentBuilder {
147 /// Creates a new `UpdateFileSystemFluentBuilder`.
148 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
149 Self {
150 handle,
151 inner: ::std::default::Default::default(),
152 config_override: ::std::option::Option::None,
153 }
154 }
155 /// Access the UpdateFileSystem as a reference.
156 pub fn as_input(&self) -> &crate::operation::update_file_system::builders::UpdateFileSystemInputBuilder {
157 &self.inner
158 }
159 /// Sends the request and returns the response.
160 ///
161 /// If an error occurs, an `SdkError` will be returned with additional details that
162 /// can be matched against.
163 ///
164 /// By default, any retryable failures will be retried twice. Retry behavior
165 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
166 /// set when configuring the client.
167 pub async fn send(
168 self,
169 ) -> ::std::result::Result<
170 crate::operation::update_file_system::UpdateFileSystemOutput,
171 ::aws_smithy_runtime_api::client::result::SdkError<
172 crate::operation::update_file_system::UpdateFileSystemError,
173 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
174 >,
175 > {
176 let input = self
177 .inner
178 .build()
179 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
180 let runtime_plugins = crate::operation::update_file_system::UpdateFileSystem::operation_runtime_plugins(
181 self.handle.runtime_plugins.clone(),
182 &self.handle.conf,
183 self.config_override,
184 );
185 crate::operation::update_file_system::UpdateFileSystem::orchestrate(&runtime_plugins, input).await
186 }
187
188 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
189 pub fn customize(
190 self,
191 ) -> crate::client::customize::CustomizableOperation<
192 crate::operation::update_file_system::UpdateFileSystemOutput,
193 crate::operation::update_file_system::UpdateFileSystemError,
194 Self,
195 > {
196 crate::client::customize::CustomizableOperation::new(self)
197 }
198 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
199 self.set_config_override(::std::option::Option::Some(config_override.into()));
200 self
201 }
202
203 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
204 self.config_override = config_override;
205 self
206 }
207 /// <p>The ID of the file system that you are updating.</p>
208 pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209 self.inner = self.inner.file_system_id(input.into());
210 self
211 }
212 /// <p>The ID of the file system that you are updating.</p>
213 pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214 self.inner = self.inner.set_file_system_id(input);
215 self
216 }
217 /// <p>The ID of the file system that you are updating.</p>
218 pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
219 self.inner.get_file_system_id()
220 }
221 /// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
222 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.client_request_token(input.into());
224 self
225 }
226 /// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
227 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.inner = self.inner.set_client_request_token(input);
229 self
230 }
231 /// <p>A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
232 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
233 self.inner.get_client_request_token()
234 }
235 /// <p>Use this parameter to increase the storage capacity of an FSx for Windows File Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. Specifies the storage capacity target value, in GiB, to increase the storage capacity for the file system that you're updating.</p><note>
236 /// <p>You can't make a storage capacity increase request if there is an existing storage capacity increase request in progress.</p>
237 /// </note>
238 /// <p>For Lustre file systems, the storage capacity target value can be the following:</p>
239 /// <ul>
240 /// <li>
241 /// <p>For <code>SCRATCH_2</code>, <code>PERSISTENT_1</code>, and <code>PERSISTENT_2 SSD</code> deployment types, valid values are in multiples of 2400 GiB. The value must be greater than the current storage capacity.</p></li>
242 /// <li>
243 /// <p>For <code>PERSISTENT HDD</code> file systems, valid values are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values must be greater than the current storage capacity.</p></li>
244 /// <li>
245 /// <p>For <code>SCRATCH_1</code> file systems, you can't increase the storage capacity.</p></li>
246 /// </ul>
247 /// <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-storage-capacity.html">Managing storage and throughput capacity</a> in the <i>FSx for Lustre User Guide</i>.</p>
248 /// <p>For FSx for OpenZFS file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>FSx for OpenZFS User Guide</i>.</p>
249 /// <p>For Windows file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. To increase storage capacity, the file system must have at least 16 MBps of throughput capacity. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>Amazon FSxfor Windows File Server User Guide</i>.</p>
250 /// <p>For ONTAP file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-storage-capacity.html">Managing storage capacity and provisioned IOPS</a> in the <i>Amazon FSx for NetApp ONTAP User Guide</i>.</p>
251 pub fn storage_capacity(mut self, input: i32) -> Self {
252 self.inner = self.inner.storage_capacity(input);
253 self
254 }
255 /// <p>Use this parameter to increase the storage capacity of an FSx for Windows File Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. Specifies the storage capacity target value, in GiB, to increase the storage capacity for the file system that you're updating.</p><note>
256 /// <p>You can't make a storage capacity increase request if there is an existing storage capacity increase request in progress.</p>
257 /// </note>
258 /// <p>For Lustre file systems, the storage capacity target value can be the following:</p>
259 /// <ul>
260 /// <li>
261 /// <p>For <code>SCRATCH_2</code>, <code>PERSISTENT_1</code>, and <code>PERSISTENT_2 SSD</code> deployment types, valid values are in multiples of 2400 GiB. The value must be greater than the current storage capacity.</p></li>
262 /// <li>
263 /// <p>For <code>PERSISTENT HDD</code> file systems, valid values are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values must be greater than the current storage capacity.</p></li>
264 /// <li>
265 /// <p>For <code>SCRATCH_1</code> file systems, you can't increase the storage capacity.</p></li>
266 /// </ul>
267 /// <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-storage-capacity.html">Managing storage and throughput capacity</a> in the <i>FSx for Lustre User Guide</i>.</p>
268 /// <p>For FSx for OpenZFS file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>FSx for OpenZFS User Guide</i>.</p>
269 /// <p>For Windows file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. To increase storage capacity, the file system must have at least 16 MBps of throughput capacity. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>Amazon FSxfor Windows File Server User Guide</i>.</p>
270 /// <p>For ONTAP file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-storage-capacity.html">Managing storage capacity and provisioned IOPS</a> in the <i>Amazon FSx for NetApp ONTAP User Guide</i>.</p>
271 pub fn set_storage_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
272 self.inner = self.inner.set_storage_capacity(input);
273 self
274 }
275 /// <p>Use this parameter to increase the storage capacity of an FSx for Windows File Server, FSx for Lustre, FSx for OpenZFS, or FSx for ONTAP file system. Specifies the storage capacity target value, in GiB, to increase the storage capacity for the file system that you're updating.</p><note>
276 /// <p>You can't make a storage capacity increase request if there is an existing storage capacity increase request in progress.</p>
277 /// </note>
278 /// <p>For Lustre file systems, the storage capacity target value can be the following:</p>
279 /// <ul>
280 /// <li>
281 /// <p>For <code>SCRATCH_2</code>, <code>PERSISTENT_1</code>, and <code>PERSISTENT_2 SSD</code> deployment types, valid values are in multiples of 2400 GiB. The value must be greater than the current storage capacity.</p></li>
282 /// <li>
283 /// <p>For <code>PERSISTENT HDD</code> file systems, valid values are multiples of 6000 GiB for 12-MBps throughput per TiB file systems and multiples of 1800 GiB for 40-MBps throughput per TiB file systems. The values must be greater than the current storage capacity.</p></li>
284 /// <li>
285 /// <p>For <code>SCRATCH_1</code> file systems, you can't increase the storage capacity.</p></li>
286 /// </ul>
287 /// <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/managing-storage-capacity.html">Managing storage and throughput capacity</a> in the <i>FSx for Lustre User Guide</i>.</p>
288 /// <p>For FSx for OpenZFS file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>FSx for OpenZFS User Guide</i>.</p>
289 /// <p>For Windows file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. To increase storage capacity, the file system must have at least 16 MBps of throughput capacity. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing storage capacity</a> in the <i>Amazon FSxfor Windows File Server User Guide</i>.</p>
290 /// <p>For ONTAP file systems, the storage capacity target value must be at least 10 percent greater than the current storage capacity value. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-storage-capacity.html">Managing storage capacity and provisioned IOPS</a> in the <i>Amazon FSx for NetApp ONTAP User Guide</i>.</p>
291 pub fn get_storage_capacity(&self) -> &::std::option::Option<i32> {
292 self.inner.get_storage_capacity()
293 }
294 /// <p>The configuration updates for an Amazon FSx for Windows File Server file system.</p>
295 pub fn windows_configuration(mut self, input: crate::types::UpdateFileSystemWindowsConfiguration) -> Self {
296 self.inner = self.inner.windows_configuration(input);
297 self
298 }
299 /// <p>The configuration updates for an Amazon FSx for Windows File Server file system.</p>
300 pub fn set_windows_configuration(mut self, input: ::std::option::Option<crate::types::UpdateFileSystemWindowsConfiguration>) -> Self {
301 self.inner = self.inner.set_windows_configuration(input);
302 self
303 }
304 /// <p>The configuration updates for an Amazon FSx for Windows File Server file system.</p>
305 pub fn get_windows_configuration(&self) -> &::std::option::Option<crate::types::UpdateFileSystemWindowsConfiguration> {
306 self.inner.get_windows_configuration()
307 }
308 /// <p>The configuration object for Amazon FSx for Lustre file systems used in the <code>UpdateFileSystem</code> operation.</p>
309 pub fn lustre_configuration(mut self, input: crate::types::UpdateFileSystemLustreConfiguration) -> Self {
310 self.inner = self.inner.lustre_configuration(input);
311 self
312 }
313 /// <p>The configuration object for Amazon FSx for Lustre file systems used in the <code>UpdateFileSystem</code> operation.</p>
314 pub fn set_lustre_configuration(mut self, input: ::std::option::Option<crate::types::UpdateFileSystemLustreConfiguration>) -> Self {
315 self.inner = self.inner.set_lustre_configuration(input);
316 self
317 }
318 /// <p>The configuration object for Amazon FSx for Lustre file systems used in the <code>UpdateFileSystem</code> operation.</p>
319 pub fn get_lustre_configuration(&self) -> &::std::option::Option<crate::types::UpdateFileSystemLustreConfiguration> {
320 self.inner.get_lustre_configuration()
321 }
322 /// <p>The configuration updates for an Amazon FSx for NetApp ONTAP file system.</p>
323 pub fn ontap_configuration(mut self, input: crate::types::UpdateFileSystemOntapConfiguration) -> Self {
324 self.inner = self.inner.ontap_configuration(input);
325 self
326 }
327 /// <p>The configuration updates for an Amazon FSx for NetApp ONTAP file system.</p>
328 pub fn set_ontap_configuration(mut self, input: ::std::option::Option<crate::types::UpdateFileSystemOntapConfiguration>) -> Self {
329 self.inner = self.inner.set_ontap_configuration(input);
330 self
331 }
332 /// <p>The configuration updates for an Amazon FSx for NetApp ONTAP file system.</p>
333 pub fn get_ontap_configuration(&self) -> &::std::option::Option<crate::types::UpdateFileSystemOntapConfiguration> {
334 self.inner.get_ontap_configuration()
335 }
336 /// <p>The configuration updates for an FSx for OpenZFS file system.</p>
337 pub fn open_zfs_configuration(mut self, input: crate::types::UpdateFileSystemOpenZfsConfiguration) -> Self {
338 self.inner = self.inner.open_zfs_configuration(input);
339 self
340 }
341 /// <p>The configuration updates for an FSx for OpenZFS file system.</p>
342 pub fn set_open_zfs_configuration(mut self, input: ::std::option::Option<crate::types::UpdateFileSystemOpenZfsConfiguration>) -> Self {
343 self.inner = self.inner.set_open_zfs_configuration(input);
344 self
345 }
346 /// <p>The configuration updates for an FSx for OpenZFS file system.</p>
347 pub fn get_open_zfs_configuration(&self) -> &::std::option::Option<crate::types::UpdateFileSystemOpenZfsConfiguration> {
348 self.inner.get_open_zfs_configuration()
349 }
350 /// <p>Specifies the file system's storage type.</p>
351 pub fn storage_type(mut self, input: crate::types::StorageType) -> Self {
352 self.inner = self.inner.storage_type(input);
353 self
354 }
355 /// <p>Specifies the file system's storage type.</p>
356 pub fn set_storage_type(mut self, input: ::std::option::Option<crate::types::StorageType>) -> Self {
357 self.inner = self.inner.set_storage_type(input);
358 self
359 }
360 /// <p>Specifies the file system's storage type.</p>
361 pub fn get_storage_type(&self) -> &::std::option::Option<crate::types::StorageType> {
362 self.inner.get_storage_type()
363 }
364 /// <p>The Lustre version you are updating an FSx for Lustre file system to. Valid values are <code>2.12</code> and <code>2.15</code>. The value you choose must be newer than the file system's current Lustre version.</p>
365 pub fn file_system_type_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
366 self.inner = self.inner.file_system_type_version(input.into());
367 self
368 }
369 /// <p>The Lustre version you are updating an FSx for Lustre file system to. Valid values are <code>2.12</code> and <code>2.15</code>. The value you choose must be newer than the file system's current Lustre version.</p>
370 pub fn set_file_system_type_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
371 self.inner = self.inner.set_file_system_type_version(input);
372 self
373 }
374 /// <p>The Lustre version you are updating an FSx for Lustre file system to. Valid values are <code>2.12</code> and <code>2.15</code>. The value you choose must be newer than the file system's current Lustre version.</p>
375 pub fn get_file_system_type_version(&self) -> &::std::option::Option<::std::string::String> {
376 self.inner.get_file_system_type_version()
377 }
378}