updateRcsAgent method
Updates the configuration of an existing RCS agent. You can update the opt-out list, deletion protection, two-way messaging settings, and self-managed opt-outs configuration.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter rcsAgentId :
The unique identifier of the RCS agent to update. You can use either the
RcsAgentId or RcsAgentArn.
Parameter deletionProtectionEnabled :
By default this is set to false. When set to true the RCS agent can't be
deleted.
Parameter optOutListName :
The OptOutList to associate with the RCS agent. Valid values are either
OptOutListName or OptOutListArn.
Parameter selfManagedOptOutsEnabled :
By default this is set to false. When set to true you're responsible for
responding to HELP and STOP requests. You're also responsible for tracking
and honoring opt-out requests.
Parameter twoWayChannelArn :
The Amazon Resource Name (ARN) of the two way channel.
Parameter twoWayChannelRole :
An optional IAM Role Arn for a service to assume, to be able to post
inbound SMS messages.
Parameter twoWayEnabled :
By default this is set to false. When set to true you can receive incoming
text messages from your end recipients.
Implementation
Future<UpdateRcsAgentResult> updateRcsAgent({
required String rcsAgentId,
bool? deletionProtectionEnabled,
String? optOutListName,
bool? selfManagedOptOutsEnabled,
String? twoWayChannelArn,
String? twoWayChannelRole,
bool? twoWayEnabled,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.UpdateRcsAgent'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RcsAgentId': rcsAgentId,
if (deletionProtectionEnabled != null)
'DeletionProtectionEnabled': deletionProtectionEnabled,
if (optOutListName != null) 'OptOutListName': optOutListName,
if (selfManagedOptOutsEnabled != null)
'SelfManagedOptOutsEnabled': selfManagedOptOutsEnabled,
if (twoWayChannelArn != null) 'TwoWayChannelArn': twoWayChannelArn,
if (twoWayChannelRole != null) 'TwoWayChannelRole': twoWayChannelRole,
if (twoWayEnabled != null) 'TwoWayEnabled': twoWayEnabled,
},
);
return UpdateRcsAgentResult.fromJson(jsonResponse.body);
}