updateDataSet method

Future<UpdateDataSetResponse> updateDataSet({
  1. required String awsAccountId,
  2. required String dataSetId,
  3. required DataSetImportMode importMode,
  4. required String name,
  5. required Map<String, PhysicalTable> physicalTableMap,
  6. List<ColumnGroup>? columnGroups,
  7. List<ColumnLevelPermissionRule>? columnLevelPermissionRules,
  8. DataPrepConfiguration? dataPrepConfiguration,
  9. DataSetUsageConfiguration? dataSetUsageConfiguration,
  10. List<DatasetParameter>? datasetParameters,
  11. Map<String, FieldFolder>? fieldFolders,
  12. Map<String, LogicalTable>? logicalTableMap,
  13. PerformanceConfiguration? performanceConfiguration,
  14. RowLevelPermissionDataSet? rowLevelPermissionDataSet,
  15. RowLevelPermissionTagConfiguration? rowLevelPermissionTagConfiguration,
  16. SemanticModelConfiguration? semanticModelConfiguration,
})

Updates a dataset. This operation doesn't support datasets that include uploaded files as a source. Partial updates are not supported by this operation.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidDataSetParameterValueException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter awsAccountId : The Amazon Web Services account ID.

Parameter dataSetId : The ID for the dataset that you want to update. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

Parameter importMode : Indicates whether you want to import the data into SPICE.

Parameter name : The display name for the dataset.

Parameter physicalTableMap : Declares the physical tables that are available in the underlying data sources.

Parameter columnGroups : Groupings of columns that work together in certain Amazon Quick Sight features. Currently, only geospatial hierarchy is supported.

Parameter columnLevelPermissionRules : A set of one or more definitions of a ColumnLevelPermissionRule .

Parameter dataPrepConfiguration : The data preparation configuration for the dataset. This configuration defines the source tables, transformation steps, and destination tables used to prepare the data. Required when using the new data preparation experience.

Parameter datasetParameters : The parameter declarations of the dataset.

Parameter fieldFolders : The folder that contains fields and nested subfolders for your dataset.

Parameter logicalTableMap : Configures the combination and transformation of the data from the physical tables. This parameter is used with the legacy data preparation experience.

Parameter performanceConfiguration : The configuration for the performance optimization of the dataset that contains a UniqueKey configuration.

Parameter rowLevelPermissionDataSet : The row-level security configuration for the data you want to create. This parameter is used with the legacy data preparation experience.

Parameter rowLevelPermissionTagConfiguration : The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only. This parameter is used with the legacy data preparation experience.

Parameter semanticModelConfiguration : The semantic model configuration for the dataset. This configuration defines how the prepared data is structured for an analysis, including table mappings and row-level security configurations. Required when using the new data preparation experience.

Implementation

Future<UpdateDataSetResponse> updateDataSet({
  required String awsAccountId,
  required String dataSetId,
  required DataSetImportMode importMode,
  required String name,
  required Map<String, PhysicalTable> physicalTableMap,
  List<ColumnGroup>? columnGroups,
  List<ColumnLevelPermissionRule>? columnLevelPermissionRules,
  DataPrepConfiguration? dataPrepConfiguration,
  DataSetUsageConfiguration? dataSetUsageConfiguration,
  List<DatasetParameter>? datasetParameters,
  Map<String, FieldFolder>? fieldFolders,
  Map<String, LogicalTable>? logicalTableMap,
  PerformanceConfiguration? performanceConfiguration,
  RowLevelPermissionDataSet? rowLevelPermissionDataSet,
  RowLevelPermissionTagConfiguration? rowLevelPermissionTagConfiguration,
  SemanticModelConfiguration? semanticModelConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'ImportMode': importMode.value,
    'Name': name,
    'PhysicalTableMap': physicalTableMap,
    if (columnGroups != null) 'ColumnGroups': columnGroups,
    if (columnLevelPermissionRules != null)
      'ColumnLevelPermissionRules': columnLevelPermissionRules,
    if (dataPrepConfiguration != null)
      'DataPrepConfiguration': dataPrepConfiguration,
    if (dataSetUsageConfiguration != null)
      'DataSetUsageConfiguration': dataSetUsageConfiguration,
    if (datasetParameters != null) 'DatasetParameters': datasetParameters,
    if (fieldFolders != null) 'FieldFolders': fieldFolders,
    if (logicalTableMap != null) 'LogicalTableMap': logicalTableMap,
    if (performanceConfiguration != null)
      'PerformanceConfiguration': performanceConfiguration,
    if (rowLevelPermissionDataSet != null)
      'RowLevelPermissionDataSet': rowLevelPermissionDataSet,
    if (rowLevelPermissionTagConfiguration != null)
      'RowLevelPermissionTagConfiguration':
          rowLevelPermissionTagConfiguration,
    if (semanticModelConfiguration != null)
      'SemanticModelConfiguration': semanticModelConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/data-sets/${Uri.encodeComponent(dataSetId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDataSetResponse.fromJson(response);
}