putEventConfiguration method
Updates the event configuration settings for the specified event data store or trail. This operation supports updating the maximum event size, adding or modifying context key selectors for event data store, and configuring aggregation settings for the trail.
May throw CloudTrailARNInvalidException.
May throw ConflictException.
May throw EventDataStoreARNInvalidException.
May throw EventDataStoreNotFoundException.
May throw InactiveEventDataStoreException.
May throw InsufficientDependencyServiceAccessPermissionException.
May throw InsufficientIAMAccessPermissionException.
May throw InvalidEventDataStoreCategoryException.
May throw InvalidEventDataStoreStatusException.
May throw InvalidHomeRegionException.
May throw InvalidParameterCombinationException.
May throw InvalidParameterException.
May throw InvalidTrailNameException.
May throw NoManagementAccountSLRExistsException.
May throw NotOrganizationMasterAccountException.
May throw OperationNotPermittedException.
May throw ThrottlingException.
May throw TrailNotFoundException.
May throw UnsupportedOperationException.
Parameter aggregationConfigurations :
The list of aggregation configurations that you want to configure for the
trail.
Parameter contextKeySelectors :
A list of context key selectors that will be included to provide enriched
event data.
Parameter eventDataStore :
The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data
store for which event configuration settings are updated.
Parameter maxEventSize :
The maximum allowed size for events to be stored in the specified event
data store. If you are using context key selectors, MaxEventSize must be
set to Large.
Parameter trailName :
The name of the trail for which you want to update event configuration
settings.
Implementation
Future<PutEventConfigurationResponse> putEventConfiguration({
List<AggregationConfiguration>? aggregationConfigurations,
List<ContextKeySelector>? contextKeySelectors,
String? eventDataStore,
MaxEventSize? maxEventSize,
String? trailName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CloudTrail_20131101.PutEventConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (aggregationConfigurations != null)
'AggregationConfigurations': aggregationConfigurations,
if (contextKeySelectors != null)
'ContextKeySelectors': contextKeySelectors,
if (eventDataStore != null) 'EventDataStore': eventDataStore,
if (maxEventSize != null) 'MaxEventSize': maxEventSize.value,
if (trailName != null) 'TrailName': trailName,
},
);
return PutEventConfigurationResponse.fromJson(jsonResponse.body);
}