deleteOptedOutNumber method
Deletes an existing opted out destination phone number from the specified opt-out list.
Each destination phone number can only be deleted once every 30 days.
If the specified destination phone number doesn't exist or if the opt-out list doesn't exist, an error is returned.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter optOutListName :
The OptOutListName or OptOutListArn to remove the phone number from.
Parameter optedOutNumber :
The phone number, in E.164 format, to remove from the OptOutList.
Implementation
Future<DeleteOptedOutNumberResult> deleteOptedOutNumber({
required String optOutListName,
required String optedOutNumber,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.DeleteOptedOutNumber'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OptOutListName': optOutListName,
'OptedOutNumber': optedOutNumber,
},
);
return DeleteOptedOutNumberResult.fromJson(jsonResponse.body);
}