rusoto_fsx/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl FsxClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "fsx", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53/// <p>The Microsoft AD attributes of the Amazon FSx for Windows File Server file system.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct ActiveDirectoryBackupAttributes {
57    /// <p>The ID of the AWS Managed Microsoft Active Directory instance to which the file system is joined.</p>
58    #[serde(rename = "ActiveDirectoryId")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub active_directory_id: Option<String>,
61    /// <p>The fully qualified domain name of the self-managed AD directory.</p>
62    #[serde(rename = "DomainName")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub domain_name: Option<String>,
65}
66
67/// <p>Describes a specific Amazon FSx Administrative Action for the current Windows file system.</p>
68#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
69#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
70pub struct AdministrativeAction {
71    #[serde(rename = "AdministrativeActionType")]
72    #[serde(skip_serializing_if = "Option::is_none")]
73    pub administrative_action_type: Option<String>,
74    #[serde(rename = "FailureDetails")]
75    #[serde(skip_serializing_if = "Option::is_none")]
76    pub failure_details: Option<AdministrativeActionFailureDetails>,
77    /// <p>Provides the percent complete of a <code>STORAGE_OPTIMIZATION</code> administrative action.</p>
78    #[serde(rename = "ProgressPercent")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub progress_percent: Option<i64>,
81    /// <p>Time that the administrative action request was received.</p>
82    #[serde(rename = "RequestTime")]
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub request_time: Option<f64>,
85    /// <p><p>Describes the status of the administrative action, as follows:</p> <ul> <li> <p> <code>FAILED</code> - Amazon FSx failed to process the administrative action successfully.</p> </li> <li> <p> <code>IN<em>PROGRESS</code> - Amazon FSx is processing the administrative action.</p> </li> <li> <p> <code>PENDING</code> - Amazon FSx is waiting to process the administrative action.</p> </li> <li> <p> <code>COMPLETED</code> - Amazon FSx has finished processing the administrative task.</p> </li> <li> <p> <code>UPDATED</em>OPTIMIZING</code> - For a storage capacity increase update, Amazon FSx has updated the file system with the new storage capacity, and is now performing the storage optimization process. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing Storage Capacity</a>.</p> </li> </ul></p>
86    #[serde(rename = "Status")]
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub status: Option<String>,
89    /// <p>Describes the target <code>StorageCapacity</code> or <code>ThroughputCapacity</code> value provided in the <code>UpdateFileSystem</code> operation. Returned for <code>FILE_SYSTEM_UPDATE</code> administrative actions. </p>
90    #[serde(rename = "TargetFileSystemValues")]
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub target_file_system_values: Option<FileSystem>,
93}
94
95/// <p>Provides information about a failed administrative action.</p>
96#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
97#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
98pub struct AdministrativeActionFailureDetails {
99    /// <p>Error message providing details about the failure.</p>
100    #[serde(rename = "Message")]
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub message: Option<String>,
103}
104
105/// <p>A backup of an Amazon FSx for file system.</p>
106#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
107#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
108pub struct Backup {
109    /// <p>The ID of the backup.</p>
110    #[serde(rename = "BackupId")]
111    pub backup_id: String,
112    /// <p>The time when a particular backup was created.</p>
113    #[serde(rename = "CreationTime")]
114    pub creation_time: f64,
115    /// <p>The configuration of the self-managed Microsoft Active Directory (AD) to which the Windows File Server instance is joined.</p>
116    #[serde(rename = "DirectoryInformation")]
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub directory_information: Option<ActiveDirectoryBackupAttributes>,
119    /// <p>Details explaining any failures that occur when creating a backup.</p>
120    #[serde(rename = "FailureDetails")]
121    #[serde(skip_serializing_if = "Option::is_none")]
122    pub failure_details: Option<BackupFailureDetails>,
123    /// <p>Metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
124    #[serde(rename = "FileSystem")]
125    pub file_system: FileSystem,
126    /// <p>The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this backup of the Amazon FSx for Windows file system's data at rest. Amazon FSx for Lustre does not support KMS encryption.</p>
127    #[serde(rename = "KmsKeyId")]
128    #[serde(skip_serializing_if = "Option::is_none")]
129    pub kms_key_id: Option<String>,
130    /// <p>The lifecycle status of the backup.</p>
131    #[serde(rename = "Lifecycle")]
132    pub lifecycle: String,
133    #[serde(rename = "ProgressPercent")]
134    #[serde(skip_serializing_if = "Option::is_none")]
135    pub progress_percent: Option<i64>,
136    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
137    #[serde(rename = "ResourceARN")]
138    #[serde(skip_serializing_if = "Option::is_none")]
139    pub resource_arn: Option<String>,
140    /// <p>Tags associated with a particular file system.</p>
141    #[serde(rename = "Tags")]
142    #[serde(skip_serializing_if = "Option::is_none")]
143    pub tags: Option<Vec<Tag>>,
144    /// <p>The type of the backup.</p>
145    #[serde(rename = "Type")]
146    pub type_: String,
147}
148
149/// <p>If backup creation fails, this structure contains the details of that failure.</p>
150#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
151#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
152pub struct BackupFailureDetails {
153    /// <p>A message describing the backup creation failure.</p>
154    #[serde(rename = "Message")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub message: Option<String>,
157}
158
159/// <p>Cancels a data repository task.</p>
160#[derive(Clone, Debug, Default, PartialEq, Serialize)]
161#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
162pub struct CancelDataRepositoryTaskRequest {
163    /// <p>Specifies the data repository task to cancel.</p>
164    #[serde(rename = "TaskId")]
165    pub task_id: String,
166}
167
168#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
169#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
170pub struct CancelDataRepositoryTaskResponse {
171    /// <p><p>The lifecycle status of the data repository task, as follows:</p> <ul> <li> <p> <code>PENDING</code> - Amazon FSx has not started the task.</p> </li> <li> <p> <code>EXECUTING</code> - Amazon FSx is processing the task.</p> </li> <li> <p> <code>FAILED</code> - Amazon FSx was not able to complete the task. For example, there may be files the task failed to process. The <a>DataRepositoryTaskFailureDetails</a> property provides more information about task failures.</p> </li> <li> <p> <code>SUCCEEDED</code> - FSx completed the task successfully.</p> </li> <li> <p> <code>CANCELED</code> - Amazon FSx canceled the task and it did not complete.</p> </li> <li> <p> <code>CANCELING</code> - FSx is in process of canceling the task.</p> </li> </ul></p>
172    #[serde(rename = "Lifecycle")]
173    #[serde(skip_serializing_if = "Option::is_none")]
174    pub lifecycle: Option<String>,
175    /// <p>The ID of the task being canceled.</p>
176    #[serde(rename = "TaskId")]
177    #[serde(skip_serializing_if = "Option::is_none")]
178    pub task_id: Option<String>,
179}
180
181/// <p>Provides a report detailing the data repository task results of the files processed that match the criteria specified in the report <code>Scope</code> parameter. FSx delivers the report to the file system's linked data repository in Amazon S3, using the path specified in the report <code>Path</code> parameter. You can specify whether or not a report gets generated for a task using the <code>Enabled</code> parameter.</p>
182#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
183pub struct CompletionReport {
184    /// <p>Set <code>Enabled</code> to <code>True</code> to generate a <code>CompletionReport</code> when the task completes. If set to <code>true</code>, then you need to provide a report <code>Scope</code>, <code>Path</code>, and <code>Format</code>. Set <code>Enabled</code> to <code>False</code> if you do not want a <code>CompletionReport</code> generated when the task completes.</p>
185    #[serde(rename = "Enabled")]
186    pub enabled: bool,
187    /// <p>Required if <code>Enabled</code> is set to <code>true</code>. Specifies the format of the <code>CompletionReport</code>. <code>REPORT_CSV_20191124</code> is the only format currently supported. When <code>Format</code> is set to <code>REPORT_CSV_20191124</code>, the <code>CompletionReport</code> is provided in CSV format, and is delivered to <code>{path}/task-{id}/failures.csv</code>. </p>
188    #[serde(rename = "Format")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub format: Option<String>,
191    /// <p>Required if <code>Enabled</code> is set to <code>true</code>. Specifies the location of the report on the file system's linked S3 data repository. An absolute path that defines where the completion report will be stored in the destination location. The <code>Path</code> you provide must be located within the file system’s ExportPath. An example <code>Path</code> value is "s3://myBucket/myExportPath/optionalPrefix". The report provides the following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a file system's <code>ExportPath</code>, see . </p>
192    #[serde(rename = "Path")]
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub path: Option<String>,
195    /// <p>Required if <code>Enabled</code> is set to <code>true</code>. Specifies the scope of the <code>CompletionReport</code>; <code>FAILED_FILES_ONLY</code> is the only scope currently supported. When <code>Scope</code> is set to <code>FAILED_FILES_ONLY</code>, the <code>CompletionReport</code> only contains information about files that the data repository task failed to process.</p>
196    #[serde(rename = "Scope")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub scope: Option<String>,
199}
200
201/// <p>The request object for the <code>CreateBackup</code> operation.</p>
202#[derive(Clone, Debug, Default, PartialEq, Serialize)]
203#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
204pub struct CreateBackupRequest {
205    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.</p>
206    #[serde(rename = "ClientRequestToken")]
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub client_request_token: Option<String>,
209    /// <p>The ID of the file system to back up.</p>
210    #[serde(rename = "FileSystemId")]
211    pub file_system_id: String,
212    /// <p>The tags to apply to the backup at backup creation. The key value of the <code>Name</code> tag appears in the console as the backup name. If you have set <code>CopyTagsToBackups</code> to true, and you specify one or more tags using the <code>CreateBackup</code> action, no existing tags on the file system are copied from the file system to the backup.</p>
213    #[serde(rename = "Tags")]
214    #[serde(skip_serializing_if = "Option::is_none")]
215    pub tags: Option<Vec<Tag>>,
216}
217
218/// <p>The response object for the <code>CreateBackup</code> operation.</p>
219#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
220#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
221pub struct CreateBackupResponse {
222    /// <p>A description of the backup.</p>
223    #[serde(rename = "Backup")]
224    #[serde(skip_serializing_if = "Option::is_none")]
225    pub backup: Option<Backup>,
226}
227
228#[derive(Clone, Debug, Default, PartialEq, Serialize)]
229#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
230pub struct CreateDataRepositoryTaskRequest {
231    #[serde(rename = "ClientRequestToken")]
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub client_request_token: Option<String>,
234    #[serde(rename = "FileSystemId")]
235    pub file_system_id: String,
236    /// <p>(Optional) The path or paths on the Amazon FSx file system to use when the data repository task is processed. The default path is the file system root directory. The paths you provide need to be relative to the mount point of the file system. If the mount point is <code>/mnt/fsx</code> and <code>/mnt/fsx/path1</code> is a directory or file on the file system you want to export, then the path to provide is <code>path1</code>. If a path that you provide isn't valid, the task fails.</p>
237    #[serde(rename = "Paths")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub paths: Option<Vec<String>>,
240    /// <p>Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the <code>Scope</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/task-completion-report.html">Working with Task Completion Reports</a>.</p>
241    #[serde(rename = "Report")]
242    pub report: CompletionReport,
243    #[serde(rename = "Tags")]
244    #[serde(skip_serializing_if = "Option::is_none")]
245    pub tags: Option<Vec<Tag>>,
246    /// <p>Specifies the type of data repository task to create.</p>
247    #[serde(rename = "Type")]
248    pub type_: String,
249}
250
251#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
252#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
253pub struct CreateDataRepositoryTaskResponse {
254    /// <p>The description of the data repository task that you just created.</p>
255    #[serde(rename = "DataRepositoryTask")]
256    #[serde(skip_serializing_if = "Option::is_none")]
257    pub data_repository_task: Option<DataRepositoryTask>,
258}
259
260/// <p>The request object for the <code>CreateFileSystemFromBackup</code> operation.</p>
261#[derive(Clone, Debug, Default, PartialEq, Serialize)]
262#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
263pub struct CreateFileSystemFromBackupRequest {
264    #[serde(rename = "BackupId")]
265    pub backup_id: String,
266    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.</p>
267    #[serde(rename = "ClientRequestToken")]
268    #[serde(skip_serializing_if = "Option::is_none")]
269    pub client_request_token: Option<String>,
270    #[serde(rename = "LustreConfiguration")]
271    #[serde(skip_serializing_if = "Option::is_none")]
272    pub lustre_configuration: Option<CreateFileSystemLustreConfiguration>,
273    /// <p>A list of IDs for the security groups that apply to the specified network interfaces created for file system access. These security groups apply to all network interfaces. This value isn't returned in later DescribeFileSystem requests.</p>
274    #[serde(rename = "SecurityGroupIds")]
275    #[serde(skip_serializing_if = "Option::is_none")]
276    pub security_group_ids: Option<Vec<String>>,
277    /// <p><p>Sets the storage type for the Windows file system you&#39;re creating from a backup. Valid values are <code>SSD</code> and <code>HDD</code>.</p> <ul> <li> <p>Set to <code>SSD</code> to use solid state drive storage. Supported on all Windows deployment types.</p> </li> <li> <p>Set to <code>HDD</code> to use hard disk drive storage. Supported on <code>SINGLE<em>AZ</em>2</code> and <code>MULTI<em>AZ</em>1</code> Windows file system deployment types. </p> </li> </ul> <p> Default value is <code>SSD</code>. </p> <note> <p>HDD and SSD storage types have different minimum storage capacity requirements. A restored file system&#39;s storage capacity is tied to the file system that was backed up. You can create a file system that uses HDD storage from a backup of a file system that used SSD storage only if the original SSD file system had a storage capacity of at least 2000 GiB. </p> </note></p>
278    #[serde(rename = "StorageType")]
279    #[serde(skip_serializing_if = "Option::is_none")]
280    pub storage_type: Option<String>,
281    /// <p>Specifies the IDs of the subnets that the file system will be accessible from. For Windows <code>MULTI_AZ_1</code> file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the <code>WindowsConfiguration &gt; PreferredSubnetID</code> property.</p> <p>For Windows <code>SINGLE_AZ_1</code> and <code>SINGLE_AZ_2</code> deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet's Availability Zone.</p>
282    #[serde(rename = "SubnetIds")]
283    pub subnet_ids: Vec<String>,
284    /// <p>The tags to be applied to the file system at file system creation. The key value of the <code>Name</code> tag appears in the console as the file system name.</p>
285    #[serde(rename = "Tags")]
286    #[serde(skip_serializing_if = "Option::is_none")]
287    pub tags: Option<Vec<Tag>>,
288    /// <p>The configuration for this Microsoft Windows file system.</p>
289    #[serde(rename = "WindowsConfiguration")]
290    #[serde(skip_serializing_if = "Option::is_none")]
291    pub windows_configuration: Option<CreateFileSystemWindowsConfiguration>,
292}
293
294/// <p>The response object for the <code>CreateFileSystemFromBackup</code> operation.</p>
295#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
296#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
297pub struct CreateFileSystemFromBackupResponse {
298    /// <p>A description of the file system.</p>
299    #[serde(rename = "FileSystem")]
300    #[serde(skip_serializing_if = "Option::is_none")]
301    pub file_system: Option<FileSystem>,
302}
303
304/// <p>The Lustre configuration for the file system being created. </p>
305#[derive(Clone, Debug, Default, PartialEq, Serialize)]
306#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
307pub struct CreateFileSystemLustreConfiguration {
308    #[serde(rename = "AutomaticBackupRetentionDays")]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    pub automatic_backup_retention_days: Option<i64>,
311    /// <p>A boolean flag indicating whether tags for the file system should be copied to backups. This value defaults to false. If it's set to true, all tags for the file system are copied to all automatic and user-initiated backups where the user doesn't specify tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from the file system, regardless of this value.</p>
312    #[serde(rename = "CopyTagsToBackups")]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    pub copy_tags_to_backups: Option<bool>,
315    #[serde(rename = "DailyAutomaticBackupStartTime")]
316    #[serde(skip_serializing_if = "Option::is_none")]
317    pub daily_automatic_backup_start_time: Option<String>,
318    /// <p> Choose <code>SCRATCH_1</code> and <code>SCRATCH_2</code> deployment types when you need temporary storage and shorter-term processing of data. The <code>SCRATCH_2</code> deployment type provides in-transit encryption of data and higher burst throughput capacity than <code>SCRATCH_1</code>.</p> <note> <p>This option can only be set for for PERSISTENT_1 deployments types.</p> </note> <p>Choose <code>PERSISTENT_1</code> deployment type for longer-term storage and workloads and encryption of data in transit. To learn more about deployment types, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-deployment-types.html"> FSx for Lustre Deployment Options</a>.</p> <p>Encryption of data in-transit is automatically enabled when you access a <code>SCRATCH_2</code> or <code>PERSISTENT_1</code> file system from Amazon EC2 instances that <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data- protection.html">support this feature</a>. (Default = <code>SCRATCH_1</code>) </p> <p>Encryption of data in-transit for <code>SCRATCH_2</code> and <code>PERSISTENT_1</code> deployment types is supported when accessed from supported instance types in supported AWS Regions. To learn more, <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/encryption-in-transit-fsxl.html">Encrypting Data in Transit</a>.</p>
319    #[serde(rename = "DeploymentType")]
320    #[serde(skip_serializing_if = "Option::is_none")]
321    pub deployment_type: Option<String>,
322    /// <p>(Optional) The path in Amazon S3 where the root of your Amazon FSx file system is exported. The path must use the same Amazon S3 bucket as specified in ImportPath. You can provide an optional prefix to which new and changed data is to be exported from your Amazon FSx for Lustre file system. If an <code>ExportPath</code> value is not provided, Amazon FSx sets a default export path, <code>s3://import-bucket/FSxLustre[creation-timestamp]</code>. The timestamp is in UTC format, for example <code>s3://import-bucket/FSxLustre20181105T222312Z</code>.</p> <p>The Amazon S3 export bucket must be the same as the import bucket specified by <code>ImportPath</code>. If you only specify a bucket name, such as <code>s3://import-bucket</code>, you get a 1:1 mapping of file system objects to S3 bucket objects. This mapping means that the input data in S3 is overwritten on export. If you provide a custom prefix in the export path, such as <code>s3://import-bucket/[custom-optional-prefix]</code>, Amazon FSx exports the contents of your file system to that export prefix in the Amazon S3 bucket.</p>
323    #[serde(rename = "ExportPath")]
324    #[serde(skip_serializing_if = "Option::is_none")]
325    pub export_path: Option<String>,
326    /// <p>(Optional) The path to the Amazon S3 bucket (including the optional prefix) that you're using as the data repository for your Amazon FSx for Lustre file system. The root of your FSx for Lustre file system will be mapped to the root of the Amazon S3 bucket you select. An example is <code>s3://import-bucket/optional-prefix</code>. If you specify a prefix after the Amazon S3 bucket name, only object keys with that prefix are loaded into the file system.</p>
327    #[serde(rename = "ImportPath")]
328    #[serde(skip_serializing_if = "Option::is_none")]
329    pub import_path: Option<String>,
330    /// <p>(Optional) For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.</p> <p>The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB.</p>
331    #[serde(rename = "ImportedFileChunkSize")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub imported_file_chunk_size: Option<i64>,
334    /// <p> Required for the <code>PERSISTENT_1</code> deployment type, describes the amount of read and write throughput for each 1 tebibyte of storage, in MB/s/TiB. File system throughput capacity is calculated by multiplying file system storage capacity (TiB) by the PerUnitStorageThroughput (MB/s/TiB). For a 2.4 TiB file system, provisioning 50 MB/s/TiB of PerUnitStorageThroughput yields 117 MB/s of file system throughput. You pay for the amount of throughput that you provision. </p> <p>Valid values are 50, 100, 200.</p>
335    #[serde(rename = "PerUnitStorageThroughput")]
336    #[serde(skip_serializing_if = "Option::is_none")]
337    pub per_unit_storage_throughput: Option<i64>,
338    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone, where d is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.</p>
339    #[serde(rename = "WeeklyMaintenanceStartTime")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    pub weekly_maintenance_start_time: Option<String>,
342}
343
344/// <p>The request object used to create a new Amazon FSx file system.</p>
345#[derive(Clone, Debug, Default, PartialEq, Serialize)]
346#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
347pub struct CreateFileSystemRequest {
348    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.</p>
349    #[serde(rename = "ClientRequestToken")]
350    #[serde(skip_serializing_if = "Option::is_none")]
351    pub client_request_token: Option<String>,
352    /// <p>The type of Amazon FSx file system to create, either <code>WINDOWS</code> or <code>LUSTRE</code>.</p>
353    #[serde(rename = "FileSystemType")]
354    pub file_system_type: String,
355    #[serde(rename = "KmsKeyId")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    pub kms_key_id: Option<String>,
358    #[serde(rename = "LustreConfiguration")]
359    #[serde(skip_serializing_if = "Option::is_none")]
360    pub lustre_configuration: Option<CreateFileSystemLustreConfiguration>,
361    /// <p>A list of IDs specifying the security groups to apply to all network interfaces created for file system access. This list isn't returned in later requests to describe the file system.</p>
362    #[serde(rename = "SecurityGroupIds")]
363    #[serde(skip_serializing_if = "Option::is_none")]
364    pub security_group_ids: Option<Vec<String>>,
365    /// <p><p>Sets the storage capacity of the file system that you&#39;re creating.</p> <p>For Lustre file systems:</p> <ul> <li> <p>For <code>SCRATCH<em>2</code> and <code>PERSISTENT</em>1</code> deployment types, valid values are 1.2, 2.4, and increments of 2.4 TiB.</p> </li> <li> <p>For <code>SCRATCH_1</code> deployment type, valid values are 1.2, 2.4, and increments of 3.6 TiB.</p> </li> </ul> <p>For Windows file systems:</p> <ul> <li> <p>If <code>StorageType=SSD</code>, valid values are 32 GiB - 65,536 GiB (64 TiB).</p> </li> <li> <p>If <code>StorageType=HDD</code>, valid values are 2000 GiB - 65,536 GiB (64 TiB).</p> </li> </ul></p>
366    #[serde(rename = "StorageCapacity")]
367    pub storage_capacity: i64,
368    /// <p>Sets the storage type for the Amazon FSx for Windows file system you're creating. Valid values are <code>SSD</code> and <code>HDD</code>.</p> <ul> <li> <p>Set to <code>SSD</code> to use solid state drive storage. SSD is supported on all Windows deployment types.</p> </li> <li> <p>Set to <code>HDD</code> to use hard disk drive storage. HDD is supported on <code>SINGLE_AZ_2</code> and <code>MULTI_AZ_1</code> Windows file system deployment types. </p> </li> </ul> <p> Default value is <code>SSD</code>. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/optimize-fsx-costs.html#storage-type-options"> Storage Type Options</a> in the <i>Amazon FSx for Windows User Guide</i>. </p>
369    #[serde(rename = "StorageType")]
370    #[serde(skip_serializing_if = "Option::is_none")]
371    pub storage_type: Option<String>,
372    /// <p>Specifies the IDs of the subnets that the file system will be accessible from. For Windows <code>MULTI_AZ_1</code> file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the <code>WindowsConfiguration &gt; PreferredSubnetID</code> property.</p> <p>For Windows <code>SINGLE_AZ_1</code> and <code>SINGLE_AZ_2</code> file system deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet's Availability Zone.</p>
373    #[serde(rename = "SubnetIds")]
374    pub subnet_ids: Vec<String>,
375    /// <p>The tags to apply to the file system being created. The key value of the <code>Name</code> tag appears in the console as the file system name.</p>
376    #[serde(rename = "Tags")]
377    #[serde(skip_serializing_if = "Option::is_none")]
378    pub tags: Option<Vec<Tag>>,
379    /// <p>The Microsoft Windows configuration for the file system being created. </p>
380    #[serde(rename = "WindowsConfiguration")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    pub windows_configuration: Option<CreateFileSystemWindowsConfiguration>,
383}
384
385/// <p>The response object returned after the file system is created.</p>
386#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
387#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
388pub struct CreateFileSystemResponse {
389    /// <p>The configuration of the file system that was created.</p>
390    #[serde(rename = "FileSystem")]
391    #[serde(skip_serializing_if = "Option::is_none")]
392    pub file_system: Option<FileSystem>,
393}
394
395/// <p>The configuration object for the Microsoft Windows file system used in <code>CreateFileSystem</code> and <code>CreateFileSystemFromBackup</code> operations.</p>
396#[derive(Clone, Debug, Default, PartialEq, Serialize)]
397#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
398pub struct CreateFileSystemWindowsConfiguration {
399    /// <p>The ID for an existing AWS Managed Microsoft Active Directory (AD) instance that the file system should join when it's created.</p>
400    #[serde(rename = "ActiveDirectoryId")]
401    #[serde(skip_serializing_if = "Option::is_none")]
402    pub active_directory_id: Option<String>,
403    /// <p>The number of days to retain automatic backups. The default is to retain backups for 7 days. Setting this value to 0 disables the creation of automatic backups. The maximum retention period for backups is 35 days.</p>
404    #[serde(rename = "AutomaticBackupRetentionDays")]
405    #[serde(skip_serializing_if = "Option::is_none")]
406    pub automatic_backup_retention_days: Option<i64>,
407    /// <p>A boolean flag indicating whether tags for the file system should be copied to backups. This value defaults to false. If it's set to true, all tags for the file system are copied to all automatic and user-initiated backups where the user doesn't specify tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from the file system, regardless of this value.</p>
408    #[serde(rename = "CopyTagsToBackups")]
409    #[serde(skip_serializing_if = "Option::is_none")]
410    pub copy_tags_to_backups: Option<bool>,
411    /// <p>The preferred time to take daily automatic backups, formatted HH:MM in the UTC time zone.</p>
412    #[serde(rename = "DailyAutomaticBackupStartTime")]
413    #[serde(skip_serializing_if = "Option::is_none")]
414    pub daily_automatic_backup_start_time: Option<String>,
415    /// <p>Specifies the file system deployment type, valid values are the following:</p> <ul> <li> <p> <code>MULTI_AZ_1</code> - Deploys a high availability file system that is configured for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability. You can only deploy a Multi-AZ file system in AWS Regions that have a minimum of three Availability Zones. Also supports HDD storage type</p> </li> <li> <p> <code>SINGLE_AZ_1</code> - (Default) Choose to deploy a file system that is configured for single AZ redundancy.</p> </li> <li> <p> <code>SINGLE_AZ_2</code> - The latest generation Single AZ file system. Specifies a file system that is configured for single AZ redundancy and supports HDD storage type.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html"> Availability and Durability: Single-AZ and Multi-AZ File Systems</a>.</p>
416    #[serde(rename = "DeploymentType")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub deployment_type: Option<String>,
419    /// <p>Required when <code>DeploymentType</code> is set to <code>MULTI_AZ_1</code>. This specifies the subnet in which you want the preferred file server to be located. For in-AWS applications, we recommend that you launch your clients in the same Availability Zone (AZ) as your preferred file server to reduce cross-AZ data transfer costs and minimize latency. </p>
420    #[serde(rename = "PreferredSubnetId")]
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub preferred_subnet_id: Option<String>,
423    #[serde(rename = "SelfManagedActiveDirectoryConfiguration")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub self_managed_active_directory_configuration:
426        Option<SelfManagedActiveDirectoryConfiguration>,
427    /// <p>The throughput of an Amazon FSx file system, measured in megabytes per second, in 2 to the <i>n</i>th increments, between 2^3 (8) and 2^11 (2048).</p>
428    #[serde(rename = "ThroughputCapacity")]
429    pub throughput_capacity: i64,
430    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone, where d is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.</p>
431    #[serde(rename = "WeeklyMaintenanceStartTime")]
432    #[serde(skip_serializing_if = "Option::is_none")]
433    pub weekly_maintenance_start_time: Option<String>,
434}
435
436/// <p>The data repository configuration object for Lustre file systems returned in the response of the <code>CreateFileSystem</code> operation.</p>
437#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
438#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
439pub struct DataRepositoryConfiguration {
440    /// <p>The export path to the Amazon S3 bucket (and prefix) that you are using to store new and changed Lustre file system files in S3.</p>
441    #[serde(rename = "ExportPath")]
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub export_path: Option<String>,
444    /// <p>The import path to the Amazon S3 bucket (and optional prefix) that you're using as the data repository for your FSx for Lustre file system, for example <code>s3://import-bucket/optional-prefix</code>. If a prefix is specified after the Amazon S3 bucket name, only object keys with that prefix are loaded into the file system.</p>
445    #[serde(rename = "ImportPath")]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    pub import_path: Option<String>,
448    /// <p>For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.</p> <p>The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB.</p>
449    #[serde(rename = "ImportedFileChunkSize")]
450    #[serde(skip_serializing_if = "Option::is_none")]
451    pub imported_file_chunk_size: Option<i64>,
452}
453
454/// <p>A description of the data repository task. You use data repository tasks to perform bulk transfer operations between your Amazon FSx file system and its linked data repository.</p>
455#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
456#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
457pub struct DataRepositoryTask {
458    #[serde(rename = "CreationTime")]
459    pub creation_time: f64,
460    /// <p>The time that Amazon FSx completed processing the task, populated after the task is complete.</p>
461    #[serde(rename = "EndTime")]
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub end_time: Option<f64>,
464    /// <p>Failure message describing why the task failed, it is populated only when <code>Lifecycle</code> is set to <code>FAILED</code>.</p>
465    #[serde(rename = "FailureDetails")]
466    #[serde(skip_serializing_if = "Option::is_none")]
467    pub failure_details: Option<DataRepositoryTaskFailureDetails>,
468    #[serde(rename = "FileSystemId")]
469    pub file_system_id: String,
470    /// <p><p>The lifecycle status of the data repository task, as follows:</p> <ul> <li> <p> <code>PENDING</code> - Amazon FSx has not started the task.</p> </li> <li> <p> <code>EXECUTING</code> - Amazon FSx is processing the task.</p> </li> <li> <p> <code>FAILED</code> - Amazon FSx was not able to complete the task. For example, there may be files the task failed to process. The <a>DataRepositoryTaskFailureDetails</a> property provides more information about task failures.</p> </li> <li> <p> <code>SUCCEEDED</code> - FSx completed the task successfully.</p> </li> <li> <p> <code>CANCELED</code> - Amazon FSx canceled the task and it did not complete.</p> </li> <li> <p> <code>CANCELING</code> - FSx is in process of canceling the task.</p> </li> </ul> <note> <p>You cannot delete an FSx for Lustre file system if there are data repository tasks for the file system in the <code>PENDING</code> or <code>EXECUTING</code> states. Please retry when the data repository task is finished (with a status of <code>CANCELED</code>, <code>SUCCEEDED</code>, or <code>FAILED</code>). You can use the DescribeDataRepositoryTask action to monitor the task status. Contact the FSx team if you need to delete your file system immediately.</p> </note></p>
471    #[serde(rename = "Lifecycle")]
472    pub lifecycle: String,
473    /// <p>An array of paths on the Amazon FSx for Lustre file system that specify the data for the data repository task to process. For example, in an EXPORT_TO_REPOSITORY task, the paths specify which data to export to the linked data repository.</p> <p>(Default) If <code>Paths</code> is not specified, Amazon FSx uses the file system root directory.</p>
474    #[serde(rename = "Paths")]
475    #[serde(skip_serializing_if = "Option::is_none")]
476    pub paths: Option<Vec<String>>,
477    #[serde(rename = "Report")]
478    #[serde(skip_serializing_if = "Option::is_none")]
479    pub report: Option<CompletionReport>,
480    #[serde(rename = "ResourceARN")]
481    #[serde(skip_serializing_if = "Option::is_none")]
482    pub resource_arn: Option<String>,
483    /// <p>The time that Amazon FSx began processing the task.</p>
484    #[serde(rename = "StartTime")]
485    #[serde(skip_serializing_if = "Option::is_none")]
486    pub start_time: Option<f64>,
487    /// <p>Provides the status of the number of files that the task has processed successfully and failed to process.</p>
488    #[serde(rename = "Status")]
489    #[serde(skip_serializing_if = "Option::is_none")]
490    pub status: Option<DataRepositoryTaskStatus>,
491    #[serde(rename = "Tags")]
492    #[serde(skip_serializing_if = "Option::is_none")]
493    pub tags: Option<Vec<Tag>>,
494    /// <p>The system-generated, unique 17-digit ID of the data repository task.</p>
495    #[serde(rename = "TaskId")]
496    pub task_id: String,
497    /// <p>The type of data repository task; EXPORT_TO_REPOSITORY is the only type currently supported.</p>
498    #[serde(rename = "Type")]
499    pub type_: String,
500}
501
502/// <p>Provides information about why a data repository task failed. Only populated when the task <code>Lifecycle</code> is set to <code>FAILED</code>.</p>
503#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
504#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
505pub struct DataRepositoryTaskFailureDetails {
506    #[serde(rename = "Message")]
507    #[serde(skip_serializing_if = "Option::is_none")]
508    pub message: Option<String>,
509}
510
511/// <p>(Optional) An array of filter objects you can use to filter the response of data repository tasks you will see in the the response. You can filter the tasks returned in the response by one or more file system IDs, task lifecycles, and by task type. A filter object consists of a filter <code>Name</code>, and one or more <code>Values</code> for the filter.</p>
512#[derive(Clone, Debug, Default, PartialEq, Serialize)]
513#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
514pub struct DataRepositoryTaskFilter {
515    /// <p><p>Name of the task property to use in filtering the tasks returned in the response.</p> <ul> <li> <p>Use <code>file-system-id</code> to retrieve data repository tasks for specific file systems.</p> </li> <li> <p>Use <code>task-lifecycle</code> to retrieve data repository tasks with one or more specific lifecycle states, as follows: CANCELED, EXECUTING, FAILED, PENDING, and SUCCEEDED.</p> </li> </ul></p>
516    #[serde(rename = "Name")]
517    #[serde(skip_serializing_if = "Option::is_none")]
518    pub name: Option<String>,
519    /// <p>Use Values to include the specific file system IDs and task lifecycle states for the filters you are using.</p>
520    #[serde(rename = "Values")]
521    #[serde(skip_serializing_if = "Option::is_none")]
522    pub values: Option<Vec<String>>,
523}
524
525/// <p>Provides the task status showing a running total of the total number of files to be processed, the number successfully processed, and the number of files the task failed to process.</p>
526#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
527#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
528pub struct DataRepositoryTaskStatus {
529    /// <p>A running total of the number of files that the task failed to process.</p>
530    #[serde(rename = "FailedCount")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub failed_count: Option<i64>,
533    /// <p>The time at which the task status was last updated.</p>
534    #[serde(rename = "LastUpdatedTime")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub last_updated_time: Option<f64>,
537    /// <p>A running total of the number of files that the task has successfully processed.</p>
538    #[serde(rename = "SucceededCount")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub succeeded_count: Option<i64>,
541    /// <p>The total number of files that the task will process. While a task is executing, the sum of <code>SucceededCount</code> plus <code>FailedCount</code> may not equal <code>TotalCount</code>. When the task is complete, <code>TotalCount</code> equals the sum of <code>SucceededCount</code> plus <code>FailedCount</code>.</p>
542    #[serde(rename = "TotalCount")]
543    #[serde(skip_serializing_if = "Option::is_none")]
544    pub total_count: Option<i64>,
545}
546
547/// <p>The request object for <code>DeleteBackup</code> operation.</p>
548#[derive(Clone, Debug, Default, PartialEq, Serialize)]
549#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
550pub struct DeleteBackupRequest {
551    /// <p>The ID of the backup you want to delete.</p>
552    #[serde(rename = "BackupId")]
553    pub backup_id: String,
554    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This is automatically filled on your behalf when using the AWS CLI or SDK.</p>
555    #[serde(rename = "ClientRequestToken")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub client_request_token: Option<String>,
558}
559
560/// <p>The response object for <code>DeleteBackup</code> operation.</p>
561#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
562#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
563pub struct DeleteBackupResponse {
564    /// <p>The ID of the backup deleted.</p>
565    #[serde(rename = "BackupId")]
566    #[serde(skip_serializing_if = "Option::is_none")]
567    pub backup_id: Option<String>,
568    /// <p>The lifecycle of the backup. Should be <code>DELETED</code>.</p>
569    #[serde(rename = "Lifecycle")]
570    #[serde(skip_serializing_if = "Option::is_none")]
571    pub lifecycle: Option<String>,
572}
573
574/// <p>The configuration object for the Amazon FSx for Lustre file system being deleted in the <code>DeleteFileSystem</code> operation.</p>
575#[derive(Clone, Debug, Default, PartialEq, Serialize)]
576#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
577pub struct DeleteFileSystemLustreConfiguration {
578    /// <p>Use if <code>SkipFinalBackup</code> is set to <code>false</code>, and you want to apply an array of tags to the final backup. If you have set the file system property <code>CopyTagsToBackups</code> to true, and you specify one or more <code>FinalBackupTags</code> when deleting a file system, Amazon FSx will not copy any existing file system tags to the backup.</p>
579    #[serde(rename = "FinalBackupTags")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub final_backup_tags: Option<Vec<Tag>>,
582    /// <p>Set <code>SkipFinalBackup</code> to false if you want to take a final backup of the file system you are deleting. By default, Amazon FSx will not take a final backup on your behalf when the <code>DeleteFileSystem</code> operation is invoked. (Default = true)</p>
583    #[serde(rename = "SkipFinalBackup")]
584    #[serde(skip_serializing_if = "Option::is_none")]
585    pub skip_final_backup: Option<bool>,
586}
587
588/// <p>The response object for the Amazon FSx for Lustre file system being deleted in the <code>DeleteFileSystem</code> operation.</p>
589#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
590#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
591pub struct DeleteFileSystemLustreResponse {
592    /// <p>The ID of the final backup for this file system.</p>
593    #[serde(rename = "FinalBackupId")]
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub final_backup_id: Option<String>,
596    /// <p>The set of tags applied to the final backup.</p>
597    #[serde(rename = "FinalBackupTags")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub final_backup_tags: Option<Vec<Tag>>,
600}
601
602/// <p>The request object for <code>DeleteFileSystem</code> operation.</p>
603#[derive(Clone, Debug, Default, PartialEq, Serialize)]
604#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
605pub struct DeleteFileSystemRequest {
606    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This is automatically filled on your behalf when using the AWS CLI or SDK.</p>
607    #[serde(rename = "ClientRequestToken")]
608    #[serde(skip_serializing_if = "Option::is_none")]
609    pub client_request_token: Option<String>,
610    /// <p>The ID of the file system you want to delete.</p>
611    #[serde(rename = "FileSystemId")]
612    pub file_system_id: String,
613    #[serde(rename = "LustreConfiguration")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub lustre_configuration: Option<DeleteFileSystemLustreConfiguration>,
616    #[serde(rename = "WindowsConfiguration")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub windows_configuration: Option<DeleteFileSystemWindowsConfiguration>,
619}
620
621/// <p>The response object for the <code>DeleteFileSystem</code> operation.</p>
622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
624pub struct DeleteFileSystemResponse {
625    /// <p>The ID of the file system being deleted.</p>
626    #[serde(rename = "FileSystemId")]
627    #[serde(skip_serializing_if = "Option::is_none")]
628    pub file_system_id: Option<String>,
629    /// <p>The file system lifecycle for the deletion request. Should be <code>DELETING</code>.</p>
630    #[serde(rename = "Lifecycle")]
631    #[serde(skip_serializing_if = "Option::is_none")]
632    pub lifecycle: Option<String>,
633    #[serde(rename = "LustreResponse")]
634    #[serde(skip_serializing_if = "Option::is_none")]
635    pub lustre_response: Option<DeleteFileSystemLustreResponse>,
636    #[serde(rename = "WindowsResponse")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub windows_response: Option<DeleteFileSystemWindowsResponse>,
639}
640
641/// <p>The configuration object for the Microsoft Windows file system used in the <code>DeleteFileSystem</code> operation.</p>
642#[derive(Clone, Debug, Default, PartialEq, Serialize)]
643#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
644pub struct DeleteFileSystemWindowsConfiguration {
645    /// <p>A set of tags for your final backup.</p>
646    #[serde(rename = "FinalBackupTags")]
647    #[serde(skip_serializing_if = "Option::is_none")]
648    pub final_backup_tags: Option<Vec<Tag>>,
649    /// <p>By default, Amazon FSx for Windows takes a final backup on your behalf when the <code>DeleteFileSystem</code> operation is invoked. Doing this helps protect you from data loss, and we highly recommend taking the final backup. If you want to skip this backup, use this flag to do so.</p>
650    #[serde(rename = "SkipFinalBackup")]
651    #[serde(skip_serializing_if = "Option::is_none")]
652    pub skip_final_backup: Option<bool>,
653}
654
655/// <p>The response object for the Microsoft Windows file system used in the <code>DeleteFileSystem</code> operation.</p>
656#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
657#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
658pub struct DeleteFileSystemWindowsResponse {
659    /// <p>The ID of the final backup for this file system.</p>
660    #[serde(rename = "FinalBackupId")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub final_backup_id: Option<String>,
663    /// <p>The set of tags applied to the final backup.</p>
664    #[serde(rename = "FinalBackupTags")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub final_backup_tags: Option<Vec<Tag>>,
667}
668
669/// <p>The request object for <code>DescribeBackups</code> operation.</p>
670#[derive(Clone, Debug, Default, PartialEq, Serialize)]
671#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
672pub struct DescribeBackupsRequest {
673    /// <p>IDs of the backups you want to retrieve (String). This overrides any filters. If any IDs are not found, BackupNotFound will be thrown.</p>
674    #[serde(rename = "BackupIds")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub backup_ids: Option<Vec<String>>,
677    /// <p>Filters structure. Supported names are file-system-id and backup-type.</p>
678    #[serde(rename = "Filters")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub filters: Option<Vec<Filter>>,
681    /// <p>Maximum number of backups to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the <code>MaxResults</code> parameter specified in the request and the service's internal maximum number of items per page.</p>
682    #[serde(rename = "MaxResults")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub max_results: Option<i64>,
685    /// <p>Opaque pagination token returned from a previous <code>DescribeBackups</code> operation (String). If a token present, the action continues the list from where the returning call left off.</p>
686    #[serde(rename = "NextToken")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub next_token: Option<String>,
689}
690
691/// <p>Response object for <code>DescribeBackups</code> operation.</p>
692#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
693#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
694pub struct DescribeBackupsResponse {
695    /// <p>Any array of backups.</p>
696    #[serde(rename = "Backups")]
697    #[serde(skip_serializing_if = "Option::is_none")]
698    pub backups: Option<Vec<Backup>>,
699    /// <p>This is present if there are more backups than returned in the response (String). You can use the <code>NextToken</code> value in the later request to fetch the backups. </p>
700    #[serde(rename = "NextToken")]
701    #[serde(skip_serializing_if = "Option::is_none")]
702    pub next_token: Option<String>,
703}
704
705#[derive(Clone, Debug, Default, PartialEq, Serialize)]
706#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
707pub struct DescribeDataRepositoryTasksRequest {
708    /// <p>(Optional) You can use filters to narrow the <code>DescribeDataRepositoryTasks</code> response to include just tasks for specific file systems, or tasks in a specific lifecycle state.</p>
709    #[serde(rename = "Filters")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub filters: Option<Vec<DataRepositoryTaskFilter>>,
712    #[serde(rename = "MaxResults")]
713    #[serde(skip_serializing_if = "Option::is_none")]
714    pub max_results: Option<i64>,
715    #[serde(rename = "NextToken")]
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub next_token: Option<String>,
718    /// <p>(Optional) IDs of the tasks whose descriptions you want to retrieve (String).</p>
719    #[serde(rename = "TaskIds")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub task_ids: Option<Vec<String>>,
722}
723
724#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
725#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
726pub struct DescribeDataRepositoryTasksResponse {
727    /// <p>The collection of data repository task descriptions returned.</p>
728    #[serde(rename = "DataRepositoryTasks")]
729    #[serde(skip_serializing_if = "Option::is_none")]
730    pub data_repository_tasks: Option<Vec<DataRepositoryTask>>,
731    #[serde(rename = "NextToken")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub next_token: Option<String>,
734}
735
736/// <p>The request object for <code>DescribeFileSystems</code> operation.</p>
737#[derive(Clone, Debug, Default, PartialEq, Serialize)]
738#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
739pub struct DescribeFileSystemsRequest {
740    /// <p>IDs of the file systems whose descriptions you want to retrieve (String).</p>
741    #[serde(rename = "FileSystemIds")]
742    #[serde(skip_serializing_if = "Option::is_none")]
743    pub file_system_ids: Option<Vec<String>>,
744    /// <p>Maximum number of file systems to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the <code>MaxResults</code> parameter specified in the request and the service's internal maximum number of items per page.</p>
745    #[serde(rename = "MaxResults")]
746    #[serde(skip_serializing_if = "Option::is_none")]
747    pub max_results: Option<i64>,
748    /// <p>Opaque pagination token returned from a previous <code>DescribeFileSystems</code> operation (String). If a token present, the action continues the list from where the returning call left off.</p>
749    #[serde(rename = "NextToken")]
750    #[serde(skip_serializing_if = "Option::is_none")]
751    pub next_token: Option<String>,
752}
753
754/// <p>The response object for <code>DescribeFileSystems</code> operation.</p>
755#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
756#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
757pub struct DescribeFileSystemsResponse {
758    /// <p>An array of file system descriptions.</p>
759    #[serde(rename = "FileSystems")]
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub file_systems: Option<Vec<FileSystem>>,
762    /// <p>Present if there are more file systems than returned in the response (String). You can use the <code>NextToken</code> value in the later request to fetch the descriptions. </p>
763    #[serde(rename = "NextToken")]
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub next_token: Option<String>,
766}
767
768/// <p>A description of a specific Amazon FSx file system.</p>
769#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
770#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
771pub struct FileSystem {
772    /// <p>A list of administrative actions for the file system that are in process or waiting to be processed. Administrative actions describe changes to the Windows file system that you have initiated using the <code>UpdateFileSystem</code> action. </p>
773    #[serde(rename = "AdministrativeActions")]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub administrative_actions: Option<Vec<AdministrativeAction>>,
776    /// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.</p>
777    #[serde(rename = "CreationTime")]
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub creation_time: Option<f64>,
780    /// <p>The DNS name for the file system.</p>
781    #[serde(rename = "DNSName")]
782    #[serde(skip_serializing_if = "Option::is_none")]
783    pub dns_name: Option<String>,
784    #[serde(rename = "FailureDetails")]
785    #[serde(skip_serializing_if = "Option::is_none")]
786    pub failure_details: Option<FileSystemFailureDetails>,
787    /// <p>The system-generated, unique 17-digit ID of the file system.</p>
788    #[serde(rename = "FileSystemId")]
789    #[serde(skip_serializing_if = "Option::is_none")]
790    pub file_system_id: Option<String>,
791    /// <p>The type of Amazon FSx file system, either <code>LUSTRE</code> or <code>WINDOWS</code>.</p>
792    #[serde(rename = "FileSystemType")]
793    #[serde(skip_serializing_if = "Option::is_none")]
794    pub file_system_type: Option<String>,
795    /// <p>The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for Amazon FSx for Windows File Server file systems and persistent Amazon FSx for Lustre file systems at rest. In either case, if not specified, the Amazon FSx managed key is used. The scratch Amazon FSx for Lustre file systems are always encrypted at rest using Amazon FSx managed keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html">Encrypt</a> in the <i>AWS Key Management Service API Reference</i>.</p>
796    #[serde(rename = "KmsKeyId")]
797    #[serde(skip_serializing_if = "Option::is_none")]
798    pub kms_key_id: Option<String>,
799    /// <p><p>The lifecycle status of the file system, following are the possible values and what they mean:</p> <ul> <li> <p> <code>AVAILABLE</code> - The file system is in a healthy state, and is reachable and available for use.</p> </li> <li> <p> <code>CREATING</code> - Amazon FSx is creating the new file system.</p> </li> <li> <p> <code>DELETING</code> - Amazon FSx is deleting an existing file system.</p> </li> <li> <p> <code>FAILED</code> - An existing file system has experienced an unrecoverable failure. When creating a new file system, Amazon FSx was unable to create the file system.</p> </li> <li> <p> <code>MISCONFIGURED</code> indicates that the file system is in a failed but recoverable state.</p> </li> <li> <p> <code>UPDATING</code> indicates that the file system is undergoing a customer initiated update.</p> </li> </ul></p>
800    #[serde(rename = "Lifecycle")]
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub lifecycle: Option<String>,
803    #[serde(rename = "LustreConfiguration")]
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub lustre_configuration: Option<LustreFileSystemConfiguration>,
806    /// <p>The IDs of the elastic network interface from which a specific file system is accessible. The elastic network interface is automatically created in the same VPC that the Amazon FSx file system was created in. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html">Elastic Network Interfaces</a> in the <i>Amazon EC2 User Guide.</i> </p> <p>For an Amazon FSx for Windows File Server file system, you can have one network interface ID. For an Amazon FSx for Lustre file system, you can have more than one.</p>
807    #[serde(rename = "NetworkInterfaceIds")]
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub network_interface_ids: Option<Vec<String>>,
810    /// <p>The AWS account that created the file system. If the file system was created by an AWS Identity and Access Management (IAM) user, the AWS account to which the IAM user belongs is the owner.</p>
811    #[serde(rename = "OwnerId")]
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub owner_id: Option<String>,
814    /// <p>The Amazon Resource Name (ARN) for the file system resource.</p>
815    #[serde(rename = "ResourceARN")]
816    #[serde(skip_serializing_if = "Option::is_none")]
817    pub resource_arn: Option<String>,
818    /// <p>The storage capacity of the file system in gigabytes (GB).</p>
819    #[serde(rename = "StorageCapacity")]
820    #[serde(skip_serializing_if = "Option::is_none")]
821    pub storage_capacity: Option<i64>,
822    /// <p>The storage type of the file system. Valid values are <code>SSD</code> and <code>HDD</code>. If set to <code>SSD</code>, the file system uses solid state drive storage. If set to <code>HDD</code>, the file system uses hard disk drive storage. </p>
823    #[serde(rename = "StorageType")]
824    #[serde(skip_serializing_if = "Option::is_none")]
825    pub storage_type: Option<String>,
826    /// <p>Specifies the IDs of the subnets that the file system is accessible from. For Windows <code>MULTI_AZ_1</code> file system deployment type, there are two subnet IDs, one for the preferred file server and one for the standby file server. The preferred file server subnet identified in the <code>PreferredSubnetID</code> property. All other file systems have only one subnet ID.</p> <p>For Lustre file systems, and Single-AZ Windows file systems, this is the ID of the subnet that contains the endpoint for the file system. For <code>MULTI_AZ_1</code> Windows file systems, the endpoint for the file system is available in the <code>PreferredSubnetID</code>.</p>
827    #[serde(rename = "SubnetIds")]
828    #[serde(skip_serializing_if = "Option::is_none")]
829    pub subnet_ids: Option<Vec<String>>,
830    /// <p>The tags to associate with the file system. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging Your Amazon EC2 Resources</a> in the <i>Amazon EC2 User Guide</i>.</p>
831    #[serde(rename = "Tags")]
832    #[serde(skip_serializing_if = "Option::is_none")]
833    pub tags: Option<Vec<Tag>>,
834    /// <p>The ID of the primary VPC for the file system.</p>
835    #[serde(rename = "VpcId")]
836    #[serde(skip_serializing_if = "Option::is_none")]
837    pub vpc_id: Option<String>,
838    /// <p>The configuration for this Microsoft Windows file system.</p>
839    #[serde(rename = "WindowsConfiguration")]
840    #[serde(skip_serializing_if = "Option::is_none")]
841    pub windows_configuration: Option<WindowsFileSystemConfiguration>,
842}
843
844/// <p>A structure providing details of any failures that occur when creating the file system has failed.</p>
845#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
846#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
847pub struct FileSystemFailureDetails {
848    /// <p>A message describing any failures that occurred during file system creation.</p>
849    #[serde(rename = "Message")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub message: Option<String>,
852}
853
854/// <p>A filter used to restrict the results of describe calls. You can use multiple filters to return results that meet all applied filter requirements.</p>
855#[derive(Clone, Debug, Default, PartialEq, Serialize)]
856#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
857pub struct Filter {
858    /// <p>The name for this filter.</p>
859    #[serde(rename = "Name")]
860    #[serde(skip_serializing_if = "Option::is_none")]
861    pub name: Option<String>,
862    /// <p>The values of the filter. These are all the values for any of the applied filters.</p>
863    #[serde(rename = "Values")]
864    #[serde(skip_serializing_if = "Option::is_none")]
865    pub values: Option<Vec<String>>,
866}
867
868/// <p>The request object for <code>ListTagsForResource</code> operation.</p>
869#[derive(Clone, Debug, Default, PartialEq, Serialize)]
870#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
871pub struct ListTagsForResourceRequest {
872    /// <p>Maximum number of tags to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the <code>MaxResults</code> parameter specified in the request and the service's internal maximum number of items per page.</p>
873    #[serde(rename = "MaxResults")]
874    #[serde(skip_serializing_if = "Option::is_none")]
875    pub max_results: Option<i64>,
876    /// <p>Opaque pagination token returned from a previous <code>ListTagsForResource</code> operation (String). If a token present, the action continues the list from where the returning call left off.</p>
877    #[serde(rename = "NextToken")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub next_token: Option<String>,
880    /// <p>The ARN of the Amazon FSx resource that will have its tags listed.</p>
881    #[serde(rename = "ResourceARN")]
882    pub resource_arn: String,
883}
884
885/// <p>The response object for <code>ListTagsForResource</code> operation.</p>
886#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
887#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
888pub struct ListTagsForResourceResponse {
889    /// <p>This is present if there are more tags than returned in the response (String). You can use the <code>NextToken</code> value in the later request to fetch the tags. </p>
890    #[serde(rename = "NextToken")]
891    #[serde(skip_serializing_if = "Option::is_none")]
892    pub next_token: Option<String>,
893    /// <p>A list of tags on the resource.</p>
894    #[serde(rename = "Tags")]
895    #[serde(skip_serializing_if = "Option::is_none")]
896    pub tags: Option<Vec<Tag>>,
897}
898
899/// <p>The configuration for the Amazon FSx for Lustre file system.</p>
900#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
901#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
902pub struct LustreFileSystemConfiguration {
903    #[serde(rename = "AutomaticBackupRetentionDays")]
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub automatic_backup_retention_days: Option<i64>,
906    /// <p>A boolean flag indicating whether tags on the file system should be copied to backups. If it's set to true, all tags on the file system are copied to all automatic backups and any user-initiated backups where the user doesn't specify any tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from the file system, regardless of this value. (Default = false)</p>
907    #[serde(rename = "CopyTagsToBackups")]
908    #[serde(skip_serializing_if = "Option::is_none")]
909    pub copy_tags_to_backups: Option<bool>,
910    #[serde(rename = "DailyAutomaticBackupStartTime")]
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub daily_automatic_backup_start_time: Option<String>,
913    #[serde(rename = "DataRepositoryConfiguration")]
914    #[serde(skip_serializing_if = "Option::is_none")]
915    pub data_repository_configuration: Option<DataRepositoryConfiguration>,
916    /// <p>The deployment type of the FSX for Lustre file system. <i>Scratch deployment type</i> is designed for temporary storage and shorter-term processing of data.</p> <p> <code>SCRATCH_1</code> and <code>SCRATCH_2</code> deployment types are best suited for when you need temporary storage and shorter-term processing of data. The <code>SCRATCH_2</code> deployment type provides in-transit encryption of data and higher burst throughput capacity than <code>SCRATCH_1</code>.</p> <p>The <code>PERSISTENT_1</code> deployment type is used for longer-term storage and workloads and encryption of data in transit. To learn more about deployment types, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-deployment-types.html"> FSx for Lustre Deployment Options</a>. (Default = <code>SCRATCH_1</code>)</p>
917    #[serde(rename = "DeploymentType")]
918    #[serde(skip_serializing_if = "Option::is_none")]
919    pub deployment_type: Option<String>,
920    /// <p>You use the <code>MountName</code> value when mounting the file system.</p> <p>For the <code>SCRATCH_1</code> deployment type, this value is always "<code>fsx</code>". For <code>SCRATCH_2</code> and <code>PERSISTENT_1</code> deployment types, this value is a string that is unique within an AWS Region. </p>
921    #[serde(rename = "MountName")]
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub mount_name: Option<String>,
924    /// <p> Per unit storage throughput represents the megabytes per second of read or write throughput per 1 tebibyte of storage provisioned. File system throughput capacity is equal to Storage capacity (TiB) * PerUnitStorageThroughput (MB/s/TiB). This option is only valid for <code>PERSISTENT_1</code> deployment types. Valid values are 50, 100, 200. </p>
925    #[serde(rename = "PerUnitStorageThroughput")]
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub per_unit_storage_throughput: Option<i64>,
928    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone. d is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.</p>
929    #[serde(rename = "WeeklyMaintenanceStartTime")]
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub weekly_maintenance_start_time: Option<String>,
932}
933
934/// <p>The configuration of the self-managed Microsoft Active Directory (AD) directory to which the Windows File Server instance is joined.</p>
935#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
936#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
937pub struct SelfManagedActiveDirectoryAttributes {
938    /// <p>A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory.</p>
939    #[serde(rename = "DnsIps")]
940    #[serde(skip_serializing_if = "Option::is_none")]
941    pub dns_ips: Option<Vec<String>>,
942    /// <p>The fully qualified domain name of the self-managed AD directory.</p>
943    #[serde(rename = "DomainName")]
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub domain_name: Option<String>,
946    /// <p>The name of the domain group whose members have administrative privileges for the FSx file system.</p>
947    #[serde(rename = "FileSystemAdministratorsGroup")]
948    #[serde(skip_serializing_if = "Option::is_none")]
949    pub file_system_administrators_group: Option<String>,
950    /// <p>The fully qualified distinguished name of the organizational unit within the self-managed AD directory to which the Windows File Server instance is joined.</p>
951    #[serde(rename = "OrganizationalUnitDistinguishedName")]
952    #[serde(skip_serializing_if = "Option::is_none")]
953    pub organizational_unit_distinguished_name: Option<String>,
954    /// <p>The user name for the service account on your self-managed AD domain that FSx uses to join to your AD domain.</p>
955    #[serde(rename = "UserName")]
956    #[serde(skip_serializing_if = "Option::is_none")]
957    pub user_name: Option<String>,
958}
959
960/// <p>The configuration that Amazon FSx uses to join the Windows File Server instance to your self-managed (including on-premises) Microsoft Active Directory (AD) directory.</p>
961#[derive(Clone, Debug, Default, PartialEq, Serialize)]
962#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
963pub struct SelfManagedActiveDirectoryConfiguration {
964    /// <p><p>A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory. The IP addresses need to be either in the same VPC CIDR range as the one in which your Amazon FSx file system is being created, or in the private IP version 4 (IPv4) address ranges, as specified in <a href="http://www.faqs.org/rfcs/rfc1918.html">RFC 1918</a>:</p> <ul> <li> <p>10.0.0.0 - 10.255.255.255 (10/8 prefix)</p> </li> <li> <p>172.16.0.0 - 172.31.255.255 (172.16/12 prefix)</p> </li> <li> <p>192.168.0.0 - 192.168.255.255 (192.168/16 prefix)</p> </li> </ul></p>
965    #[serde(rename = "DnsIps")]
966    pub dns_ips: Vec<String>,
967    /// <p>The fully qualified domain name of the self-managed AD directory, such as <code>corp.example.com</code>.</p>
968    #[serde(rename = "DomainName")]
969    pub domain_name: String,
970    /// <p>(Optional) The name of the domain group whose members are granted administrative privileges for the file system. Administrative privileges include taking ownership of files and folders, setting audit controls (audit ACLs) on files and folders, and administering the file system remotely by using the FSx Remote PowerShell. The group that you specify must already exist in your domain. If you don't provide one, your AD domain's Domain Admins group is used.</p>
971    #[serde(rename = "FileSystemAdministratorsGroup")]
972    #[serde(skip_serializing_if = "Option::is_none")]
973    pub file_system_administrators_group: Option<String>,
974    /// <p><p>(Optional) The fully qualified distinguished name of the organizational unit within your self-managed AD directory that the Windows File Server instance will join. Amazon FSx only accepts OU as the direct parent of the file system. An example is <code>OU=FSx,DC=yourdomain,DC=corp,DC=com</code>. To learn more, see <a href="https://tools.ietf.org/html/rfc2253">RFC 2253</a>. If none is provided, the FSx file system is created in the default location of your self-managed AD directory. </p> <important> <p>Only Organizational Unit (OU) objects can be the direct parent of the file system that you&#39;re creating.</p> </important></p>
975    #[serde(rename = "OrganizationalUnitDistinguishedName")]
976    #[serde(skip_serializing_if = "Option::is_none")]
977    pub organizational_unit_distinguished_name: Option<String>,
978    /// <p>The password for the service account on your self-managed AD domain that Amazon FSx will use to join to your AD domain.</p>
979    #[serde(rename = "Password")]
980    pub password: String,
981    /// <p>The user name for the service account on your self-managed AD domain that Amazon FSx will use to join to your AD domain. This account must have the permission to join computers to the domain in the organizational unit provided in <code>OrganizationalUnitDistinguishedName</code>, or in the default location of your AD domain.</p>
982    #[serde(rename = "UserName")]
983    pub user_name: String,
984}
985
986/// <p>The configuration that Amazon FSx uses to join the Windows File Server instance to a self-managed Microsoft Active Directory (AD) directory.</p>
987#[derive(Clone, Debug, Default, PartialEq, Serialize)]
988#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
989pub struct SelfManagedActiveDirectoryConfigurationUpdates {
990    /// <p>A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory.</p>
991    #[serde(rename = "DnsIps")]
992    #[serde(skip_serializing_if = "Option::is_none")]
993    pub dns_ips: Option<Vec<String>>,
994    /// <p>The password for the service account on your self-managed AD domain that Amazon FSx will use to join to your AD domain.</p>
995    #[serde(rename = "Password")]
996    #[serde(skip_serializing_if = "Option::is_none")]
997    pub password: Option<String>,
998    /// <p>The user name for the service account on your self-managed AD domain that Amazon FSx will use to join to your AD domain. This account must have the permission to join computers to the domain in the organizational unit provided in <code>OrganizationalUnitDistinguishedName</code>.</p>
999    #[serde(rename = "UserName")]
1000    #[serde(skip_serializing_if = "Option::is_none")]
1001    pub user_name: Option<String>,
1002}
1003
1004/// <p>Specifies a key-value pair for a resource tag.</p>
1005#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1006pub struct Tag {
1007    /// <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys must be unique for the resource to which they are attached.</p>
1008    #[serde(rename = "Key")]
1009    #[serde(skip_serializing_if = "Option::is_none")]
1010    pub key: Option<String>,
1011    /// <p>A value that specifies the <code>TagValue</code>, the value assigned to the corresponding tag key. Tag values can be null and don't have to be unique in a tag set. For example, you can have a key-value pair in a tag set of <code>finances : April</code> and also of <code>payroll : April</code>.</p>
1012    #[serde(rename = "Value")]
1013    #[serde(skip_serializing_if = "Option::is_none")]
1014    pub value: Option<String>,
1015}
1016
1017/// <p>The request object for the <code>TagResource</code> operation.</p>
1018#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1019#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1020pub struct TagResourceRequest {
1021    /// <p>The Amazon Resource Name (ARN) of the Amazon FSx resource that you want to tag.</p>
1022    #[serde(rename = "ResourceARN")]
1023    pub resource_arn: String,
1024    /// <p>A list of tags for the resource. If a tag with a given key already exists, the value is replaced by the one specified in this parameter.</p>
1025    #[serde(rename = "Tags")]
1026    pub tags: Vec<Tag>,
1027}
1028
1029/// <p>The response object for the <code>TagResource</code> operation.</p>
1030#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1031#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1032pub struct TagResourceResponse {}
1033
1034/// <p>The request object for <code>UntagResource</code> action.</p>
1035#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1036#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1037pub struct UntagResourceRequest {
1038    /// <p>The ARN of the Amazon FSx resource to untag.</p>
1039    #[serde(rename = "ResourceARN")]
1040    pub resource_arn: String,
1041    /// <p>A list of keys of tags on the resource to untag. In case the tag key doesn't exist, the call will still succeed to be idempotent.</p>
1042    #[serde(rename = "TagKeys")]
1043    pub tag_keys: Vec<String>,
1044}
1045
1046/// <p>The response object for <code>UntagResource</code> action.</p>
1047#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1048#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1049pub struct UntagResourceResponse {}
1050
1051/// <p>The configuration object for Amazon FSx for Lustre file systems used in the <code>UpdateFileSystem</code> operation.</p>
1052#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1053#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1054pub struct UpdateFileSystemLustreConfiguration {
1055    #[serde(rename = "AutomaticBackupRetentionDays")]
1056    #[serde(skip_serializing_if = "Option::is_none")]
1057    pub automatic_backup_retention_days: Option<i64>,
1058    #[serde(rename = "DailyAutomaticBackupStartTime")]
1059    #[serde(skip_serializing_if = "Option::is_none")]
1060    pub daily_automatic_backup_start_time: Option<String>,
1061    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone. d is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.</p>
1062    #[serde(rename = "WeeklyMaintenanceStartTime")]
1063    #[serde(skip_serializing_if = "Option::is_none")]
1064    pub weekly_maintenance_start_time: Option<String>,
1065}
1066
1067/// <p>The request object for the <code>UpdateFileSystem</code> operation.</p>
1068#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1069#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1070pub struct UpdateFileSystemRequest {
1071    /// <p>A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.</p>
1072    #[serde(rename = "ClientRequestToken")]
1073    #[serde(skip_serializing_if = "Option::is_none")]
1074    pub client_request_token: Option<String>,
1075    /// <p>Identifies the file system that you are updating.</p>
1076    #[serde(rename = "FileSystemId")]
1077    pub file_system_id: String,
1078    #[serde(rename = "LustreConfiguration")]
1079    #[serde(skip_serializing_if = "Option::is_none")]
1080    pub lustre_configuration: Option<UpdateFileSystemLustreConfiguration>,
1081    /// <p>Use this parameter to increase the storage capacity of an Amazon FSx for Windows File Server file system. Specifies the storage capacity target value, GiB, for the file system you're updating. The storage capacity target value must be at least 10 percent (%) greater than the current storage capacity value. In order to increase storage capacity, the file system needs to have at least 16 MB/s of throughput capacity. You cannot make a storage capacity increase request if there is an existing storage capacity increase request in progress. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html">Managing Storage Capacity</a>.</p>
1082    #[serde(rename = "StorageCapacity")]
1083    #[serde(skip_serializing_if = "Option::is_none")]
1084    pub storage_capacity: Option<i64>,
1085    /// <p>The configuration updates for an Amazon FSx for Windows File Server file system.</p>
1086    #[serde(rename = "WindowsConfiguration")]
1087    #[serde(skip_serializing_if = "Option::is_none")]
1088    pub windows_configuration: Option<UpdateFileSystemWindowsConfiguration>,
1089}
1090
1091/// <p>The response object for the <code>UpdateFileSystem</code> operation.</p>
1092#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1093#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1094pub struct UpdateFileSystemResponse {
1095    /// <p>A description of the file system that was updated.</p>
1096    #[serde(rename = "FileSystem")]
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub file_system: Option<FileSystem>,
1099}
1100
1101/// <p>Updates the configuration for an existing Amazon FSx for Windows File Server file system. Amazon FSx only overwrites existing properties with non-null values provided in the request.</p>
1102#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1103#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1104pub struct UpdateFileSystemWindowsConfiguration {
1105    /// <p>The number of days to retain automatic daily backups. Setting this to zero (0) disables automatic daily backups. You can retain automatic daily backups for a maximum of 35 days. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/using-backups.html#automatic-backups">Working with Automatic Daily Backups</a>.</p>
1106    #[serde(rename = "AutomaticBackupRetentionDays")]
1107    #[serde(skip_serializing_if = "Option::is_none")]
1108    pub automatic_backup_retention_days: Option<i64>,
1109    /// <p>The preferred time to start the daily automatic backup, in the UTC time zone, for example, <code>02:00</code> </p>
1110    #[serde(rename = "DailyAutomaticBackupStartTime")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    pub daily_automatic_backup_start_time: Option<String>,
1113    /// <p>The configuration Amazon FSx uses to join the Windows File Server instance to the self-managed Microsoft AD directory. You cannot make a self-managed Microsoft AD update request if there is an existing self-managed Microsoft AD update request in progress.</p>
1114    #[serde(rename = "SelfManagedActiveDirectoryConfiguration")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub self_managed_active_directory_configuration:
1117        Option<SelfManagedActiveDirectoryConfigurationUpdates>,
1118    /// <p>Sets the target value for a file system's throughput capacity, in MB/s, that you are updating the file system to. Valid values are 8, 16, 32, 64, 128, 256, 512, 1024, 2048. You cannot make a throughput capacity update request if there is an existing throughput capacity update request in progress. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-throughput-capacity.html">Managing Throughput Capacity</a>.</p>
1119    #[serde(rename = "ThroughputCapacity")]
1120    #[serde(skip_serializing_if = "Option::is_none")]
1121    pub throughput_capacity: Option<i64>,
1122    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone. Where d is the weekday number, from 1 through 7, with 1 = Monday and 7 = Sunday.</p>
1123    #[serde(rename = "WeeklyMaintenanceStartTime")]
1124    #[serde(skip_serializing_if = "Option::is_none")]
1125    pub weekly_maintenance_start_time: Option<String>,
1126}
1127
1128/// <p>The configuration for this Microsoft Windows file system.</p>
1129#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1130#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1131pub struct WindowsFileSystemConfiguration {
1132    /// <p>The ID for an existing Microsoft Active Directory instance that the file system should join when it's created.</p>
1133    #[serde(rename = "ActiveDirectoryId")]
1134    #[serde(skip_serializing_if = "Option::is_none")]
1135    pub active_directory_id: Option<String>,
1136    /// <p>The number of days to retain automatic backups. Setting this to 0 disables automatic backups. You can retain automatic backups for a maximum of 35 days.</p>
1137    #[serde(rename = "AutomaticBackupRetentionDays")]
1138    #[serde(skip_serializing_if = "Option::is_none")]
1139    pub automatic_backup_retention_days: Option<i64>,
1140    /// <p>A boolean flag indicating whether tags on the file system should be copied to backups. This value defaults to false. If it's set to true, all tags on the file system are copied to all automatic backups and any user-initiated backups where the user doesn't specify any tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from the file system, regardless of this value.</p>
1141    #[serde(rename = "CopyTagsToBackups")]
1142    #[serde(skip_serializing_if = "Option::is_none")]
1143    pub copy_tags_to_backups: Option<bool>,
1144    /// <p>The preferred time to take daily automatic backups, in the UTC time zone.</p>
1145    #[serde(rename = "DailyAutomaticBackupStartTime")]
1146    #[serde(skip_serializing_if = "Option::is_none")]
1147    pub daily_automatic_backup_start_time: Option<String>,
1148    /// <p>Specifies the file system deployment type, valid values are the following:</p> <ul> <li> <p> <code>MULTI_AZ_1</code> - Specifies a high availability file system that is configured for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability, and supports SSD and HDD storage.</p> </li> <li> <p> <code>SINGLE_AZ_1</code> - (Default) Specifies a file system that is configured for single AZ redundancy, only supports SSD storage.</p> </li> <li> <p> <code>SINGLE_AZ_2</code> - Latest generation Single AZ file system. Specifies a file system that is configured for single AZ redundancy and supports SSD and HDD storage.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html">Single-AZ and Multi-AZ File Systems</a>.</p>
1149    #[serde(rename = "DeploymentType")]
1150    #[serde(skip_serializing_if = "Option::is_none")]
1151    pub deployment_type: Option<String>,
1152    /// <p>The list of maintenance operations in progress for this file system.</p>
1153    #[serde(rename = "MaintenanceOperationsInProgress")]
1154    #[serde(skip_serializing_if = "Option::is_none")]
1155    pub maintenance_operations_in_progress: Option<Vec<String>>,
1156    /// <p>For <code>MULTI_AZ_1</code> deployment types, the IP address of the primary, or preferred, file server.</p> <p>Use this IP address when mounting the file system on Linux SMB clients or Windows SMB clients that are not joined to a Microsoft Active Directory. Applicable for all Windows file system deployment types. This IP address is temporarily unavailable when the file system is undergoing maintenance. For Linux and Windows SMB clients that are joined to an Active Directory, use the file system's DNSName instead. For more information on mapping and mounting file shares, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html">Accessing File Shares</a>.</p>
1157    #[serde(rename = "PreferredFileServerIp")]
1158    #[serde(skip_serializing_if = "Option::is_none")]
1159    pub preferred_file_server_ip: Option<String>,
1160    /// <p>For <code>MULTI_AZ_1</code> deployment types, it specifies the ID of the subnet where the preferred file server is located. Must be one of the two subnet IDs specified in <code>SubnetIds</code> property. Amazon FSx serves traffic from this subnet except in the event of a failover to the secondary file server.</p> <p>For <code>SINGLE_AZ_1</code> and <code>SINGLE_AZ_2</code> deployment types, this value is the same as that for <code>SubnetIDs</code>. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html#single-multi-az-resources">Availability and Durability: Single-AZ and Multi-AZ File Systems</a> </p>
1161    #[serde(rename = "PreferredSubnetId")]
1162    #[serde(skip_serializing_if = "Option::is_none")]
1163    pub preferred_subnet_id: Option<String>,
1164    /// <p>For <code>MULTI_AZ_1</code> deployment types, use this endpoint when performing administrative tasks on the file system using Amazon FSx Remote PowerShell.</p> <p>For <code>SINGLE_AZ_1</code> and <code>SINGLE_AZ_2</code> deployment types, this is the DNS name of the file system.</p> <p>This endpoint is temporarily unavailable when the file system is undergoing maintenance.</p>
1165    #[serde(rename = "RemoteAdministrationEndpoint")]
1166    #[serde(skip_serializing_if = "Option::is_none")]
1167    pub remote_administration_endpoint: Option<String>,
1168    #[serde(rename = "SelfManagedActiveDirectoryConfiguration")]
1169    #[serde(skip_serializing_if = "Option::is_none")]
1170    pub self_managed_active_directory_configuration: Option<SelfManagedActiveDirectoryAttributes>,
1171    /// <p>The throughput of an Amazon FSx file system, measured in megabytes per second.</p>
1172    #[serde(rename = "ThroughputCapacity")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub throughput_capacity: Option<i64>,
1175    /// <p>The preferred start time to perform weekly maintenance, formatted d:HH:MM in the UTC time zone. d is the weekday number, from 1 through 7, beginning with Monday and ending with Sunday.</p>
1176    #[serde(rename = "WeeklyMaintenanceStartTime")]
1177    #[serde(skip_serializing_if = "Option::is_none")]
1178    pub weekly_maintenance_start_time: Option<String>,
1179}
1180
1181/// Errors returned by CancelDataRepositoryTask
1182#[derive(Debug, PartialEq)]
1183pub enum CancelDataRepositoryTaskError {
1184    /// <p>A generic error indicating a failure with a client request.</p>
1185    BadRequest(String),
1186    /// <p>The data repository task could not be canceled because the task has already ended.</p>
1187    DataRepositoryTaskEnded(String),
1188    /// <p>The data repository task or tasks you specified could not be found.</p>
1189    DataRepositoryTaskNotFound(String),
1190    /// <p>A generic error indicating a server-side failure.</p>
1191    InternalServerError(String),
1192    /// <p>The requested operation is not supported for this resource or API.</p>
1193    UnsupportedOperation(String),
1194}
1195
1196impl CancelDataRepositoryTaskError {
1197    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelDataRepositoryTaskError> {
1198        if let Some(err) = proto::json::Error::parse(&res) {
1199            match err.typ.as_str() {
1200                "BadRequest" => {
1201                    return RusotoError::Service(CancelDataRepositoryTaskError::BadRequest(err.msg))
1202                }
1203                "DataRepositoryTaskEnded" => {
1204                    return RusotoError::Service(
1205                        CancelDataRepositoryTaskError::DataRepositoryTaskEnded(err.msg),
1206                    )
1207                }
1208                "DataRepositoryTaskNotFound" => {
1209                    return RusotoError::Service(
1210                        CancelDataRepositoryTaskError::DataRepositoryTaskNotFound(err.msg),
1211                    )
1212                }
1213                "InternalServerError" => {
1214                    return RusotoError::Service(
1215                        CancelDataRepositoryTaskError::InternalServerError(err.msg),
1216                    )
1217                }
1218                "UnsupportedOperation" => {
1219                    return RusotoError::Service(
1220                        CancelDataRepositoryTaskError::UnsupportedOperation(err.msg),
1221                    )
1222                }
1223                "ValidationException" => return RusotoError::Validation(err.msg),
1224                _ => {}
1225            }
1226        }
1227        RusotoError::Unknown(res)
1228    }
1229}
1230impl fmt::Display for CancelDataRepositoryTaskError {
1231    #[allow(unused_variables)]
1232    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1233        match *self {
1234            CancelDataRepositoryTaskError::BadRequest(ref cause) => write!(f, "{}", cause),
1235            CancelDataRepositoryTaskError::DataRepositoryTaskEnded(ref cause) => {
1236                write!(f, "{}", cause)
1237            }
1238            CancelDataRepositoryTaskError::DataRepositoryTaskNotFound(ref cause) => {
1239                write!(f, "{}", cause)
1240            }
1241            CancelDataRepositoryTaskError::InternalServerError(ref cause) => write!(f, "{}", cause),
1242            CancelDataRepositoryTaskError::UnsupportedOperation(ref cause) => {
1243                write!(f, "{}", cause)
1244            }
1245        }
1246    }
1247}
1248impl Error for CancelDataRepositoryTaskError {}
1249/// Errors returned by CreateBackup
1250#[derive(Debug, PartialEq)]
1251pub enum CreateBackupError {
1252    /// <p>Another backup is already under way. Wait for completion before initiating additional backups of this file system.</p>
1253    BackupInProgress(String),
1254    /// <p>A generic error indicating a failure with a client request.</p>
1255    BadRequest(String),
1256    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1257    FileSystemNotFound(String),
1258    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1259    IncompatibleParameterError(String),
1260    /// <p>A generic error indicating a server-side failure.</p>
1261    InternalServerError(String),
1262    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
1263    ServiceLimitExceeded(String),
1264    /// <p>The requested operation is not supported for this resource or API.</p>
1265    UnsupportedOperation(String),
1266}
1267
1268impl CreateBackupError {
1269    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupError> {
1270        if let Some(err) = proto::json::Error::parse(&res) {
1271            match err.typ.as_str() {
1272                "BackupInProgress" => {
1273                    return RusotoError::Service(CreateBackupError::BackupInProgress(err.msg))
1274                }
1275                "BadRequest" => {
1276                    return RusotoError::Service(CreateBackupError::BadRequest(err.msg))
1277                }
1278                "FileSystemNotFound" => {
1279                    return RusotoError::Service(CreateBackupError::FileSystemNotFound(err.msg))
1280                }
1281                "IncompatibleParameterError" => {
1282                    return RusotoError::Service(CreateBackupError::IncompatibleParameterError(
1283                        err.msg,
1284                    ))
1285                }
1286                "InternalServerError" => {
1287                    return RusotoError::Service(CreateBackupError::InternalServerError(err.msg))
1288                }
1289                "ServiceLimitExceeded" => {
1290                    return RusotoError::Service(CreateBackupError::ServiceLimitExceeded(err.msg))
1291                }
1292                "UnsupportedOperation" => {
1293                    return RusotoError::Service(CreateBackupError::UnsupportedOperation(err.msg))
1294                }
1295                "ValidationException" => return RusotoError::Validation(err.msg),
1296                _ => {}
1297            }
1298        }
1299        RusotoError::Unknown(res)
1300    }
1301}
1302impl fmt::Display for CreateBackupError {
1303    #[allow(unused_variables)]
1304    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1305        match *self {
1306            CreateBackupError::BackupInProgress(ref cause) => write!(f, "{}", cause),
1307            CreateBackupError::BadRequest(ref cause) => write!(f, "{}", cause),
1308            CreateBackupError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
1309            CreateBackupError::IncompatibleParameterError(ref cause) => write!(f, "{}", cause),
1310            CreateBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
1311            CreateBackupError::ServiceLimitExceeded(ref cause) => write!(f, "{}", cause),
1312            CreateBackupError::UnsupportedOperation(ref cause) => write!(f, "{}", cause),
1313        }
1314    }
1315}
1316impl Error for CreateBackupError {}
1317/// Errors returned by CreateDataRepositoryTask
1318#[derive(Debug, PartialEq)]
1319pub enum CreateDataRepositoryTaskError {
1320    /// <p>A generic error indicating a failure with a client request.</p>
1321    BadRequest(String),
1322    /// <p>An existing data repository task is currently executing on the file system. Wait until the existing task has completed, then create the new task.</p>
1323    DataRepositoryTaskExecuting(String),
1324    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1325    FileSystemNotFound(String),
1326    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1327    IncompatibleParameterError(String),
1328    /// <p>A generic error indicating a server-side failure.</p>
1329    InternalServerError(String),
1330    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
1331    ServiceLimitExceeded(String),
1332    /// <p>The requested operation is not supported for this resource or API.</p>
1333    UnsupportedOperation(String),
1334}
1335
1336impl CreateDataRepositoryTaskError {
1337    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDataRepositoryTaskError> {
1338        if let Some(err) = proto::json::Error::parse(&res) {
1339            match err.typ.as_str() {
1340                "BadRequest" => {
1341                    return RusotoError::Service(CreateDataRepositoryTaskError::BadRequest(err.msg))
1342                }
1343                "DataRepositoryTaskExecuting" => {
1344                    return RusotoError::Service(
1345                        CreateDataRepositoryTaskError::DataRepositoryTaskExecuting(err.msg),
1346                    )
1347                }
1348                "FileSystemNotFound" => {
1349                    return RusotoError::Service(CreateDataRepositoryTaskError::FileSystemNotFound(
1350                        err.msg,
1351                    ))
1352                }
1353                "IncompatibleParameterError" => {
1354                    return RusotoError::Service(
1355                        CreateDataRepositoryTaskError::IncompatibleParameterError(err.msg),
1356                    )
1357                }
1358                "InternalServerError" => {
1359                    return RusotoError::Service(
1360                        CreateDataRepositoryTaskError::InternalServerError(err.msg),
1361                    )
1362                }
1363                "ServiceLimitExceeded" => {
1364                    return RusotoError::Service(
1365                        CreateDataRepositoryTaskError::ServiceLimitExceeded(err.msg),
1366                    )
1367                }
1368                "UnsupportedOperation" => {
1369                    return RusotoError::Service(
1370                        CreateDataRepositoryTaskError::UnsupportedOperation(err.msg),
1371                    )
1372                }
1373                "ValidationException" => return RusotoError::Validation(err.msg),
1374                _ => {}
1375            }
1376        }
1377        RusotoError::Unknown(res)
1378    }
1379}
1380impl fmt::Display for CreateDataRepositoryTaskError {
1381    #[allow(unused_variables)]
1382    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1383        match *self {
1384            CreateDataRepositoryTaskError::BadRequest(ref cause) => write!(f, "{}", cause),
1385            CreateDataRepositoryTaskError::DataRepositoryTaskExecuting(ref cause) => {
1386                write!(f, "{}", cause)
1387            }
1388            CreateDataRepositoryTaskError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
1389            CreateDataRepositoryTaskError::IncompatibleParameterError(ref cause) => {
1390                write!(f, "{}", cause)
1391            }
1392            CreateDataRepositoryTaskError::InternalServerError(ref cause) => write!(f, "{}", cause),
1393            CreateDataRepositoryTaskError::ServiceLimitExceeded(ref cause) => {
1394                write!(f, "{}", cause)
1395            }
1396            CreateDataRepositoryTaskError::UnsupportedOperation(ref cause) => {
1397                write!(f, "{}", cause)
1398            }
1399        }
1400    }
1401}
1402impl Error for CreateDataRepositoryTaskError {}
1403/// Errors returned by CreateFileSystem
1404#[derive(Debug, PartialEq)]
1405pub enum CreateFileSystemError {
1406    /// <p>An Active Directory error.</p>
1407    ActiveDirectoryError(String),
1408    /// <p>A generic error indicating a failure with a client request.</p>
1409    BadRequest(String),
1410    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1411    IncompatibleParameterError(String),
1412    /// <p>A generic error indicating a server-side failure.</p>
1413    InternalServerError(String),
1414    /// <p>The path provided for data repository export isn't valid.</p>
1415    InvalidExportPath(String),
1416    /// <p>The path provided for data repository import isn't valid.</p>
1417    InvalidImportPath(String),
1418    /// <p>One or more network settings specified in the request are invalid. <code>InvalidVpcId</code> means that the ID passed for the virtual private cloud (VPC) is invalid. <code>InvalidSubnetIds</code> returns the list of IDs for subnets that are either invalid or not part of the VPC specified. <code>InvalidSecurityGroupIds</code> returns the list of IDs for security groups that are either invalid or not part of the VPC specified.</p>
1419    InvalidNetworkSettings(String),
1420    /// <p>An invalid value for <code>PerUnitStorageThroughput</code> was provided. Please create your file system again, using a valid value.</p>
1421    InvalidPerUnitStorageThroughput(String),
1422    /// <p>A file system configuration is required for this operation.</p>
1423    MissingFileSystemConfiguration(String),
1424    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
1425    ServiceLimitExceeded(String),
1426}
1427
1428impl CreateFileSystemError {
1429    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFileSystemError> {
1430        if let Some(err) = proto::json::Error::parse(&res) {
1431            match err.typ.as_str() {
1432                "ActiveDirectoryError" => {
1433                    return RusotoError::Service(CreateFileSystemError::ActiveDirectoryError(
1434                        err.msg,
1435                    ))
1436                }
1437                "BadRequest" => {
1438                    return RusotoError::Service(CreateFileSystemError::BadRequest(err.msg))
1439                }
1440                "IncompatibleParameterError" => {
1441                    return RusotoError::Service(CreateFileSystemError::IncompatibleParameterError(
1442                        err.msg,
1443                    ))
1444                }
1445                "InternalServerError" => {
1446                    return RusotoError::Service(CreateFileSystemError::InternalServerError(
1447                        err.msg,
1448                    ))
1449                }
1450                "InvalidExportPath" => {
1451                    return RusotoError::Service(CreateFileSystemError::InvalidExportPath(err.msg))
1452                }
1453                "InvalidImportPath" => {
1454                    return RusotoError::Service(CreateFileSystemError::InvalidImportPath(err.msg))
1455                }
1456                "InvalidNetworkSettings" => {
1457                    return RusotoError::Service(CreateFileSystemError::InvalidNetworkSettings(
1458                        err.msg,
1459                    ))
1460                }
1461                "InvalidPerUnitStorageThroughput" => {
1462                    return RusotoError::Service(
1463                        CreateFileSystemError::InvalidPerUnitStorageThroughput(err.msg),
1464                    )
1465                }
1466                "MissingFileSystemConfiguration" => {
1467                    return RusotoError::Service(
1468                        CreateFileSystemError::MissingFileSystemConfiguration(err.msg),
1469                    )
1470                }
1471                "ServiceLimitExceeded" => {
1472                    return RusotoError::Service(CreateFileSystemError::ServiceLimitExceeded(
1473                        err.msg,
1474                    ))
1475                }
1476                "ValidationException" => return RusotoError::Validation(err.msg),
1477                _ => {}
1478            }
1479        }
1480        RusotoError::Unknown(res)
1481    }
1482}
1483impl fmt::Display for CreateFileSystemError {
1484    #[allow(unused_variables)]
1485    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1486        match *self {
1487            CreateFileSystemError::ActiveDirectoryError(ref cause) => write!(f, "{}", cause),
1488            CreateFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
1489            CreateFileSystemError::IncompatibleParameterError(ref cause) => write!(f, "{}", cause),
1490            CreateFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
1491            CreateFileSystemError::InvalidExportPath(ref cause) => write!(f, "{}", cause),
1492            CreateFileSystemError::InvalidImportPath(ref cause) => write!(f, "{}", cause),
1493            CreateFileSystemError::InvalidNetworkSettings(ref cause) => write!(f, "{}", cause),
1494            CreateFileSystemError::InvalidPerUnitStorageThroughput(ref cause) => {
1495                write!(f, "{}", cause)
1496            }
1497            CreateFileSystemError::MissingFileSystemConfiguration(ref cause) => {
1498                write!(f, "{}", cause)
1499            }
1500            CreateFileSystemError::ServiceLimitExceeded(ref cause) => write!(f, "{}", cause),
1501        }
1502    }
1503}
1504impl Error for CreateFileSystemError {}
1505/// Errors returned by CreateFileSystemFromBackup
1506#[derive(Debug, PartialEq)]
1507pub enum CreateFileSystemFromBackupError {
1508    /// <p>An Active Directory error.</p>
1509    ActiveDirectoryError(String),
1510    /// <p>No Amazon FSx backups were found based upon the supplied parameters.</p>
1511    BackupNotFound(String),
1512    /// <p>A generic error indicating a failure with a client request.</p>
1513    BadRequest(String),
1514    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1515    IncompatibleParameterError(String),
1516    /// <p>A generic error indicating a server-side failure.</p>
1517    InternalServerError(String),
1518    /// <p>One or more network settings specified in the request are invalid. <code>InvalidVpcId</code> means that the ID passed for the virtual private cloud (VPC) is invalid. <code>InvalidSubnetIds</code> returns the list of IDs for subnets that are either invalid or not part of the VPC specified. <code>InvalidSecurityGroupIds</code> returns the list of IDs for security groups that are either invalid or not part of the VPC specified.</p>
1519    InvalidNetworkSettings(String),
1520    /// <p>An invalid value for <code>PerUnitStorageThroughput</code> was provided. Please create your file system again, using a valid value.</p>
1521    InvalidPerUnitStorageThroughput(String),
1522    /// <p>A file system configuration is required for this operation.</p>
1523    MissingFileSystemConfiguration(String),
1524    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
1525    ServiceLimitExceeded(String),
1526}
1527
1528impl CreateFileSystemFromBackupError {
1529    pub fn from_response(
1530        res: BufferedHttpResponse,
1531    ) -> RusotoError<CreateFileSystemFromBackupError> {
1532        if let Some(err) = proto::json::Error::parse(&res) {
1533            match err.typ.as_str() {
1534                "ActiveDirectoryError" => {
1535                    return RusotoError::Service(
1536                        CreateFileSystemFromBackupError::ActiveDirectoryError(err.msg),
1537                    )
1538                }
1539                "BackupNotFound" => {
1540                    return RusotoError::Service(CreateFileSystemFromBackupError::BackupNotFound(
1541                        err.msg,
1542                    ))
1543                }
1544                "BadRequest" => {
1545                    return RusotoError::Service(CreateFileSystemFromBackupError::BadRequest(
1546                        err.msg,
1547                    ))
1548                }
1549                "IncompatibleParameterError" => {
1550                    return RusotoError::Service(
1551                        CreateFileSystemFromBackupError::IncompatibleParameterError(err.msg),
1552                    )
1553                }
1554                "InternalServerError" => {
1555                    return RusotoError::Service(
1556                        CreateFileSystemFromBackupError::InternalServerError(err.msg),
1557                    )
1558                }
1559                "InvalidNetworkSettings" => {
1560                    return RusotoError::Service(
1561                        CreateFileSystemFromBackupError::InvalidNetworkSettings(err.msg),
1562                    )
1563                }
1564                "InvalidPerUnitStorageThroughput" => {
1565                    return RusotoError::Service(
1566                        CreateFileSystemFromBackupError::InvalidPerUnitStorageThroughput(err.msg),
1567                    )
1568                }
1569                "MissingFileSystemConfiguration" => {
1570                    return RusotoError::Service(
1571                        CreateFileSystemFromBackupError::MissingFileSystemConfiguration(err.msg),
1572                    )
1573                }
1574                "ServiceLimitExceeded" => {
1575                    return RusotoError::Service(
1576                        CreateFileSystemFromBackupError::ServiceLimitExceeded(err.msg),
1577                    )
1578                }
1579                "ValidationException" => return RusotoError::Validation(err.msg),
1580                _ => {}
1581            }
1582        }
1583        RusotoError::Unknown(res)
1584    }
1585}
1586impl fmt::Display for CreateFileSystemFromBackupError {
1587    #[allow(unused_variables)]
1588    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1589        match *self {
1590            CreateFileSystemFromBackupError::ActiveDirectoryError(ref cause) => {
1591                write!(f, "{}", cause)
1592            }
1593            CreateFileSystemFromBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
1594            CreateFileSystemFromBackupError::BadRequest(ref cause) => write!(f, "{}", cause),
1595            CreateFileSystemFromBackupError::IncompatibleParameterError(ref cause) => {
1596                write!(f, "{}", cause)
1597            }
1598            CreateFileSystemFromBackupError::InternalServerError(ref cause) => {
1599                write!(f, "{}", cause)
1600            }
1601            CreateFileSystemFromBackupError::InvalidNetworkSettings(ref cause) => {
1602                write!(f, "{}", cause)
1603            }
1604            CreateFileSystemFromBackupError::InvalidPerUnitStorageThroughput(ref cause) => {
1605                write!(f, "{}", cause)
1606            }
1607            CreateFileSystemFromBackupError::MissingFileSystemConfiguration(ref cause) => {
1608                write!(f, "{}", cause)
1609            }
1610            CreateFileSystemFromBackupError::ServiceLimitExceeded(ref cause) => {
1611                write!(f, "{}", cause)
1612            }
1613        }
1614    }
1615}
1616impl Error for CreateFileSystemFromBackupError {}
1617/// Errors returned by DeleteBackup
1618#[derive(Debug, PartialEq)]
1619pub enum DeleteBackupError {
1620    /// <p>Another backup is already under way. Wait for completion before initiating additional backups of this file system.</p>
1621    BackupInProgress(String),
1622    /// <p>No Amazon FSx backups were found based upon the supplied parameters.</p>
1623    BackupNotFound(String),
1624    /// <p>You can't delete a backup while it's being used to restore a file system.</p>
1625    BackupRestoring(String),
1626    /// <p>A generic error indicating a failure with a client request.</p>
1627    BadRequest(String),
1628    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1629    IncompatibleParameterError(String),
1630    /// <p>A generic error indicating a server-side failure.</p>
1631    InternalServerError(String),
1632}
1633
1634impl DeleteBackupError {
1635    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupError> {
1636        if let Some(err) = proto::json::Error::parse(&res) {
1637            match err.typ.as_str() {
1638                "BackupInProgress" => {
1639                    return RusotoError::Service(DeleteBackupError::BackupInProgress(err.msg))
1640                }
1641                "BackupNotFound" => {
1642                    return RusotoError::Service(DeleteBackupError::BackupNotFound(err.msg))
1643                }
1644                "BackupRestoring" => {
1645                    return RusotoError::Service(DeleteBackupError::BackupRestoring(err.msg))
1646                }
1647                "BadRequest" => {
1648                    return RusotoError::Service(DeleteBackupError::BadRequest(err.msg))
1649                }
1650                "IncompatibleParameterError" => {
1651                    return RusotoError::Service(DeleteBackupError::IncompatibleParameterError(
1652                        err.msg,
1653                    ))
1654                }
1655                "InternalServerError" => {
1656                    return RusotoError::Service(DeleteBackupError::InternalServerError(err.msg))
1657                }
1658                "ValidationException" => return RusotoError::Validation(err.msg),
1659                _ => {}
1660            }
1661        }
1662        RusotoError::Unknown(res)
1663    }
1664}
1665impl fmt::Display for DeleteBackupError {
1666    #[allow(unused_variables)]
1667    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1668        match *self {
1669            DeleteBackupError::BackupInProgress(ref cause) => write!(f, "{}", cause),
1670            DeleteBackupError::BackupNotFound(ref cause) => write!(f, "{}", cause),
1671            DeleteBackupError::BackupRestoring(ref cause) => write!(f, "{}", cause),
1672            DeleteBackupError::BadRequest(ref cause) => write!(f, "{}", cause),
1673            DeleteBackupError::IncompatibleParameterError(ref cause) => write!(f, "{}", cause),
1674            DeleteBackupError::InternalServerError(ref cause) => write!(f, "{}", cause),
1675        }
1676    }
1677}
1678impl Error for DeleteBackupError {}
1679/// Errors returned by DeleteFileSystem
1680#[derive(Debug, PartialEq)]
1681pub enum DeleteFileSystemError {
1682    /// <p>A generic error indicating a failure with a client request.</p>
1683    BadRequest(String),
1684    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1685    FileSystemNotFound(String),
1686    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
1687    IncompatibleParameterError(String),
1688    /// <p>A generic error indicating a server-side failure.</p>
1689    InternalServerError(String),
1690    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
1691    ServiceLimitExceeded(String),
1692}
1693
1694impl DeleteFileSystemError {
1695    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFileSystemError> {
1696        if let Some(err) = proto::json::Error::parse(&res) {
1697            match err.typ.as_str() {
1698                "BadRequest" => {
1699                    return RusotoError::Service(DeleteFileSystemError::BadRequest(err.msg))
1700                }
1701                "FileSystemNotFound" => {
1702                    return RusotoError::Service(DeleteFileSystemError::FileSystemNotFound(err.msg))
1703                }
1704                "IncompatibleParameterError" => {
1705                    return RusotoError::Service(DeleteFileSystemError::IncompatibleParameterError(
1706                        err.msg,
1707                    ))
1708                }
1709                "InternalServerError" => {
1710                    return RusotoError::Service(DeleteFileSystemError::InternalServerError(
1711                        err.msg,
1712                    ))
1713                }
1714                "ServiceLimitExceeded" => {
1715                    return RusotoError::Service(DeleteFileSystemError::ServiceLimitExceeded(
1716                        err.msg,
1717                    ))
1718                }
1719                "ValidationException" => return RusotoError::Validation(err.msg),
1720                _ => {}
1721            }
1722        }
1723        RusotoError::Unknown(res)
1724    }
1725}
1726impl fmt::Display for DeleteFileSystemError {
1727    #[allow(unused_variables)]
1728    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1729        match *self {
1730            DeleteFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
1731            DeleteFileSystemError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
1732            DeleteFileSystemError::IncompatibleParameterError(ref cause) => write!(f, "{}", cause),
1733            DeleteFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
1734            DeleteFileSystemError::ServiceLimitExceeded(ref cause) => write!(f, "{}", cause),
1735        }
1736    }
1737}
1738impl Error for DeleteFileSystemError {}
1739/// Errors returned by DescribeBackups
1740#[derive(Debug, PartialEq)]
1741pub enum DescribeBackupsError {
1742    /// <p>No Amazon FSx backups were found based upon the supplied parameters.</p>
1743    BackupNotFound(String),
1744    /// <p>A generic error indicating a failure with a client request.</p>
1745    BadRequest(String),
1746    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1747    FileSystemNotFound(String),
1748    /// <p>A generic error indicating a server-side failure.</p>
1749    InternalServerError(String),
1750}
1751
1752impl DescribeBackupsError {
1753    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupsError> {
1754        if let Some(err) = proto::json::Error::parse(&res) {
1755            match err.typ.as_str() {
1756                "BackupNotFound" => {
1757                    return RusotoError::Service(DescribeBackupsError::BackupNotFound(err.msg))
1758                }
1759                "BadRequest" => {
1760                    return RusotoError::Service(DescribeBackupsError::BadRequest(err.msg))
1761                }
1762                "FileSystemNotFound" => {
1763                    return RusotoError::Service(DescribeBackupsError::FileSystemNotFound(err.msg))
1764                }
1765                "InternalServerError" => {
1766                    return RusotoError::Service(DescribeBackupsError::InternalServerError(err.msg))
1767                }
1768                "ValidationException" => return RusotoError::Validation(err.msg),
1769                _ => {}
1770            }
1771        }
1772        RusotoError::Unknown(res)
1773    }
1774}
1775impl fmt::Display for DescribeBackupsError {
1776    #[allow(unused_variables)]
1777    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1778        match *self {
1779            DescribeBackupsError::BackupNotFound(ref cause) => write!(f, "{}", cause),
1780            DescribeBackupsError::BadRequest(ref cause) => write!(f, "{}", cause),
1781            DescribeBackupsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
1782            DescribeBackupsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1783        }
1784    }
1785}
1786impl Error for DescribeBackupsError {}
1787/// Errors returned by DescribeDataRepositoryTasks
1788#[derive(Debug, PartialEq)]
1789pub enum DescribeDataRepositoryTasksError {
1790    /// <p>A generic error indicating a failure with a client request.</p>
1791    BadRequest(String),
1792    /// <p>The data repository task or tasks you specified could not be found.</p>
1793    DataRepositoryTaskNotFound(String),
1794    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1795    FileSystemNotFound(String),
1796    /// <p>A generic error indicating a server-side failure.</p>
1797    InternalServerError(String),
1798}
1799
1800impl DescribeDataRepositoryTasksError {
1801    pub fn from_response(
1802        res: BufferedHttpResponse,
1803    ) -> RusotoError<DescribeDataRepositoryTasksError> {
1804        if let Some(err) = proto::json::Error::parse(&res) {
1805            match err.typ.as_str() {
1806                "BadRequest" => {
1807                    return RusotoError::Service(DescribeDataRepositoryTasksError::BadRequest(
1808                        err.msg,
1809                    ))
1810                }
1811                "DataRepositoryTaskNotFound" => {
1812                    return RusotoError::Service(
1813                        DescribeDataRepositoryTasksError::DataRepositoryTaskNotFound(err.msg),
1814                    )
1815                }
1816                "FileSystemNotFound" => {
1817                    return RusotoError::Service(
1818                        DescribeDataRepositoryTasksError::FileSystemNotFound(err.msg),
1819                    )
1820                }
1821                "InternalServerError" => {
1822                    return RusotoError::Service(
1823                        DescribeDataRepositoryTasksError::InternalServerError(err.msg),
1824                    )
1825                }
1826                "ValidationException" => return RusotoError::Validation(err.msg),
1827                _ => {}
1828            }
1829        }
1830        RusotoError::Unknown(res)
1831    }
1832}
1833impl fmt::Display for DescribeDataRepositoryTasksError {
1834    #[allow(unused_variables)]
1835    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1836        match *self {
1837            DescribeDataRepositoryTasksError::BadRequest(ref cause) => write!(f, "{}", cause),
1838            DescribeDataRepositoryTasksError::DataRepositoryTaskNotFound(ref cause) => {
1839                write!(f, "{}", cause)
1840            }
1841            DescribeDataRepositoryTasksError::FileSystemNotFound(ref cause) => {
1842                write!(f, "{}", cause)
1843            }
1844            DescribeDataRepositoryTasksError::InternalServerError(ref cause) => {
1845                write!(f, "{}", cause)
1846            }
1847        }
1848    }
1849}
1850impl Error for DescribeDataRepositoryTasksError {}
1851/// Errors returned by DescribeFileSystems
1852#[derive(Debug, PartialEq)]
1853pub enum DescribeFileSystemsError {
1854    /// <p>A generic error indicating a failure with a client request.</p>
1855    BadRequest(String),
1856    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
1857    FileSystemNotFound(String),
1858    /// <p>A generic error indicating a server-side failure.</p>
1859    InternalServerError(String),
1860}
1861
1862impl DescribeFileSystemsError {
1863    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFileSystemsError> {
1864        if let Some(err) = proto::json::Error::parse(&res) {
1865            match err.typ.as_str() {
1866                "BadRequest" => {
1867                    return RusotoError::Service(DescribeFileSystemsError::BadRequest(err.msg))
1868                }
1869                "FileSystemNotFound" => {
1870                    return RusotoError::Service(DescribeFileSystemsError::FileSystemNotFound(
1871                        err.msg,
1872                    ))
1873                }
1874                "InternalServerError" => {
1875                    return RusotoError::Service(DescribeFileSystemsError::InternalServerError(
1876                        err.msg,
1877                    ))
1878                }
1879                "ValidationException" => return RusotoError::Validation(err.msg),
1880                _ => {}
1881            }
1882        }
1883        RusotoError::Unknown(res)
1884    }
1885}
1886impl fmt::Display for DescribeFileSystemsError {
1887    #[allow(unused_variables)]
1888    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1889        match *self {
1890            DescribeFileSystemsError::BadRequest(ref cause) => write!(f, "{}", cause),
1891            DescribeFileSystemsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
1892            DescribeFileSystemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1893        }
1894    }
1895}
1896impl Error for DescribeFileSystemsError {}
1897/// Errors returned by ListTagsForResource
1898#[derive(Debug, PartialEq)]
1899pub enum ListTagsForResourceError {
1900    /// <p>A generic error indicating a failure with a client request.</p>
1901    BadRequest(String),
1902    /// <p>A generic error indicating a server-side failure.</p>
1903    InternalServerError(String),
1904    /// <p>The resource specified for the tagging operation is not a resource type owned by Amazon FSx. Use the API of the relevant service to perform the operation. </p>
1905    NotServiceResourceError(String),
1906    /// <p>The resource specified does not support tagging. </p>
1907    ResourceDoesNotSupportTagging(String),
1908    /// <p>The resource specified by the Amazon Resource Name (ARN) can't be found.</p>
1909    ResourceNotFound(String),
1910}
1911
1912impl ListTagsForResourceError {
1913    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1914        if let Some(err) = proto::json::Error::parse(&res) {
1915            match err.typ.as_str() {
1916                "BadRequest" => {
1917                    return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
1918                }
1919                "InternalServerError" => {
1920                    return RusotoError::Service(ListTagsForResourceError::InternalServerError(
1921                        err.msg,
1922                    ))
1923                }
1924                "NotServiceResourceError" => {
1925                    return RusotoError::Service(ListTagsForResourceError::NotServiceResourceError(
1926                        err.msg,
1927                    ))
1928                }
1929                "ResourceDoesNotSupportTagging" => {
1930                    return RusotoError::Service(
1931                        ListTagsForResourceError::ResourceDoesNotSupportTagging(err.msg),
1932                    )
1933                }
1934                "ResourceNotFound" => {
1935                    return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
1936                        err.msg,
1937                    ))
1938                }
1939                "ValidationException" => return RusotoError::Validation(err.msg),
1940                _ => {}
1941            }
1942        }
1943        RusotoError::Unknown(res)
1944    }
1945}
1946impl fmt::Display for ListTagsForResourceError {
1947    #[allow(unused_variables)]
1948    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1949        match *self {
1950            ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1951            ListTagsForResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
1952            ListTagsForResourceError::NotServiceResourceError(ref cause) => write!(f, "{}", cause),
1953            ListTagsForResourceError::ResourceDoesNotSupportTagging(ref cause) => {
1954                write!(f, "{}", cause)
1955            }
1956            ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1957        }
1958    }
1959}
1960impl Error for ListTagsForResourceError {}
1961/// Errors returned by TagResource
1962#[derive(Debug, PartialEq)]
1963pub enum TagResourceError {
1964    /// <p>A generic error indicating a failure with a client request.</p>
1965    BadRequest(String),
1966    /// <p>A generic error indicating a server-side failure.</p>
1967    InternalServerError(String),
1968    /// <p>The resource specified for the tagging operation is not a resource type owned by Amazon FSx. Use the API of the relevant service to perform the operation. </p>
1969    NotServiceResourceError(String),
1970    /// <p>The resource specified does not support tagging. </p>
1971    ResourceDoesNotSupportTagging(String),
1972    /// <p>The resource specified by the Amazon Resource Name (ARN) can't be found.</p>
1973    ResourceNotFound(String),
1974}
1975
1976impl TagResourceError {
1977    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
1978        if let Some(err) = proto::json::Error::parse(&res) {
1979            match err.typ.as_str() {
1980                "BadRequest" => return RusotoError::Service(TagResourceError::BadRequest(err.msg)),
1981                "InternalServerError" => {
1982                    return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
1983                }
1984                "NotServiceResourceError" => {
1985                    return RusotoError::Service(TagResourceError::NotServiceResourceError(err.msg))
1986                }
1987                "ResourceDoesNotSupportTagging" => {
1988                    return RusotoError::Service(TagResourceError::ResourceDoesNotSupportTagging(
1989                        err.msg,
1990                    ))
1991                }
1992                "ResourceNotFound" => {
1993                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
1994                }
1995                "ValidationException" => return RusotoError::Validation(err.msg),
1996                _ => {}
1997            }
1998        }
1999        RusotoError::Unknown(res)
2000    }
2001}
2002impl fmt::Display for TagResourceError {
2003    #[allow(unused_variables)]
2004    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2005        match *self {
2006            TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2007            TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2008            TagResourceError::NotServiceResourceError(ref cause) => write!(f, "{}", cause),
2009            TagResourceError::ResourceDoesNotSupportTagging(ref cause) => write!(f, "{}", cause),
2010            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2011        }
2012    }
2013}
2014impl Error for TagResourceError {}
2015/// Errors returned by UntagResource
2016#[derive(Debug, PartialEq)]
2017pub enum UntagResourceError {
2018    /// <p>A generic error indicating a failure with a client request.</p>
2019    BadRequest(String),
2020    /// <p>A generic error indicating a server-side failure.</p>
2021    InternalServerError(String),
2022    /// <p>The resource specified for the tagging operation is not a resource type owned by Amazon FSx. Use the API of the relevant service to perform the operation. </p>
2023    NotServiceResourceError(String),
2024    /// <p>The resource specified does not support tagging. </p>
2025    ResourceDoesNotSupportTagging(String),
2026    /// <p>The resource specified by the Amazon Resource Name (ARN) can't be found.</p>
2027    ResourceNotFound(String),
2028}
2029
2030impl UntagResourceError {
2031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2032        if let Some(err) = proto::json::Error::parse(&res) {
2033            match err.typ.as_str() {
2034                "BadRequest" => {
2035                    return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
2036                }
2037                "InternalServerError" => {
2038                    return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
2039                }
2040                "NotServiceResourceError" => {
2041                    return RusotoError::Service(UntagResourceError::NotServiceResourceError(
2042                        err.msg,
2043                    ))
2044                }
2045                "ResourceDoesNotSupportTagging" => {
2046                    return RusotoError::Service(UntagResourceError::ResourceDoesNotSupportTagging(
2047                        err.msg,
2048                    ))
2049                }
2050                "ResourceNotFound" => {
2051                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
2052                }
2053                "ValidationException" => return RusotoError::Validation(err.msg),
2054                _ => {}
2055            }
2056        }
2057        RusotoError::Unknown(res)
2058    }
2059}
2060impl fmt::Display for UntagResourceError {
2061    #[allow(unused_variables)]
2062    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2063        match *self {
2064            UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2065            UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2066            UntagResourceError::NotServiceResourceError(ref cause) => write!(f, "{}", cause),
2067            UntagResourceError::ResourceDoesNotSupportTagging(ref cause) => write!(f, "{}", cause),
2068            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2069        }
2070    }
2071}
2072impl Error for UntagResourceError {}
2073/// Errors returned by UpdateFileSystem
2074#[derive(Debug, PartialEq)]
2075pub enum UpdateFileSystemError {
2076    /// <p>A generic error indicating a failure with a client request.</p>
2077    BadRequest(String),
2078    /// <p>No Amazon FSx file systems were found based upon supplied parameters.</p>
2079    FileSystemNotFound(String),
2080    /// <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
2081    IncompatibleParameterError(String),
2082    /// <p>A generic error indicating a server-side failure.</p>
2083    InternalServerError(String),
2084    /// <p>A file system configuration is required for this operation.</p>
2085    MissingFileSystemConfiguration(String),
2086    /// <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support. </p>
2087    ServiceLimitExceeded(String),
2088    /// <p>The requested operation is not supported for this resource or API.</p>
2089    UnsupportedOperation(String),
2090}
2091
2092impl UpdateFileSystemError {
2093    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFileSystemError> {
2094        if let Some(err) = proto::json::Error::parse(&res) {
2095            match err.typ.as_str() {
2096                "BadRequest" => {
2097                    return RusotoError::Service(UpdateFileSystemError::BadRequest(err.msg))
2098                }
2099                "FileSystemNotFound" => {
2100                    return RusotoError::Service(UpdateFileSystemError::FileSystemNotFound(err.msg))
2101                }
2102                "IncompatibleParameterError" => {
2103                    return RusotoError::Service(UpdateFileSystemError::IncompatibleParameterError(
2104                        err.msg,
2105                    ))
2106                }
2107                "InternalServerError" => {
2108                    return RusotoError::Service(UpdateFileSystemError::InternalServerError(
2109                        err.msg,
2110                    ))
2111                }
2112                "MissingFileSystemConfiguration" => {
2113                    return RusotoError::Service(
2114                        UpdateFileSystemError::MissingFileSystemConfiguration(err.msg),
2115                    )
2116                }
2117                "ServiceLimitExceeded" => {
2118                    return RusotoError::Service(UpdateFileSystemError::ServiceLimitExceeded(
2119                        err.msg,
2120                    ))
2121                }
2122                "UnsupportedOperation" => {
2123                    return RusotoError::Service(UpdateFileSystemError::UnsupportedOperation(
2124                        err.msg,
2125                    ))
2126                }
2127                "ValidationException" => return RusotoError::Validation(err.msg),
2128                _ => {}
2129            }
2130        }
2131        RusotoError::Unknown(res)
2132    }
2133}
2134impl fmt::Display for UpdateFileSystemError {
2135    #[allow(unused_variables)]
2136    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2137        match *self {
2138            UpdateFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
2139            UpdateFileSystemError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
2140            UpdateFileSystemError::IncompatibleParameterError(ref cause) => write!(f, "{}", cause),
2141            UpdateFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
2142            UpdateFileSystemError::MissingFileSystemConfiguration(ref cause) => {
2143                write!(f, "{}", cause)
2144            }
2145            UpdateFileSystemError::ServiceLimitExceeded(ref cause) => write!(f, "{}", cause),
2146            UpdateFileSystemError::UnsupportedOperation(ref cause) => write!(f, "{}", cause),
2147        }
2148    }
2149}
2150impl Error for UpdateFileSystemError {}
2151/// Trait representing the capabilities of the Amazon FSx API. Amazon FSx clients implement this trait.
2152#[async_trait]
2153pub trait Fsx {
2154    /// <p><p>Cancels an existing Amazon FSx for Lustre data repository task if that task is in either the <code>PENDING</code> or <code>EXECUTING</code> state. When you cancel a task, Amazon FSx does the following.</p> <ul> <li> <p>Any files that FSx has already exported are not reverted.</p> </li> <li> <p>FSx continues to export any files that are &quot;in-flight&quot; when the cancel operation is received.</p> </li> <li> <p>FSx does not export any files that have not yet been exported.</p> </li> </ul></p>
2155    async fn cancel_data_repository_task(
2156        &self,
2157        input: CancelDataRepositoryTaskRequest,
2158    ) -> Result<CancelDataRepositoryTaskResponse, RusotoError<CancelDataRepositoryTaskError>>;
2159
2160    /// <p>Creates a backup of an existing Amazon FSx file system. Creating regular backups for your file system is a best practice, enabling you to restore a file system from a backup if an issue arises with the original file system.</p> <p>For Amazon FSx for Lustre file systems, you can create a backup only for file systems with the following configuration:</p> <ul> <li> <p>a Persistent deployment type</p> </li> <li> <p>is <i>not</i> linked to an Amazon S3 data respository.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-backups.html">https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-backups.html</a>.</p> <p>If a backup with the specified client request token exists, and the parameters match, this operation returns the description of the existing backup. If a backup specified client request token exists, and the parameters don't match, this operation returns <code>IncompatibleParameterError</code>. If a backup with the specified client request token doesn't exist, <code>CreateBackup</code> does the following: </p> <ul> <li> <p>Creates a new Amazon FSx backup with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the backup.</p> </li> </ul> <p>By using the idempotent operation, you can retry a <code>CreateBackup</code> operation without the risk of creating an extra backup. This approach can be useful when an initial call fails in a way that makes it unclear whether a backup was created. If you use the same client request token and the initial call created a backup, the operation returns a successful result because all the parameters are the same.</p> <p>The <code>CreateBackup</code> operation returns while the backup's lifecycle state is still <code>CREATING</code>. You can check the backup creation status by calling the <a>DescribeBackups</a> operation, which returns the backup state along with other information.</p>
2161    async fn create_backup(
2162        &self,
2163        input: CreateBackupRequest,
2164    ) -> Result<CreateBackupResponse, RusotoError<CreateBackupError>>;
2165
2166    /// <p>Creates an Amazon FSx for Lustre data repository task. You use data repository tasks to perform bulk operations between your Amazon FSx file system and its linked data repository. An example of a data repository task is exporting any data and metadata changes, including POSIX metadata, to files, directories, and symbolic links (symlinks) from your FSx file system to its linked data repository. A <code>CreateDataRepositoryTask</code> operation will fail if a data repository is not linked to the FSx file system. To learn more about data repository tasks, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-repository-tasks.html">Using Data Repository Tasks</a>. To learn more about linking a data repository to your file system, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/export-data-repository.html#export-prefix">Setting the Export Prefix</a>.</p>
2167    async fn create_data_repository_task(
2168        &self,
2169        input: CreateDataRepositoryTaskRequest,
2170    ) -> Result<CreateDataRepositoryTaskResponse, RusotoError<CreateDataRepositoryTaskError>>;
2171
2172    /// <p><p>Creates a new, empty Amazon FSx file system.</p> <p>If a file system with the specified client request token exists and the parameters match, <code>CreateFileSystem</code> returns the description of the existing file system. If a file system specified client request token exists and the parameters don&#39;t match, this call returns <code>IncompatibleParameterError</code>. If a file system with the specified client request token doesn&#39;t exist, <code>CreateFileSystem</code> does the following: </p> <ul> <li> <p>Creates a new, empty Amazon FSx file system with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the file system.</p> </li> </ul> <p>This operation requires a client request token in the request that Amazon FSx uses to ensure idempotent creation. This means that calling the operation multiple times with the same client request token has no effect. By using the idempotent operation, you can retry a <code>CreateFileSystem</code> operation without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.</p> <note> <p>The <code>CreateFileSystem</code> call returns while the file system&#39;s lifecycle state is still <code>CREATING</code>. You can check the file-system creation status by calling the <a>DescribeFileSystems</a> operation, which returns the file system state along with other information.</p> </note></p>
2173    async fn create_file_system(
2174        &self,
2175        input: CreateFileSystemRequest,
2176    ) -> Result<CreateFileSystemResponse, RusotoError<CreateFileSystemError>>;
2177
2178    /// <p><p>Creates a new Amazon FSx file system from an existing Amazon FSx backup.</p> <p>If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a client request token specified by the file system exists and the parameters don&#39;t match, this call returns <code>IncompatibleParameterError</code>. If a file system with the specified client request token doesn&#39;t exist, this operation does the following:</p> <ul> <li> <p>Creates a new Amazon FSx file system from backup with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the file system.</p> </li> </ul> <p>Parameters like Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings.</p> <p>By using the idempotent operation, you can retry a <code>CreateFileSystemFromBackup</code> call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.</p> <note> <p>The <code>CreateFileSystemFromBackup</code> call returns while the file system&#39;s lifecycle state is still <code>CREATING</code>. You can check the file-system creation status by calling the <a>DescribeFileSystems</a> operation, which returns the file system state along with other information.</p> </note></p>
2179    async fn create_file_system_from_backup(
2180        &self,
2181        input: CreateFileSystemFromBackupRequest,
2182    ) -> Result<CreateFileSystemFromBackupResponse, RusotoError<CreateFileSystemFromBackupError>>;
2183
2184    /// <p><p>Deletes an Amazon FSx backup, deleting its contents. After deletion, the backup no longer exists, and its data is gone.</p> <p>The <code>DeleteBackup</code> call returns instantly. The backup will not show up in later <code>DescribeBackups</code> calls.</p> <important> <p>The data in a deleted backup is also deleted and can&#39;t be recovered by any means.</p> </important></p>
2185    async fn delete_backup(
2186        &self,
2187        input: DeleteBackupRequest,
2188    ) -> Result<DeleteBackupResponse, RusotoError<DeleteBackupError>>;
2189
2190    /// <p><p>Deletes a file system, deleting its contents. After deletion, the file system no longer exists, and its data is gone. Any existing automatic backups will also be deleted.</p> <p>By default, when you delete an Amazon FSx for Windows File Server file system, a final backup is created upon deletion. This final backup is not subject to the file system&#39;s retention policy, and must be manually deleted.</p> <p>The <code>DeleteFileSystem</code> action returns while the file system has the <code>DELETING</code> status. You can check the file system deletion status by calling the <a>DescribeFileSystems</a> action, which returns a list of file systems in your account. If you pass the file system ID for a deleted file system, the <a>DescribeFileSystems</a> returns a <code>FileSystemNotFound</code> error.</p> <note> <p>Deleting an Amazon FSx for Lustre file system will fail with a 400 BadRequest if a data repository task is in a <code>PENDING</code> or <code>EXECUTING</code> state.</p> </note> <important> <p>The data in a deleted file system is also deleted and can&#39;t be recovered by any means.</p> </important></p>
2191    async fn delete_file_system(
2192        &self,
2193        input: DeleteFileSystemRequest,
2194    ) -> Result<DeleteFileSystemResponse, RusotoError<DeleteFileSystemError>>;
2195
2196    /// <p><p>Returns the description of specific Amazon FSx backups, if a <code>BackupIds</code> value is provided for that backup. Otherwise, it returns all backups owned by your AWS account in the AWS Region of the endpoint that you&#39;re calling.</p> <p>When retrieving all backups, you can optionally specify the <code>MaxResults</code> parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your backups. <code>DescribeBackups</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <p>The order of backups returned in the response of one <code>DescribeBackups</code> call and the order of backups returned across the responses of a multi-call iteration is unspecified.</p> </li> </ul></p>
2197    async fn describe_backups(
2198        &self,
2199        input: DescribeBackupsRequest,
2200    ) -> Result<DescribeBackupsResponse, RusotoError<DescribeBackupsError>>;
2201
2202    /// <p>Returns the description of specific Amazon FSx for Lustre data repository tasks, if one or more <code>TaskIds</code> values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your AWS account in the AWS Region of the endpoint that you're calling.</p> <p>When retrieving all tasks, you can paginate the response by using the optional <code>MaxResults</code> parameter to limit the number of tasks returned in a response. If more tasks remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p>
2203    async fn describe_data_repository_tasks(
2204        &self,
2205        input: DescribeDataRepositoryTasksRequest,
2206    ) -> Result<DescribeDataRepositoryTasksResponse, RusotoError<DescribeDataRepositoryTasksError>>;
2207
2208    /// <p><p>Returns the description of specific Amazon FSx file systems, if a <code>FileSystemIds</code> value is provided for that file system. Otherwise, it returns descriptions of all file systems owned by your AWS account in the AWS Region of the endpoint that you&#39;re calling.</p> <p>When retrieving all file system descriptions, you can optionally specify the <code>MaxResults</code> parameter to limit the number of descriptions in a response. If more file system descriptions remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your file system descriptions. <code>DescribeFileSystems</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <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 multicall iteration is unspecified.</p> </li> </ul></p>
2209    async fn describe_file_systems(
2210        &self,
2211        input: DescribeFileSystemsRequest,
2212    ) -> Result<DescribeFileSystemsResponse, RusotoError<DescribeFileSystemsError>>;
2213
2214    /// <p><p>Lists tags for an Amazon FSx file systems and backups in the case of Amazon FSx for Windows File Server.</p> <p>When retrieving all tags, you can optionally specify the <code>MaxResults</code> parameter to limit the number of tags in a response. If more tags remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your tags. <code>ListTagsForResource</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <p>The order of tags returned in the response of one <code>ListTagsForResource</code> call and the order of tags returned across the responses of a multi-call iteration is unspecified.</p> </li> </ul></p>
2215    async fn list_tags_for_resource(
2216        &self,
2217        input: ListTagsForResourceRequest,
2218    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2219
2220    /// <p>Tags an Amazon FSx resource.</p>
2221    async fn tag_resource(
2222        &self,
2223        input: TagResourceRequest,
2224    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
2225
2226    /// <p>This action removes a tag from an Amazon FSx resource.</p>
2227    async fn untag_resource(
2228        &self,
2229        input: UntagResourceRequest,
2230    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
2231
2232    /// <p>Use this operation to update the configuration of an existing Amazon FSx file system. For an Amazon FSx for Lustre file system, you can update only the WeeklyMaintenanceStartTime. For an Amazon for Windows File Server file system, you can update the following properties:</p> <ul> <li> <p>AutomaticBackupRetentionDays</p> </li> <li> <p>DailyAutomaticBackupStartTime</p> </li> <li> <p>SelfManagedActiveDirectoryConfiguration</p> </li> <li> <p>StorageCapacity</p> </li> <li> <p>ThroughputCapacity</p> </li> <li> <p>WeeklyMaintenanceStartTime</p> </li> </ul> <p>You can update multiple properties in a single request.</p>
2233    async fn update_file_system(
2234        &self,
2235        input: UpdateFileSystemRequest,
2236    ) -> Result<UpdateFileSystemResponse, RusotoError<UpdateFileSystemError>>;
2237}
2238/// A client for the Amazon FSx API.
2239#[derive(Clone)]
2240pub struct FsxClient {
2241    client: Client,
2242    region: region::Region,
2243}
2244
2245impl FsxClient {
2246    /// Creates a client backed by the default tokio event loop.
2247    ///
2248    /// The client will use the default credentials provider and tls client.
2249    pub fn new(region: region::Region) -> FsxClient {
2250        FsxClient {
2251            client: Client::shared(),
2252            region,
2253        }
2254    }
2255
2256    pub fn new_with<P, D>(
2257        request_dispatcher: D,
2258        credentials_provider: P,
2259        region: region::Region,
2260    ) -> FsxClient
2261    where
2262        P: ProvideAwsCredentials + Send + Sync + 'static,
2263        D: DispatchSignedRequest + Send + Sync + 'static,
2264    {
2265        FsxClient {
2266            client: Client::new_with(credentials_provider, request_dispatcher),
2267            region,
2268        }
2269    }
2270
2271    pub fn new_with_client(client: Client, region: region::Region) -> FsxClient {
2272        FsxClient { client, region }
2273    }
2274}
2275
2276#[async_trait]
2277impl Fsx for FsxClient {
2278    /// <p><p>Cancels an existing Amazon FSx for Lustre data repository task if that task is in either the <code>PENDING</code> or <code>EXECUTING</code> state. When you cancel a task, Amazon FSx does the following.</p> <ul> <li> <p>Any files that FSx has already exported are not reverted.</p> </li> <li> <p>FSx continues to export any files that are &quot;in-flight&quot; when the cancel operation is received.</p> </li> <li> <p>FSx does not export any files that have not yet been exported.</p> </li> </ul></p>
2279    async fn cancel_data_repository_task(
2280        &self,
2281        input: CancelDataRepositoryTaskRequest,
2282    ) -> Result<CancelDataRepositoryTaskResponse, RusotoError<CancelDataRepositoryTaskError>> {
2283        let mut request = self.new_signed_request("POST", "/");
2284        request.add_header(
2285            "x-amz-target",
2286            "AWSSimbaAPIService_v20180301.CancelDataRepositoryTask",
2287        );
2288        let encoded = serde_json::to_string(&input).unwrap();
2289        request.set_payload(Some(encoded));
2290
2291        let response = self
2292            .sign_and_dispatch(request, CancelDataRepositoryTaskError::from_response)
2293            .await?;
2294        let mut response = response;
2295        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2296        proto::json::ResponsePayload::new(&response)
2297            .deserialize::<CancelDataRepositoryTaskResponse, _>()
2298    }
2299
2300    /// <p>Creates a backup of an existing Amazon FSx file system. Creating regular backups for your file system is a best practice, enabling you to restore a file system from a backup if an issue arises with the original file system.</p> <p>For Amazon FSx for Lustre file systems, you can create a backup only for file systems with the following configuration:</p> <ul> <li> <p>a Persistent deployment type</p> </li> <li> <p>is <i>not</i> linked to an Amazon S3 data respository.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-backups.html">https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-backups.html</a>.</p> <p>If a backup with the specified client request token exists, and the parameters match, this operation returns the description of the existing backup. If a backup specified client request token exists, and the parameters don't match, this operation returns <code>IncompatibleParameterError</code>. If a backup with the specified client request token doesn't exist, <code>CreateBackup</code> does the following: </p> <ul> <li> <p>Creates a new Amazon FSx backup with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the backup.</p> </li> </ul> <p>By using the idempotent operation, you can retry a <code>CreateBackup</code> operation without the risk of creating an extra backup. This approach can be useful when an initial call fails in a way that makes it unclear whether a backup was created. If you use the same client request token and the initial call created a backup, the operation returns a successful result because all the parameters are the same.</p> <p>The <code>CreateBackup</code> operation returns while the backup's lifecycle state is still <code>CREATING</code>. You can check the backup creation status by calling the <a>DescribeBackups</a> operation, which returns the backup state along with other information.</p>
2301    async fn create_backup(
2302        &self,
2303        input: CreateBackupRequest,
2304    ) -> Result<CreateBackupResponse, RusotoError<CreateBackupError>> {
2305        let mut request = self.new_signed_request("POST", "/");
2306        request.add_header("x-amz-target", "AWSSimbaAPIService_v20180301.CreateBackup");
2307        let encoded = serde_json::to_string(&input).unwrap();
2308        request.set_payload(Some(encoded));
2309
2310        let response = self
2311            .sign_and_dispatch(request, CreateBackupError::from_response)
2312            .await?;
2313        let mut response = response;
2314        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2315        proto::json::ResponsePayload::new(&response).deserialize::<CreateBackupResponse, _>()
2316    }
2317
2318    /// <p>Creates an Amazon FSx for Lustre data repository task. You use data repository tasks to perform bulk operations between your Amazon FSx file system and its linked data repository. An example of a data repository task is exporting any data and metadata changes, including POSIX metadata, to files, directories, and symbolic links (symlinks) from your FSx file system to its linked data repository. A <code>CreateDataRepositoryTask</code> operation will fail if a data repository is not linked to the FSx file system. To learn more about data repository tasks, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-repository-tasks.html">Using Data Repository Tasks</a>. To learn more about linking a data repository to your file system, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/export-data-repository.html#export-prefix">Setting the Export Prefix</a>.</p>
2319    async fn create_data_repository_task(
2320        &self,
2321        input: CreateDataRepositoryTaskRequest,
2322    ) -> Result<CreateDataRepositoryTaskResponse, RusotoError<CreateDataRepositoryTaskError>> {
2323        let mut request = self.new_signed_request("POST", "/");
2324        request.add_header(
2325            "x-amz-target",
2326            "AWSSimbaAPIService_v20180301.CreateDataRepositoryTask",
2327        );
2328        let encoded = serde_json::to_string(&input).unwrap();
2329        request.set_payload(Some(encoded));
2330
2331        let response = self
2332            .sign_and_dispatch(request, CreateDataRepositoryTaskError::from_response)
2333            .await?;
2334        let mut response = response;
2335        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2336        proto::json::ResponsePayload::new(&response)
2337            .deserialize::<CreateDataRepositoryTaskResponse, _>()
2338    }
2339
2340    /// <p><p>Creates a new, empty Amazon FSx file system.</p> <p>If a file system with the specified client request token exists and the parameters match, <code>CreateFileSystem</code> returns the description of the existing file system. If a file system specified client request token exists and the parameters don&#39;t match, this call returns <code>IncompatibleParameterError</code>. If a file system with the specified client request token doesn&#39;t exist, <code>CreateFileSystem</code> does the following: </p> <ul> <li> <p>Creates a new, empty Amazon FSx file system with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the file system.</p> </li> </ul> <p>This operation requires a client request token in the request that Amazon FSx uses to ensure idempotent creation. This means that calling the operation multiple times with the same client request token has no effect. By using the idempotent operation, you can retry a <code>CreateFileSystem</code> operation without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.</p> <note> <p>The <code>CreateFileSystem</code> call returns while the file system&#39;s lifecycle state is still <code>CREATING</code>. You can check the file-system creation status by calling the <a>DescribeFileSystems</a> operation, which returns the file system state along with other information.</p> </note></p>
2341    async fn create_file_system(
2342        &self,
2343        input: CreateFileSystemRequest,
2344    ) -> Result<CreateFileSystemResponse, RusotoError<CreateFileSystemError>> {
2345        let mut request = self.new_signed_request("POST", "/");
2346        request.add_header(
2347            "x-amz-target",
2348            "AWSSimbaAPIService_v20180301.CreateFileSystem",
2349        );
2350        let encoded = serde_json::to_string(&input).unwrap();
2351        request.set_payload(Some(encoded));
2352
2353        let response = self
2354            .sign_and_dispatch(request, CreateFileSystemError::from_response)
2355            .await?;
2356        let mut response = response;
2357        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2358        proto::json::ResponsePayload::new(&response).deserialize::<CreateFileSystemResponse, _>()
2359    }
2360
2361    /// <p><p>Creates a new Amazon FSx file system from an existing Amazon FSx backup.</p> <p>If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a client request token specified by the file system exists and the parameters don&#39;t match, this call returns <code>IncompatibleParameterError</code>. If a file system with the specified client request token doesn&#39;t exist, this operation does the following:</p> <ul> <li> <p>Creates a new Amazon FSx file system from backup with an assigned ID, and an initial lifecycle state of <code>CREATING</code>.</p> </li> <li> <p>Returns the description of the file system.</p> </li> </ul> <p>Parameters like Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings.</p> <p>By using the idempotent operation, you can retry a <code>CreateFileSystemFromBackup</code> call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.</p> <note> <p>The <code>CreateFileSystemFromBackup</code> call returns while the file system&#39;s lifecycle state is still <code>CREATING</code>. You can check the file-system creation status by calling the <a>DescribeFileSystems</a> operation, which returns the file system state along with other information.</p> </note></p>
2362    async fn create_file_system_from_backup(
2363        &self,
2364        input: CreateFileSystemFromBackupRequest,
2365    ) -> Result<CreateFileSystemFromBackupResponse, RusotoError<CreateFileSystemFromBackupError>>
2366    {
2367        let mut request = self.new_signed_request("POST", "/");
2368        request.add_header(
2369            "x-amz-target",
2370            "AWSSimbaAPIService_v20180301.CreateFileSystemFromBackup",
2371        );
2372        let encoded = serde_json::to_string(&input).unwrap();
2373        request.set_payload(Some(encoded));
2374
2375        let response = self
2376            .sign_and_dispatch(request, CreateFileSystemFromBackupError::from_response)
2377            .await?;
2378        let mut response = response;
2379        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2380        proto::json::ResponsePayload::new(&response)
2381            .deserialize::<CreateFileSystemFromBackupResponse, _>()
2382    }
2383
2384    /// <p><p>Deletes an Amazon FSx backup, deleting its contents. After deletion, the backup no longer exists, and its data is gone.</p> <p>The <code>DeleteBackup</code> call returns instantly. The backup will not show up in later <code>DescribeBackups</code> calls.</p> <important> <p>The data in a deleted backup is also deleted and can&#39;t be recovered by any means.</p> </important></p>
2385    async fn delete_backup(
2386        &self,
2387        input: DeleteBackupRequest,
2388    ) -> Result<DeleteBackupResponse, RusotoError<DeleteBackupError>> {
2389        let mut request = self.new_signed_request("POST", "/");
2390        request.add_header("x-amz-target", "AWSSimbaAPIService_v20180301.DeleteBackup");
2391        let encoded = serde_json::to_string(&input).unwrap();
2392        request.set_payload(Some(encoded));
2393
2394        let response = self
2395            .sign_and_dispatch(request, DeleteBackupError::from_response)
2396            .await?;
2397        let mut response = response;
2398        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2399        proto::json::ResponsePayload::new(&response).deserialize::<DeleteBackupResponse, _>()
2400    }
2401
2402    /// <p><p>Deletes a file system, deleting its contents. After deletion, the file system no longer exists, and its data is gone. Any existing automatic backups will also be deleted.</p> <p>By default, when you delete an Amazon FSx for Windows File Server file system, a final backup is created upon deletion. This final backup is not subject to the file system&#39;s retention policy, and must be manually deleted.</p> <p>The <code>DeleteFileSystem</code> action returns while the file system has the <code>DELETING</code> status. You can check the file system deletion status by calling the <a>DescribeFileSystems</a> action, which returns a list of file systems in your account. If you pass the file system ID for a deleted file system, the <a>DescribeFileSystems</a> returns a <code>FileSystemNotFound</code> error.</p> <note> <p>Deleting an Amazon FSx for Lustre file system will fail with a 400 BadRequest if a data repository task is in a <code>PENDING</code> or <code>EXECUTING</code> state.</p> </note> <important> <p>The data in a deleted file system is also deleted and can&#39;t be recovered by any means.</p> </important></p>
2403    async fn delete_file_system(
2404        &self,
2405        input: DeleteFileSystemRequest,
2406    ) -> Result<DeleteFileSystemResponse, RusotoError<DeleteFileSystemError>> {
2407        let mut request = self.new_signed_request("POST", "/");
2408        request.add_header(
2409            "x-amz-target",
2410            "AWSSimbaAPIService_v20180301.DeleteFileSystem",
2411        );
2412        let encoded = serde_json::to_string(&input).unwrap();
2413        request.set_payload(Some(encoded));
2414
2415        let response = self
2416            .sign_and_dispatch(request, DeleteFileSystemError::from_response)
2417            .await?;
2418        let mut response = response;
2419        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2420        proto::json::ResponsePayload::new(&response).deserialize::<DeleteFileSystemResponse, _>()
2421    }
2422
2423    /// <p><p>Returns the description of specific Amazon FSx backups, if a <code>BackupIds</code> value is provided for that backup. Otherwise, it returns all backups owned by your AWS account in the AWS Region of the endpoint that you&#39;re calling.</p> <p>When retrieving all backups, you can optionally specify the <code>MaxResults</code> parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your backups. <code>DescribeBackups</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <p>The order of backups returned in the response of one <code>DescribeBackups</code> call and the order of backups returned across the responses of a multi-call iteration is unspecified.</p> </li> </ul></p>
2424    async fn describe_backups(
2425        &self,
2426        input: DescribeBackupsRequest,
2427    ) -> Result<DescribeBackupsResponse, RusotoError<DescribeBackupsError>> {
2428        let mut request = self.new_signed_request("POST", "/");
2429        request.add_header(
2430            "x-amz-target",
2431            "AWSSimbaAPIService_v20180301.DescribeBackups",
2432        );
2433        let encoded = serde_json::to_string(&input).unwrap();
2434        request.set_payload(Some(encoded));
2435
2436        let response = self
2437            .sign_and_dispatch(request, DescribeBackupsError::from_response)
2438            .await?;
2439        let mut response = response;
2440        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2441        proto::json::ResponsePayload::new(&response).deserialize::<DescribeBackupsResponse, _>()
2442    }
2443
2444    /// <p>Returns the description of specific Amazon FSx for Lustre data repository tasks, if one or more <code>TaskIds</code> values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your AWS account in the AWS Region of the endpoint that you're calling.</p> <p>When retrieving all tasks, you can paginate the response by using the optional <code>MaxResults</code> parameter to limit the number of tasks returned in a response. If more tasks remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p>
2445    async fn describe_data_repository_tasks(
2446        &self,
2447        input: DescribeDataRepositoryTasksRequest,
2448    ) -> Result<DescribeDataRepositoryTasksResponse, RusotoError<DescribeDataRepositoryTasksError>>
2449    {
2450        let mut request = self.new_signed_request("POST", "/");
2451        request.add_header(
2452            "x-amz-target",
2453            "AWSSimbaAPIService_v20180301.DescribeDataRepositoryTasks",
2454        );
2455        let encoded = serde_json::to_string(&input).unwrap();
2456        request.set_payload(Some(encoded));
2457
2458        let response = self
2459            .sign_and_dispatch(request, DescribeDataRepositoryTasksError::from_response)
2460            .await?;
2461        let mut response = response;
2462        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2463        proto::json::ResponsePayload::new(&response)
2464            .deserialize::<DescribeDataRepositoryTasksResponse, _>()
2465    }
2466
2467    /// <p><p>Returns the description of specific Amazon FSx file systems, if a <code>FileSystemIds</code> value is provided for that file system. Otherwise, it returns descriptions of all file systems owned by your AWS account in the AWS Region of the endpoint that you&#39;re calling.</p> <p>When retrieving all file system descriptions, you can optionally specify the <code>MaxResults</code> parameter to limit the number of descriptions in a response. If more file system descriptions remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your file system descriptions. <code>DescribeFileSystems</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <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 multicall iteration is unspecified.</p> </li> </ul></p>
2468    async fn describe_file_systems(
2469        &self,
2470        input: DescribeFileSystemsRequest,
2471    ) -> Result<DescribeFileSystemsResponse, RusotoError<DescribeFileSystemsError>> {
2472        let mut request = self.new_signed_request("POST", "/");
2473        request.add_header(
2474            "x-amz-target",
2475            "AWSSimbaAPIService_v20180301.DescribeFileSystems",
2476        );
2477        let encoded = serde_json::to_string(&input).unwrap();
2478        request.set_payload(Some(encoded));
2479
2480        let response = self
2481            .sign_and_dispatch(request, DescribeFileSystemsError::from_response)
2482            .await?;
2483        let mut response = response;
2484        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2485        proto::json::ResponsePayload::new(&response).deserialize::<DescribeFileSystemsResponse, _>()
2486    }
2487
2488    /// <p><p>Lists tags for an Amazon FSx file systems and backups in the case of Amazon FSx for Windows File Server.</p> <p>When retrieving all tags, you can optionally specify the <code>MaxResults</code> parameter to limit the number of tags in a response. If more tags remain, Amazon FSx returns a <code>NextToken</code> value in the response. In this case, send a later request with the <code>NextToken</code> request parameter set to the value of <code>NextToken</code> from the last response.</p> <p>This action is used in an iterative process to retrieve a list of your tags. <code>ListTagsForResource</code> is called first without a <code>NextToken</code>value. Then the action continues to be called with the <code>NextToken</code> parameter set to the value of the last <code>NextToken</code> value until a response has no <code>NextToken</code>.</p> <p>When using this action, keep the following in mind:</p> <ul> <li> <p>The implementation might return fewer than <code>MaxResults</code> file system descriptions while still including a <code>NextToken</code> value.</p> </li> <li> <p>The order of tags returned in the response of one <code>ListTagsForResource</code> call and the order of tags returned across the responses of a multi-call iteration is unspecified.</p> </li> </ul></p>
2489    async fn list_tags_for_resource(
2490        &self,
2491        input: ListTagsForResourceRequest,
2492    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2493        let mut request = self.new_signed_request("POST", "/");
2494        request.add_header(
2495            "x-amz-target",
2496            "AWSSimbaAPIService_v20180301.ListTagsForResource",
2497        );
2498        let encoded = serde_json::to_string(&input).unwrap();
2499        request.set_payload(Some(encoded));
2500
2501        let response = self
2502            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2503            .await?;
2504        let mut response = response;
2505        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2506        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
2507    }
2508
2509    /// <p>Tags an Amazon FSx resource.</p>
2510    async fn tag_resource(
2511        &self,
2512        input: TagResourceRequest,
2513    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
2514        let mut request = self.new_signed_request("POST", "/");
2515        request.add_header("x-amz-target", "AWSSimbaAPIService_v20180301.TagResource");
2516        let encoded = serde_json::to_string(&input).unwrap();
2517        request.set_payload(Some(encoded));
2518
2519        let response = self
2520            .sign_and_dispatch(request, TagResourceError::from_response)
2521            .await?;
2522        let mut response = response;
2523        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2524        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
2525    }
2526
2527    /// <p>This action removes a tag from an Amazon FSx resource.</p>
2528    async fn untag_resource(
2529        &self,
2530        input: UntagResourceRequest,
2531    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
2532        let mut request = self.new_signed_request("POST", "/");
2533        request.add_header("x-amz-target", "AWSSimbaAPIService_v20180301.UntagResource");
2534        let encoded = serde_json::to_string(&input).unwrap();
2535        request.set_payload(Some(encoded));
2536
2537        let response = self
2538            .sign_and_dispatch(request, UntagResourceError::from_response)
2539            .await?;
2540        let mut response = response;
2541        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2542        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
2543    }
2544
2545    /// <p>Use this operation to update the configuration of an existing Amazon FSx file system. For an Amazon FSx for Lustre file system, you can update only the WeeklyMaintenanceStartTime. For an Amazon for Windows File Server file system, you can update the following properties:</p> <ul> <li> <p>AutomaticBackupRetentionDays</p> </li> <li> <p>DailyAutomaticBackupStartTime</p> </li> <li> <p>SelfManagedActiveDirectoryConfiguration</p> </li> <li> <p>StorageCapacity</p> </li> <li> <p>ThroughputCapacity</p> </li> <li> <p>WeeklyMaintenanceStartTime</p> </li> </ul> <p>You can update multiple properties in a single request.</p>
2546    async fn update_file_system(
2547        &self,
2548        input: UpdateFileSystemRequest,
2549    ) -> Result<UpdateFileSystemResponse, RusotoError<UpdateFileSystemError>> {
2550        let mut request = self.new_signed_request("POST", "/");
2551        request.add_header(
2552            "x-amz-target",
2553            "AWSSimbaAPIService_v20180301.UpdateFileSystem",
2554        );
2555        let encoded = serde_json::to_string(&input).unwrap();
2556        request.set_payload(Some(encoded));
2557
2558        let response = self
2559            .sign_and_dispatch(request, UpdateFileSystemError::from_response)
2560            .await?;
2561        let mut response = response;
2562        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2563        proto::json::ResponsePayload::new(&response).deserialize::<UpdateFileSystemResponse, _>()
2564    }
2565}