deleteKeyword method
Deletes an existing keyword from an origination phone number or pool.
A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, End User Messaging SMS responds with a customizable message.
Keywords "HELP" and "STOP" can't be deleted or modified.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter keyword :
The keyword to delete.
Parameter originationIdentity :
The origination identity to use such as a PhoneNumberId, PhoneNumberArn,
PoolId or PoolArn. You can use DescribePhoneNumbers to find the
values for PhoneNumberId and PhoneNumberArn and DescribePools to
find the values of PoolId and PoolArn.
Implementation
Future<DeleteKeywordResult> deleteKeyword({
required String keyword,
required String originationIdentity,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.DeleteKeyword'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Keyword': keyword,
'OriginationIdentity': originationIdentity,
},
);
return DeleteKeywordResult.fromJson(jsonResponse.body);
}