deleteOptOutList method
Deletes an existing opt-out list. All opted out phone numbers in the opt-out list are deleted.
If the specified opt-out list name doesn't exist or is in-use by an origination phone number or pool, 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 of the OptOutList to delete. You can
use DescribeOptOutLists to find the values for OptOutListName and
OptOutListArn.
Implementation
Future<DeleteOptOutListResult> deleteOptOutList({
required String optOutListName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.DeleteOptOutList'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OptOutListName': optOutListName,
},
);
return DeleteOptOutListResult.fromJson(jsonResponse.body);
}