示例#1
0
        public void FSxCreateFileSystemFromBackup()
        {
            #region to-create-a-new-file-system-from-backup-1481840798598

            var response = client.CreateFileSystemFromBackup(new CreateFileSystemFromBackupRequest
            {
                BackupId           = "backup-03e3c82e0183b7b6b",
                ClientRequestToken = "f4c94ed7-238d-4c46-93db-48cd62ec33b7",
                SecurityGroupIds   = new List <string> {
                    "sg-edcd9784"
                },
                SubnetIds = new List <string> {
                    "subnet-1234abcd"
                },
                Tags = new List <Tag> {
                    new Tag {
                        Key   = "Name",
                        Value = "MyFileSystem"
                    }
                },
                WindowsConfiguration = new CreateFileSystemWindowsConfiguration {
                    ThroughputCapacity = 8
                }
            });

            FileSystem fileSystem = response.FileSystem;

            #endregion
        }
 private Amazon.FSx.Model.CreateFileSystemFromBackupResponse CallAWSServiceOperation(IAmazonFSx client, Amazon.FSx.Model.CreateFileSystemFromBackupRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon FSx", "CreateFileSystemFromBackup");
     try
     {
         #if DESKTOP
         return(client.CreateFileSystemFromBackup(request));
         #elif CORECLR
         return(client.CreateFileSystemFromBackupAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }