updateDatasetGroup method

Future<void> updateDatasetGroup({
  1. required List<String> datasetArns,
  2. required String datasetGroupArn,
})

Replaces the datasets in a dataset group with the specified datasets.

May throw InvalidInputException. May throw ResourceNotFoundException. May throw ResourceInUseException.

Parameter datasetArns : An array of the Amazon Resource Names (ARNs) of the datasets to add to the dataset group.

Parameter datasetGroupArn : The ARN of the dataset group.

Implementation

Future<void> updateDatasetGroup({
  required List<String> datasetArns,
  required String datasetGroupArn,
}) async {
  ArgumentError.checkNotNull(datasetArns, 'datasetArns');
  ArgumentError.checkNotNull(datasetGroupArn, 'datasetGroupArn');
  _s.validateStringLength(
    'datasetGroupArn',
    datasetGroupArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonForecast.UpdateDatasetGroup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DatasetArns': datasetArns,
      'DatasetGroupArn': datasetGroupArn,
    },
  );
}