batchAssociateDataSegmentsToDataset method
Associates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time series data selected from source session datasets. Data segments that belong to the same time series can't overlap in time, regardless of which dataset they belong to.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter associateDataSegmentEntries :
The list of data segment entries to associate with the dataset.
Parameter datasetId :
The ID of the curated dataset to associate data segments with.
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<BatchAssociateDataSegmentsToDatasetResponse>
batchAssociateDataSegmentsToDataset({
required List<AssociateDataSegmentEntry> associateDataSegmentEntries,
required String datasetId,
required String workspaceName,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'associateDataSegmentEntries': associateDataSegmentEntries,
'workspaceName': workspaceName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/datasets/${Uri.encodeComponent(datasetId)}/data-segments/associate',
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return BatchAssociateDataSegmentsToDatasetResponse.fromJson(response);
}