updateSenderId method
Updates the configuration of an existing sender ID.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter isoCountryCode :
The two-character code, in ISO 3166-1 alpha-2 format, for the country or
region.
Parameter senderId :
The sender ID to update.
Parameter deletionProtectionEnabled :
By default this is set to false. When set to true the sender ID can't be
deleted.
Implementation
Future<UpdateSenderIdResult> updateSenderId({
required String isoCountryCode,
required String senderId,
bool? deletionProtectionEnabled,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.UpdateSenderId'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IsoCountryCode': isoCountryCode,
'SenderId': senderId,
if (deletionProtectionEnabled != null)
'DeletionProtectionEnabled': deletionProtectionEnabled,
},
);
return UpdateSenderIdResult.fromJson(jsonResponse.body);
}