updateDataTablePrimaryValues method
Updates the primary values for a record. This operation affects all existing values that are currently associated to the record and its primary values. Users that have restrictions on attributes and/or primary values are not authorized to use this endpoint. The combination of new primary values must be unique within the table.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter dataTableId :
The unique identifier for the data table. Must also accept the table ARN
with or without a version alias. If the version is provided as part of the
identifier or ARN, the version must be one of the two available system
managed aliases, $SAVED or $LATEST.
Parameter instanceId :
The unique identifier for the Amazon Connect instance.
Parameter lockVersion :
The lock version information required for optimistic locking to prevent
concurrent modifications.
Parameter newPrimaryValues :
The new primary values for the record. Required and must include values
for all primary attributes. The combination must be unique within the
table.
Parameter primaryValues :
The current primary values for the record. Required and must include
values for all primary attributes. Fails if the table has primary
attributes and some primary values are omitted.
Implementation
Future<UpdateDataTablePrimaryValuesResponse> updateDataTablePrimaryValues({
required String dataTableId,
required String instanceId,
required DataTableLockVersion lockVersion,
required List<PrimaryValue> newPrimaryValues,
required List<PrimaryValue> primaryValues,
}) async {
final $payload = <String, dynamic>{
'LockVersion': lockVersion,
'NewPrimaryValues': newPrimaryValues,
'PrimaryValues': primaryValues,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/data-tables/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(dataTableId)}/values/update-primary',
exceptionFnMap: _exceptionFns,
);
return UpdateDataTablePrimaryValuesResponse.fromJson(response);
}