batchDisassociateDataSegmentsFromDataset method

Future<BatchDisassociateDataSegmentsFromDatasetResponse> batchDisassociateDataSegmentsFromDataset({
  1. required String datasetId,
  2. required List<DisassociateDataSegmentEntry> disassociateDataSegmentEntries,
  3. required String workspaceName,
  4. String? clientToken,
})

Disassociates a batch of data segments from a curated dataset. Disassociating a data segment doesn't delete the underlying data in the source session dataset.

May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter datasetId : The ID of the curated dataset to disassociate data segments from.

Parameter disassociateDataSegmentEntries : The list of data segment entries to disassociate from the dataset.

Parameter workspaceName : The name of the workspace that contains the dataset.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure that the request is idempotent. If you retry a request that completed successfully using the same client token, the retry succeeds without performing any further actions.

Implementation

Future<BatchDisassociateDataSegmentsFromDatasetResponse>
    batchDisassociateDataSegmentsFromDataset({
  required String datasetId,
  required List<DisassociateDataSegmentEntry> disassociateDataSegmentEntries,
  required String workspaceName,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'disassociateDataSegmentEntries': disassociateDataSegmentEntries,
    'workspaceName': workspaceName,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/datasets/${Uri.encodeComponent(datasetId)}/data-segments/disassociate',
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return BatchDisassociateDataSegmentsFromDatasetResponse.fromJson(response);
}