updateChannel method
Updates a channel specified by a required channel ARN or UUID.
May throw ChannelAlreadyExistsException.
May throw ChannelARNInvalidException.
May throw ChannelNotFoundException.
May throw EventDataStoreARNInvalidException.
May throw EventDataStoreNotFoundException.
May throw InactiveEventDataStoreException.
May throw InvalidEventDataStoreCategoryException.
May throw InvalidParameterException.
May throw OperationNotPermittedException.
May throw UnsupportedOperationException.
Parameter channel :
The ARN or ID (the ARN suffix) of the channel that you want to update.
Parameter destinations :
The ARNs of event data stores that you want to log events arriving through
the channel.
Parameter name :
Changes the name of the channel.
Implementation
Future<UpdateChannelResponse> updateChannel({
required String channel,
List<Destination>? destinations,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CloudTrail_20131101.UpdateChannel'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Channel': channel,
if (destinations != null) 'Destinations': destinations,
if (name != null) 'Name': name,
},
);
return UpdateChannelResponse.fromJson(jsonResponse.body);
}