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 LogDestinationConfig array element to LogDestinationConfigs.
-
Delete a log destination object by removing a single LogDestinationConfig array element from LogDestinationConfigs.
-
Change the LogDestination setting in a single LogDestinationConfig array element.
You can't change the 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.
Parameters:
-
firewall_arn
(Optional[ResourceArn], default:
None
)
–
The Amazon Resource Name (ARN) of the firewall.
You must specify the ARN or the name, and you can specify both.
-
firewall_name
(Optional[ResourceName], default:
None
)
–
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.
-
logging_configuration
(Optional[LoggingConfiguration], default:
None
)
–
Defines how Network Firewall performs logging for a firewall. If you omit this setting, Network Firewall disables logging for the firewall.
-
enable_monitoring_dashboard
(Optional[EnableMonitoringDashboard], default:
None
)
–
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.
Raises:
-
InternalServerError
–
Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.
-
InvalidRequestException
–
The operation failed because of a problem with your request. Examples include:
-
You specified an unsupported parameter name or value.
-
You tried to update a property with a value that isn't among the available types.
-
Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.
-
InvalidTokenException
–
The token you provided is stale or isn't valid for the operation.
-
LogDestinationPermissionException
–
Unable to send logs to a configured logging destination.
-
ResourceNotFoundException
–
Unable to locate a resource using the parameters that you provided.
-
ThrottlingException
–
Unable to process the request due to throttling limitations.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_network_firewall/_services/async_network_firewall.py
| async def update_logging_configuration(
self,
*,
config_overrides: Optional[AsyncNetworkFirewallClientConfig] = None,
firewall_arn: Optional[
"capo_network_firewall.types.resource_arn.ResourceArn"
] = None,
firewall_name: Optional[
"capo_network_firewall.types.resource_name.ResourceName"
] = None,
logging_configuration: Optional[
"capo_network_firewall.types.logging_configuration.LoggingConfiguration"
] = None,
enable_monitoring_dashboard: Optional[
"capo_network_firewall.types.enable_monitoring_dashboard.EnableMonitoringDashboard"
] = None,
) -> "capo_network_firewall.types.update_logging_configuration_response.UpdateLoggingConfigurationResponse":
"""<p>Sets the logging configuration for the specified firewall. </p> <p>To change the logging configuration, retrieve the <a>LoggingConfiguration</a> by calling <a>DescribeLoggingConfiguration</a>, then change it and provide the modified object to this update call. You must change the logging configuration one <a>LogDestinationConfig</a> at a time inside the retrieved <a>LoggingConfiguration</a> object. </p> <p>You can perform only one of the following actions in any call to <code>UpdateLoggingConfiguration</code>: </p> <ul> <li> <p>Create a new log destination object by adding a single <code>LogDestinationConfig</code> array element to <code>LogDestinationConfigs</code>.</p> </li> <li> <p>Delete a log destination object by removing a single <code>LogDestinationConfig</code> array element from <code>LogDestinationConfigs</code>.</p> </li> <li> <p>Change the <code>LogDestination</code> setting in a single <code>LogDestinationConfig</code> array element.</p> </li> </ul> <p>You can't change the <code>LogDestinationType</code> or <code>LogType</code> in a <code>LogDestinationConfig</code>. To change these settings, delete the existing <code>LogDestinationConfig</code> object and create a new one, using two separate calls to this update operation.</p>
Args:
firewall_arn: <p>The Amazon Resource Name (ARN) of the firewall.</p> <p>You must specify the ARN or the name, and you can specify both. </p>
firewall_name: <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p> <p>You must specify the ARN or the name, and you can specify both. </p>
logging_configuration: <p>Defines how Network Firewall performs logging for a firewall. If you omit this setting, Network Firewall disables logging for the firewall.</p>
enable_monitoring_dashboard: <p>A boolean that lets you enable or disable the detailed firewall monitoring dashboard on the firewall. </p> <p>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 <b>Monitoring</b> page of the Network Firewall console.</p> <p> Specify <code>TRUE</code> to enable the the detailed monitoring dashboard on the firewall. Specify <code>FALSE</code> to disable the the detailed monitoring dashboard on the firewall. </p>
Raises:
capo_network_firewall.errors.internal_server_error.InternalServerError: <p>Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. </p>
capo_network_firewall.errors.invalid_request_exception.InvalidRequestException: <p>The operation failed because of a problem with your request. Examples include: </p> <ul> <li> <p>You specified an unsupported parameter name or value.</p> </li> <li> <p>You tried to update a property with a value that isn't among the available types.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.</p> </li> </ul>
capo_network_firewall.errors.invalid_token_exception.InvalidTokenException: <p>The token you provided is stale or isn't valid for the operation. </p>
capo_network_firewall.errors.log_destination_permission_exception.LogDestinationPermissionException: <p>Unable to send logs to a configured logging destination. </p>
capo_network_firewall.errors.resource_not_found_exception.ResourceNotFoundException: <p>Unable to locate a resource using the parameters that you provided.</p>
capo_network_firewall.errors.throttling_exception.ThrottlingException: <p>Unable to process the request due to throttling limitations.</p>
capo_network_firewall.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_network_firewall.types.update_logging_configuration_request.UpdateLoggingConfigurationRequest]",
) -> AsyncOperationResponse[
"capo_network_firewall.types.update_logging_configuration_response.UpdateLoggingConfigurationResponse"
]:
import capo_network_firewall._operations.network_firewall_20201112.update_logging_configuration
(
output,
http_response,
) = await capo_network_firewall._operations.network_firewall_20201112.update_logging_configuration.async_update_logging_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateLoggingConfiguration")
)
input_: capo_network_firewall.types.update_logging_configuration_request.UpdateLoggingConfigurationRequest = {}
if firewall_arn is not None:
input_["firewall_arn"] = firewall_arn
if firewall_name is not None:
input_["firewall_name"] = firewall_name
if logging_configuration is not None:
input_["logging_configuration"] = logging_configuration
if enable_monitoring_dashboard is not None:
input_["enable_monitoring_dashboard"] = enable_monitoring_dashboard
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|