batchDeleteDatasetDataSegments method
Deletes a batch of data segments from a session dataset. Deleting a data segment deletes the underlying time series data for the segment's time range.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter datasetId :
The ID of the session dataset from which to delete data segments.
Parameter deleteDataSegmentEntries :
The list of data segment entries to delete.
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<BatchDeleteDatasetDataSegmentsResponse>
batchDeleteDatasetDataSegments({
required String datasetId,
required List<DeleteDataSegmentEntry> deleteDataSegmentEntries,
required String workspaceName,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'deleteDataSegmentEntries': deleteDataSegmentEntries,
'workspaceName': workspaceName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/datasets/${Uri.encodeComponent(datasetId)}/data-segments/batch-delete',
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return BatchDeleteDatasetDataSegmentsResponse.fromJson(response);
}