updateRcsAgent method
- required String rcsAgentId,
- bool? deletionProtectionEnabled,
- String? optOutListName,
- bool? selfManagedOptOutsEnabled,
- String? twoWayChannelArn,
- String? twoWayChannelRole,
- bool? twoWayEnabled,
- String? twoWayMediaS3BucketName,
- String? twoWayMediaS3KeyPrefix,
- String? twoWayMediaS3Role,
- List<
String> ? twoWayRcsEventsEnabled,
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.
Parameter twoWayMediaS3BucketName :
The name of the S3 bucket where inbound RCS media files are stored.
Two-way messaging must be enabled on the agent. To remove the media
configuration, pass the sentinel value
UNSET_RCS_MEDIA_CONFIGURATION for both this field and
TwoWayMediaS3Role.
Parameter twoWayMediaS3KeyPrefix :
The key prefix used for inbound RCS media objects in the S3 bucket.
Parameter twoWayMediaS3Role :
The ARN of the IAM role used to write inbound RCS media files to the S3
bucket. The role must have s3:PutObject permission on the
bucket and a trust policy allowing sms-voice.amazonaws.com to
assume it. To remove the media configuration, pass the sentinel value
UNSET_RCS_MEDIA_CONFIGURATION for both this field and
TwoWayMediaS3BucketName.
Parameter twoWayRcsEventsEnabled :
The list of RCS event types to enable for two-way messaging. Pass an empty
list to disable all event types. The special value ALL
enables all current and future event types and must be the sole element if
used.
Implementation
Future<UpdateRcsAgentResult> updateRcsAgent({
required String rcsAgentId,
bool? deletionProtectionEnabled,
String? optOutListName,
bool? selfManagedOptOutsEnabled,
String? twoWayChannelArn,
String? twoWayChannelRole,
bool? twoWayEnabled,
String? twoWayMediaS3BucketName,
String? twoWayMediaS3KeyPrefix,
String? twoWayMediaS3Role,
List<String>? twoWayRcsEventsEnabled,
}) 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,
if (twoWayMediaS3BucketName != null)
'TwoWayMediaS3BucketName': twoWayMediaS3BucketName,
if (twoWayMediaS3KeyPrefix != null)
'TwoWayMediaS3KeyPrefix': twoWayMediaS3KeyPrefix,
if (twoWayMediaS3Role != null) 'TwoWayMediaS3Role': twoWayMediaS3Role,
if (twoWayRcsEventsEnabled != null)
'TwoWayRcsEventsEnabled': twoWayRcsEventsEnabled,
},
);
return UpdateRcsAgentResult.fromJson(jsonResponse.body);
}