updateWatchlist method
Updates the specified watchlist. Every domain has a default watchlist which cannot be updated.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
The identifier of the domain that contains the watchlist.
Parameter watchlistId :
The identifier of the watchlist to be updated.
Parameter description :
A brief description about this watchlist.
Parameter name :
The name of the watchlist.
Implementation
Future<UpdateWatchlistResponse> updateWatchlist({
required String domainId,
required String watchlistId,
String? description,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'VoiceID.UpdateWatchlist'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DomainId': domainId,
'WatchlistId': watchlistId,
if (description != null) 'Description': description,
if (name != null) 'Name': name,
},
);
return UpdateWatchlistResponse.fromJson(jsonResponse.body);
}