public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.QuickSight.Model.UpdateDataSetRequest(); if (cmdletContext.AwsAccountId != null) { request.AwsAccountId = cmdletContext.AwsAccountId; } if (cmdletContext.ColumnGroup != null) { request.ColumnGroups = cmdletContext.ColumnGroup; } if (cmdletContext.DataSetId != null) { request.DataSetId = cmdletContext.DataSetId; } if (cmdletContext.ImportMode != null) { request.ImportMode = cmdletContext.ImportMode; } if (cmdletContext.LogicalTableMap != null) { request.LogicalTableMap = cmdletContext.LogicalTableMap; } if (cmdletContext.Name != null) { request.Name = cmdletContext.Name; } if (cmdletContext.PhysicalTableMap != null) { request.PhysicalTableMap = cmdletContext.PhysicalTableMap; } // populate RowLevelPermissionDataSet var requestRowLevelPermissionDataSetIsNull = true; request.RowLevelPermissionDataSet = new Amazon.QuickSight.Model.RowLevelPermissionDataSet(); System.String requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn = null; if (cmdletContext.RowLevelPermissionDataSet_Arn != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn = cmdletContext.RowLevelPermissionDataSet_Arn; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn != null) { request.RowLevelPermissionDataSet.Arn = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn; requestRowLevelPermissionDataSetIsNull = false; } System.String requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace = null; if (cmdletContext.RowLevelPermissionDataSet_Namespace != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace = cmdletContext.RowLevelPermissionDataSet_Namespace; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace != null) { request.RowLevelPermissionDataSet.Namespace = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace; requestRowLevelPermissionDataSetIsNull = false; } Amazon.QuickSight.RowLevelPermissionPolicy requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy = null; if (cmdletContext.RowLevelPermissionDataSet_PermissionPolicy != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy = cmdletContext.RowLevelPermissionDataSet_PermissionPolicy; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy != null) { request.RowLevelPermissionDataSet.PermissionPolicy = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy; requestRowLevelPermissionDataSetIsNull = false; } // determine if request.RowLevelPermissionDataSet should be set to null if (requestRowLevelPermissionDataSetIsNull) { request.RowLevelPermissionDataSet = null; } 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); }
private Amazon.QuickSight.Model.UpdateDataSetResponse CallAWSServiceOperation(IAmazonQuickSight client, Amazon.QuickSight.Model.UpdateDataSetRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QuickSight", "UpdateDataSet"); try { #if DESKTOP return(client.UpdateDataSet(request)); #elif CORECLR return(client.UpdateDataSetAsync(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; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.QuickSight.Model.UpdateDataSetRequest(); if (cmdletContext.AwsAccountId != null) { request.AwsAccountId = cmdletContext.AwsAccountId; } if (cmdletContext.ColumnGroup != null) { request.ColumnGroups = cmdletContext.ColumnGroup; } if (cmdletContext.ColumnLevelPermissionRule != null) { request.ColumnLevelPermissionRules = cmdletContext.ColumnLevelPermissionRule; } if (cmdletContext.DataSetId != null) { request.DataSetId = cmdletContext.DataSetId; } // populate DataSetUsageConfiguration var requestDataSetUsageConfigurationIsNull = true; request.DataSetUsageConfiguration = new Amazon.QuickSight.Model.DataSetUsageConfiguration(); System.Boolean?requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsDirectQuerySource = null; if (cmdletContext.DataSetUsageConfiguration_DisableUseAsDirectQuerySource != null) { requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsDirectQuerySource = cmdletContext.DataSetUsageConfiguration_DisableUseAsDirectQuerySource.Value; } if (requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsDirectQuerySource != null) { request.DataSetUsageConfiguration.DisableUseAsDirectQuerySource = requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsDirectQuerySource.Value; requestDataSetUsageConfigurationIsNull = false; } System.Boolean?requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsImportedSource = null; if (cmdletContext.DataSetUsageConfiguration_DisableUseAsImportedSource != null) { requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsImportedSource = cmdletContext.DataSetUsageConfiguration_DisableUseAsImportedSource.Value; } if (requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsImportedSource != null) { request.DataSetUsageConfiguration.DisableUseAsImportedSource = requestDataSetUsageConfiguration_dataSetUsageConfiguration_DisableUseAsImportedSource.Value; requestDataSetUsageConfigurationIsNull = false; } // determine if request.DataSetUsageConfiguration should be set to null if (requestDataSetUsageConfigurationIsNull) { request.DataSetUsageConfiguration = null; } if (cmdletContext.FieldFolder != null) { request.FieldFolders = cmdletContext.FieldFolder; } if (cmdletContext.ImportMode != null) { request.ImportMode = cmdletContext.ImportMode; } if (cmdletContext.LogicalTableMap != null) { request.LogicalTableMap = cmdletContext.LogicalTableMap; } if (cmdletContext.Name != null) { request.Name = cmdletContext.Name; } if (cmdletContext.PhysicalTableMap != null) { request.PhysicalTableMap = cmdletContext.PhysicalTableMap; } // populate RowLevelPermissionDataSet var requestRowLevelPermissionDataSetIsNull = true; request.RowLevelPermissionDataSet = new Amazon.QuickSight.Model.RowLevelPermissionDataSet(); System.String requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn = null; if (cmdletContext.RowLevelPermissionDataSet_Arn != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn = cmdletContext.RowLevelPermissionDataSet_Arn; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn != null) { request.RowLevelPermissionDataSet.Arn = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Arn; requestRowLevelPermissionDataSetIsNull = false; } Amazon.QuickSight.RowLevelPermissionFormatVersion requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_FormatVersion = null; if (cmdletContext.RowLevelPermissionDataSet_FormatVersion != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_FormatVersion = cmdletContext.RowLevelPermissionDataSet_FormatVersion; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_FormatVersion != null) { request.RowLevelPermissionDataSet.FormatVersion = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_FormatVersion; requestRowLevelPermissionDataSetIsNull = false; } System.String requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace = null; if (cmdletContext.RowLevelPermissionDataSet_Namespace != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace = cmdletContext.RowLevelPermissionDataSet_Namespace; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace != null) { request.RowLevelPermissionDataSet.Namespace = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Namespace; requestRowLevelPermissionDataSetIsNull = false; } Amazon.QuickSight.RowLevelPermissionPolicy requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy = null; if (cmdletContext.RowLevelPermissionDataSet_PermissionPolicy != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy = cmdletContext.RowLevelPermissionDataSet_PermissionPolicy; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy != null) { request.RowLevelPermissionDataSet.PermissionPolicy = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_PermissionPolicy; requestRowLevelPermissionDataSetIsNull = false; } Amazon.QuickSight.Status requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Status = null; if (cmdletContext.RowLevelPermissionDataSet_Status != null) { requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Status = cmdletContext.RowLevelPermissionDataSet_Status; } if (requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Status != null) { request.RowLevelPermissionDataSet.Status = requestRowLevelPermissionDataSet_rowLevelPermissionDataSet_Status; requestRowLevelPermissionDataSetIsNull = false; } // determine if request.RowLevelPermissionDataSet should be set to null if (requestRowLevelPermissionDataSetIsNull) { request.RowLevelPermissionDataSet = null; } // populate RowLevelPermissionTagConfiguration var requestRowLevelPermissionTagConfigurationIsNull = true; request.RowLevelPermissionTagConfiguration = new Amazon.QuickSight.Model.RowLevelPermissionTagConfiguration(); Amazon.QuickSight.Status requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_Status = null; if (cmdletContext.RowLevelPermissionTagConfiguration_Status != null) { requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_Status = cmdletContext.RowLevelPermissionTagConfiguration_Status; } if (requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_Status != null) { request.RowLevelPermissionTagConfiguration.Status = requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_Status; requestRowLevelPermissionTagConfigurationIsNull = false; } List <Amazon.QuickSight.Model.RowLevelPermissionTagRule> requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_TagRule = null; if (cmdletContext.RowLevelPermissionTagConfiguration_TagRule != null) { requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_TagRule = cmdletContext.RowLevelPermissionTagConfiguration_TagRule; } if (requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_TagRule != null) { request.RowLevelPermissionTagConfiguration.TagRules = requestRowLevelPermissionTagConfiguration_rowLevelPermissionTagConfiguration_TagRule; requestRowLevelPermissionTagConfigurationIsNull = false; } // determine if request.RowLevelPermissionTagConfiguration should be set to null if (requestRowLevelPermissionTagConfigurationIsNull) { request.RowLevelPermissionTagConfiguration = null; } 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); }