예제 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.FSx.Model.CreateVolumeRequest();

            if (cmdletContext.ClientRequestToken != null)
            {
                request.ClientRequestToken = cmdletContext.ClientRequestToken;
            }
            if (cmdletContext.Name != null)
            {
                request.Name = cmdletContext.Name;
            }

            // populate OntapConfiguration
            var requestOntapConfigurationIsNull = true;

            request.OntapConfiguration = new Amazon.FSx.Model.CreateOntapVolumeConfiguration();
            System.String requestOntapConfiguration_ontapConfiguration_JunctionPath = null;
            if (cmdletContext.OntapConfiguration_JunctionPath != null)
            {
                requestOntapConfiguration_ontapConfiguration_JunctionPath = cmdletContext.OntapConfiguration_JunctionPath;
            }
            if (requestOntapConfiguration_ontapConfiguration_JunctionPath != null)
            {
                request.OntapConfiguration.JunctionPath = requestOntapConfiguration_ontapConfiguration_JunctionPath;
                requestOntapConfigurationIsNull         = false;
            }
            Amazon.FSx.SecurityStyle requestOntapConfiguration_ontapConfiguration_SecurityStyle = null;
            if (cmdletContext.OntapConfiguration_SecurityStyle != null)
            {
                requestOntapConfiguration_ontapConfiguration_SecurityStyle = cmdletContext.OntapConfiguration_SecurityStyle;
            }
            if (requestOntapConfiguration_ontapConfiguration_SecurityStyle != null)
            {
                request.OntapConfiguration.SecurityStyle = requestOntapConfiguration_ontapConfiguration_SecurityStyle;
                requestOntapConfigurationIsNull          = false;
            }
            System.Int32?requestOntapConfiguration_ontapConfiguration_SizeInMegabyte = null;
            if (cmdletContext.OntapConfiguration_SizeInMegabyte != null)
            {
                requestOntapConfiguration_ontapConfiguration_SizeInMegabyte = cmdletContext.OntapConfiguration_SizeInMegabyte.Value;
            }
            if (requestOntapConfiguration_ontapConfiguration_SizeInMegabyte != null)
            {
                request.OntapConfiguration.SizeInMegabytes = requestOntapConfiguration_ontapConfiguration_SizeInMegabyte.Value;
                requestOntapConfigurationIsNull            = false;
            }
            System.Boolean?requestOntapConfiguration_ontapConfiguration_StorageEfficiencyEnabled = null;
            if (cmdletContext.OntapConfiguration_StorageEfficiencyEnabled != null)
            {
                requestOntapConfiguration_ontapConfiguration_StorageEfficiencyEnabled = cmdletContext.OntapConfiguration_StorageEfficiencyEnabled.Value;
            }
            if (requestOntapConfiguration_ontapConfiguration_StorageEfficiencyEnabled != null)
            {
                request.OntapConfiguration.StorageEfficiencyEnabled = requestOntapConfiguration_ontapConfiguration_StorageEfficiencyEnabled.Value;
                requestOntapConfigurationIsNull = false;
            }
            System.String requestOntapConfiguration_ontapConfiguration_StorageVirtualMachineId = null;
            if (cmdletContext.OntapConfiguration_StorageVirtualMachineId != null)
            {
                requestOntapConfiguration_ontapConfiguration_StorageVirtualMachineId = cmdletContext.OntapConfiguration_StorageVirtualMachineId;
            }
            if (requestOntapConfiguration_ontapConfiguration_StorageVirtualMachineId != null)
            {
                request.OntapConfiguration.StorageVirtualMachineId = requestOntapConfiguration_ontapConfiguration_StorageVirtualMachineId;
                requestOntapConfigurationIsNull = false;
            }
            Amazon.FSx.Model.TieringPolicy requestOntapConfiguration_ontapConfiguration_TieringPolicy = null;

            // populate TieringPolicy
            var requestOntapConfiguration_ontapConfiguration_TieringPolicyIsNull = true;

            requestOntapConfiguration_ontapConfiguration_TieringPolicy = new Amazon.FSx.Model.TieringPolicy();
            System.Int32?requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_CoolingPeriod = null;
            if (cmdletContext.TieringPolicy_CoolingPeriod != null)
            {
                requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_CoolingPeriod = cmdletContext.TieringPolicy_CoolingPeriod.Value;
            }
            if (requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_CoolingPeriod != null)
            {
                requestOntapConfiguration_ontapConfiguration_TieringPolicy.CoolingPeriod = requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_CoolingPeriod.Value;
                requestOntapConfiguration_ontapConfiguration_TieringPolicyIsNull         = false;
            }
            Amazon.FSx.TieringPolicyName requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_Name = null;
            if (cmdletContext.TieringPolicy_Name != null)
            {
                requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_Name = cmdletContext.TieringPolicy_Name;
            }
            if (requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_Name != null)
            {
                requestOntapConfiguration_ontapConfiguration_TieringPolicy.Name  = requestOntapConfiguration_ontapConfiguration_TieringPolicy_tieringPolicy_Name;
                requestOntapConfiguration_ontapConfiguration_TieringPolicyIsNull = false;
            }
            // determine if requestOntapConfiguration_ontapConfiguration_TieringPolicy should be set to null
            if (requestOntapConfiguration_ontapConfiguration_TieringPolicyIsNull)
            {
                requestOntapConfiguration_ontapConfiguration_TieringPolicy = null;
            }
            if (requestOntapConfiguration_ontapConfiguration_TieringPolicy != null)
            {
                request.OntapConfiguration.TieringPolicy = requestOntapConfiguration_ontapConfiguration_TieringPolicy;
                requestOntapConfigurationIsNull          = false;
            }
            // determine if request.OntapConfiguration should be set to null
            if (requestOntapConfigurationIsNull)
            {
                request.OntapConfiguration = null;
            }

            // populate OpenZFSConfiguration
            var requestOpenZFSConfigurationIsNull = true;

            request.OpenZFSConfiguration = new Amazon.FSx.Model.CreateOpenZFSVolumeConfiguration();
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToSnapshot = null;
            if (cmdletContext.OpenZFSConfiguration_CopyTagsToSnapshot != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToSnapshot = cmdletContext.OpenZFSConfiguration_CopyTagsToSnapshot.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToSnapshot != null)
            {
                request.OpenZFSConfiguration.CopyTagsToSnapshots = requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToSnapshot.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            Amazon.FSx.OpenZFSDataCompressionType requestOpenZFSConfiguration_openZFSConfiguration_DataCompressionType = null;
            if (cmdletContext.OpenZFSConfiguration_DataCompressionType != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DataCompressionType = cmdletContext.OpenZFSConfiguration_DataCompressionType;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DataCompressionType != null)
            {
                request.OpenZFSConfiguration.DataCompressionType = requestOpenZFSConfiguration_openZFSConfiguration_DataCompressionType;
                requestOpenZFSConfigurationIsNull = false;
            }
            List <Amazon.FSx.Model.OpenZFSNfsExport> requestOpenZFSConfiguration_openZFSConfiguration_NfsExport = null;

            if (cmdletContext.OpenZFSConfiguration_NfsExport != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_NfsExport = cmdletContext.OpenZFSConfiguration_NfsExport;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_NfsExport != null)
            {
                request.OpenZFSConfiguration.NfsExports = requestOpenZFSConfiguration_openZFSConfiguration_NfsExport;
                requestOpenZFSConfigurationIsNull       = false;
            }
            System.String requestOpenZFSConfiguration_openZFSConfiguration_ParentVolumeId = null;
            if (cmdletContext.OpenZFSConfiguration_ParentVolumeId != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_ParentVolumeId = cmdletContext.OpenZFSConfiguration_ParentVolumeId;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_ParentVolumeId != null)
            {
                request.OpenZFSConfiguration.ParentVolumeId = requestOpenZFSConfiguration_openZFSConfiguration_ParentVolumeId;
                requestOpenZFSConfigurationIsNull           = false;
            }
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_ReadOnly = null;
            if (cmdletContext.OpenZFSConfiguration_ReadOnly != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_ReadOnly = cmdletContext.OpenZFSConfiguration_ReadOnly.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_ReadOnly != null)
            {
                request.OpenZFSConfiguration.ReadOnly = requestOpenZFSConfiguration_openZFSConfiguration_ReadOnly.Value;
                requestOpenZFSConfigurationIsNull     = false;
            }
            System.Int32?requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityQuotaGiB = null;
            if (cmdletContext.OpenZFSConfiguration_StorageCapacityQuotaGiB != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityQuotaGiB = cmdletContext.OpenZFSConfiguration_StorageCapacityQuotaGiB.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityQuotaGiB != null)
            {
                request.OpenZFSConfiguration.StorageCapacityQuotaGiB = requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityQuotaGiB.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            System.Int32?requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityReservationGiB = null;
            if (cmdletContext.OpenZFSConfiguration_StorageCapacityReservationGiB != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityReservationGiB = cmdletContext.OpenZFSConfiguration_StorageCapacityReservationGiB.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityReservationGiB != null)
            {
                request.OpenZFSConfiguration.StorageCapacityReservationGiB = requestOpenZFSConfiguration_openZFSConfiguration_StorageCapacityReservationGiB.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            List <Amazon.FSx.Model.OpenZFSUserOrGroupQuota> requestOpenZFSConfiguration_openZFSConfiguration_UserAndGroupQuota = null;

            if (cmdletContext.OpenZFSConfiguration_UserAndGroupQuota != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_UserAndGroupQuota = cmdletContext.OpenZFSConfiguration_UserAndGroupQuota;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_UserAndGroupQuota != null)
            {
                request.OpenZFSConfiguration.UserAndGroupQuotas = requestOpenZFSConfiguration_openZFSConfiguration_UserAndGroupQuota;
                requestOpenZFSConfigurationIsNull = false;
            }
            Amazon.FSx.Model.CreateOpenZFSOriginSnapshotConfiguration requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot = null;

            // populate OriginSnapshot
            var requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshotIsNull = true;

            requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot = new Amazon.FSx.Model.CreateOpenZFSOriginSnapshotConfiguration();
            Amazon.FSx.OpenZFSCopyStrategy requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_CopyStrategy = null;
            if (cmdletContext.OriginSnapshot_CopyStrategy != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_CopyStrategy = cmdletContext.OriginSnapshot_CopyStrategy;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_CopyStrategy != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot.CopyStrategy = requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_CopyStrategy;
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshotIsNull        = false;
            }
            System.String requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_SnapshotARN = null;
            if (cmdletContext.OriginSnapshot_SnapshotARN != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_SnapshotARN = cmdletContext.OriginSnapshot_SnapshotARN;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_SnapshotARN != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot.SnapshotARN = requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot_originSnapshot_SnapshotARN;
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshotIsNull       = false;
            }
            // determine if requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot should be set to null
            if (requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshotIsNull)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot = null;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot != null)
            {
                request.OpenZFSConfiguration.OriginSnapshot = requestOpenZFSConfiguration_openZFSConfiguration_OriginSnapshot;
                requestOpenZFSConfigurationIsNull           = false;
            }
            // determine if request.OpenZFSConfiguration should be set to null
            if (requestOpenZFSConfigurationIsNull)
            {
                request.OpenZFSConfiguration = null;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }
            if (cmdletContext.VolumeType != null)
            {
                request.VolumeType = cmdletContext.VolumeType;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.FSx.Model.CreateFileSystemFromBackupRequest();

            if (cmdletContext.BackupId != null)
            {
                request.BackupId = cmdletContext.BackupId;
            }
            if (cmdletContext.ClientRequestToken != null)
            {
                request.ClientRequestToken = cmdletContext.ClientRequestToken;
            }
            if (cmdletContext.FileSystemTypeVersion != null)
            {
                request.FileSystemTypeVersion = cmdletContext.FileSystemTypeVersion;
            }
            if (cmdletContext.KmsKeyId != null)
            {
                request.KmsKeyId = cmdletContext.KmsKeyId;
            }
            if (cmdletContext.LustreConfiguration != null)
            {
                request.LustreConfiguration = cmdletContext.LustreConfiguration;
            }

            // populate OpenZFSConfiguration
            var requestOpenZFSConfigurationIsNull = true;

            request.OpenZFSConfiguration = new Amazon.FSx.Model.CreateFileSystemOpenZFSConfiguration();
            System.Int32?requestOpenZFSConfiguration_openZFSConfiguration_AutomaticBackupRetentionDay = null;
            if (cmdletContext.OpenZFSConfiguration_AutomaticBackupRetentionDay != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_AutomaticBackupRetentionDay = cmdletContext.OpenZFSConfiguration_AutomaticBackupRetentionDay.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_AutomaticBackupRetentionDay != null)
            {
                request.OpenZFSConfiguration.AutomaticBackupRetentionDays = requestOpenZFSConfiguration_openZFSConfiguration_AutomaticBackupRetentionDay.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToBackup = null;
            if (cmdletContext.OpenZFSConfiguration_CopyTagsToBackup != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToBackup = cmdletContext.OpenZFSConfiguration_CopyTagsToBackup.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToBackup != null)
            {
                request.OpenZFSConfiguration.CopyTagsToBackups = requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToBackup.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToVolume = null;
            if (cmdletContext.OpenZFSConfiguration_CopyTagsToVolume != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToVolume = cmdletContext.OpenZFSConfiguration_CopyTagsToVolume.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToVolume != null)
            {
                request.OpenZFSConfiguration.CopyTagsToVolumes = requestOpenZFSConfiguration_openZFSConfiguration_CopyTagsToVolume.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            System.String requestOpenZFSConfiguration_openZFSConfiguration_DailyAutomaticBackupStartTime = null;
            if (cmdletContext.OpenZFSConfiguration_DailyAutomaticBackupStartTime != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DailyAutomaticBackupStartTime = cmdletContext.OpenZFSConfiguration_DailyAutomaticBackupStartTime;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DailyAutomaticBackupStartTime != null)
            {
                request.OpenZFSConfiguration.DailyAutomaticBackupStartTime = requestOpenZFSConfiguration_openZFSConfiguration_DailyAutomaticBackupStartTime;
                requestOpenZFSConfigurationIsNull = false;
            }
            Amazon.FSx.OpenZFSDeploymentType requestOpenZFSConfiguration_openZFSConfiguration_DeploymentType = null;
            if (cmdletContext.OpenZFSConfiguration_DeploymentType != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DeploymentType = cmdletContext.OpenZFSConfiguration_DeploymentType;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DeploymentType != null)
            {
                request.OpenZFSConfiguration.DeploymentType = requestOpenZFSConfiguration_openZFSConfiguration_DeploymentType;
                requestOpenZFSConfigurationIsNull           = false;
            }
            System.Int32?requestOpenZFSConfiguration_openZFSConfiguration_ThroughputCapacity = null;
            if (cmdletContext.OpenZFSConfiguration_ThroughputCapacity != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_ThroughputCapacity = cmdletContext.OpenZFSConfiguration_ThroughputCapacity.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_ThroughputCapacity != null)
            {
                request.OpenZFSConfiguration.ThroughputCapacity = requestOpenZFSConfiguration_openZFSConfiguration_ThroughputCapacity.Value;
                requestOpenZFSConfigurationIsNull = false;
            }
            System.String requestOpenZFSConfiguration_openZFSConfiguration_WeeklyMaintenanceStartTime = null;
            if (cmdletContext.OpenZFSConfiguration_WeeklyMaintenanceStartTime != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_WeeklyMaintenanceStartTime = cmdletContext.OpenZFSConfiguration_WeeklyMaintenanceStartTime;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_WeeklyMaintenanceStartTime != null)
            {
                request.OpenZFSConfiguration.WeeklyMaintenanceStartTime = requestOpenZFSConfiguration_openZFSConfiguration_WeeklyMaintenanceStartTime;
                requestOpenZFSConfigurationIsNull = false;
            }
            Amazon.FSx.Model.DiskIopsConfiguration requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration = null;

            // populate DiskIopsConfiguration
            var requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfigurationIsNull = true;

            requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration = new Amazon.FSx.Model.DiskIopsConfiguration();
            System.Int64?requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Iops = null;
            if (cmdletContext.DiskIopsConfiguration_Iops != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Iops = cmdletContext.DiskIopsConfiguration_Iops.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Iops != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration.Iops  = requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Iops.Value;
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfigurationIsNull = false;
            }
            Amazon.FSx.DiskIopsConfigurationMode requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Mode = null;
            if (cmdletContext.DiskIopsConfiguration_Mode != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Mode = cmdletContext.DiskIopsConfiguration_Mode;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Mode != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration.Mode  = requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration_diskIopsConfiguration_Mode;
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfigurationIsNull = false;
            }
            // determine if requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration should be set to null
            if (requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfigurationIsNull)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration = null;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration != null)
            {
                request.OpenZFSConfiguration.DiskIopsConfiguration = requestOpenZFSConfiguration_openZFSConfiguration_DiskIopsConfiguration;
                requestOpenZFSConfigurationIsNull = false;
            }
            Amazon.FSx.Model.OpenZFSCreateRootVolumeConfiguration requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration = null;

            // populate RootVolumeConfiguration
            var requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull = true;

            requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration = new Amazon.FSx.Model.OpenZFSCreateRootVolumeConfiguration();
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_CopyTagsToSnapshot = null;
            if (cmdletContext.RootVolumeConfiguration_CopyTagsToSnapshot != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_CopyTagsToSnapshot = cmdletContext.RootVolumeConfiguration_CopyTagsToSnapshot.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_CopyTagsToSnapshot != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration.CopyTagsToSnapshots = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_CopyTagsToSnapshot.Value;
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull = false;
            }
            Amazon.FSx.OpenZFSDataCompressionType requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_DataCompressionType = null;
            if (cmdletContext.RootVolumeConfiguration_DataCompressionType != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_DataCompressionType = cmdletContext.RootVolumeConfiguration_DataCompressionType;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_DataCompressionType != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration.DataCompressionType = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_DataCompressionType;
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull = false;
            }
            List <Amazon.FSx.Model.OpenZFSNfsExport> requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_NfsExport = null;

            if (cmdletContext.RootVolumeConfiguration_NfsExport != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_NfsExport = cmdletContext.RootVolumeConfiguration_NfsExport;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_NfsExport != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration.NfsExports = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_NfsExport;
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull      = false;
            }
            System.Boolean?requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_ReadOnly = null;
            if (cmdletContext.RootVolumeConfiguration_ReadOnly != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_ReadOnly = cmdletContext.RootVolumeConfiguration_ReadOnly.Value;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_ReadOnly != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration.ReadOnly = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_ReadOnly.Value;
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull    = false;
            }
            List <Amazon.FSx.Model.OpenZFSUserOrGroupQuota> requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_UserAndGroupQuota = null;

            if (cmdletContext.RootVolumeConfiguration_UserAndGroupQuota != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_UserAndGroupQuota = cmdletContext.RootVolumeConfiguration_UserAndGroupQuota;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_UserAndGroupQuota != null)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration.UserAndGroupQuotas = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration_rootVolumeConfiguration_UserAndGroupQuota;
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull = false;
            }
            // determine if requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration should be set to null
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfigurationIsNull)
            {
                requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration = null;
            }
            if (requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration != null)
            {
                request.OpenZFSConfiguration.RootVolumeConfiguration = requestOpenZFSConfiguration_openZFSConfiguration_RootVolumeConfiguration;
                requestOpenZFSConfigurationIsNull = false;
            }
            // determine if request.OpenZFSConfiguration should be set to null
            if (requestOpenZFSConfigurationIsNull)
            {
                request.OpenZFSConfiguration = null;
            }
            if (cmdletContext.SecurityGroupId != null)
            {
                request.SecurityGroupIds = cmdletContext.SecurityGroupId;
            }
            if (cmdletContext.StorageType != null)
            {
                request.StorageType = cmdletContext.StorageType;
            }
            if (cmdletContext.SubnetId != null)
            {
                request.SubnetIds = cmdletContext.SubnetId;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }
            if (cmdletContext.WindowsConfiguration != null)
            {
                request.WindowsConfiguration = cmdletContext.WindowsConfiguration;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }