updateLoggingConfiguration method
Sets the logging configuration for the specified firewall.
To change the logging configuration, retrieve the LoggingConfiguration by calling DescribeLoggingConfiguration, then change it and provide the modified object to this update call. You must change the logging configuration one LogDestinationConfig at a time inside the retrieved LoggingConfiguration object.
You can perform only one of the following actions in any call to
UpdateLoggingConfiguration:
-
Create a new log destination object by adding a single
LogDestinationConfigarray element toLogDestinationConfigs. -
Delete a log destination object by removing a single
LogDestinationConfigarray element fromLogDestinationConfigs. -
Change the
LogDestinationsetting in a singleLogDestinationConfigarray element.
LogDestinationType or
LogType in a LogDestinationConfig. To change
these settings, delete the existing LogDestinationConfig
object and create a new one, using two separate calls to this update
operation.
May throw InternalServerError.
May throw InvalidRequestException.
May throw InvalidTokenException.
May throw LogDestinationPermissionException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter enableMonitoringDashboard :
A boolean that lets you enable or disable the detailed firewall monitoring
dashboard on the firewall.
The monitoring dashboard provides comprehensive visibility into your firewall's flow logs and alert logs. After you enable detailed monitoring, you can access these dashboards directly from the Monitoring page of the Network Firewall console.
Specify TRUE to enable the the detailed monitoring dashboard
on the firewall. Specify FALSE to disable the the detailed
monitoring dashboard on the firewall.
Parameter firewallArn :
The Amazon Resource Name (ARN) of the firewall.
You must specify the ARN or the name, and you can specify both.
Parameter firewallName :
The descriptive name of the firewall. You can't change the name of a
firewall after you create it.
You must specify the ARN or the name, and you can specify both.
Parameter loggingConfiguration :
Defines how Network Firewall performs logging for a firewall. If you omit
this setting, Network Firewall disables logging for the firewall.
Implementation
Future<UpdateLoggingConfigurationResponse> updateLoggingConfiguration({
bool? enableMonitoringDashboard,
String? firewallArn,
String? firewallName,
LoggingConfiguration? loggingConfiguration,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'NetworkFirewall_20201112.UpdateLoggingConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (enableMonitoringDashboard != null)
'EnableMonitoringDashboard': enableMonitoringDashboard,
if (firewallArn != null) 'FirewallArn': firewallArn,
if (firewallName != null) 'FirewallName': firewallName,
if (loggingConfiguration != null)
'LoggingConfiguration': loggingConfiguration,
},
);
return UpdateLoggingConfigurationResponse.fromJson(jsonResponse.body);
}