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. Map<String, LogicalTable>? logicalTableMap,
  9. RowLevelPermissionDataSet? rowLevelPermissionDataSet,
})

Updates a dataset.

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

Parameter awsAccountId : The AWS account ID.

Parameter dataSetId : The ID for the dataset that you want to update. This ID is unique per AWS Region for each AWS 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 QuickSight features. Currently, only geospatial hierarchy is supported.

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

Parameter logicalTableMap : Configures the combination and transformation of the data from the physical tables.

Parameter rowLevelPermissionDataSet : The row-level security configuration for the data you want to create.

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,
  Map<String, LogicalTable>? logicalTableMap,
  RowLevelPermissionDataSet? rowLevelPermissionDataSet,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(dataSetId, 'dataSetId');
  ArgumentError.checkNotNull(importMode, 'importMode');
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(physicalTableMap, 'physicalTableMap');
  final $payload = <String, dynamic>{
    'ImportMode': importMode.toValue(),
    'Name': name,
    'PhysicalTableMap': physicalTableMap,
    if (columnGroups != null) 'ColumnGroups': columnGroups,
    if (columnLevelPermissionRules != null)
      'ColumnLevelPermissionRules': columnLevelPermissionRules,
    if (logicalTableMap != null) 'LogicalTableMap': logicalTableMap,
    if (rowLevelPermissionDataSet != null)
      'RowLevelPermissionDataSet': rowLevelPermissionDataSet,
  };
  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);
}