@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class LoggingConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
Defines an association between logging destinations and a web ACL resource, for logging from WAF. As part of the association, you can specify parts of the standard logging fields to keep out of the logs and you can specify filters so that you log only a subset of the logging records.
You can define one logging destination per web ACL.
You can access information about the traffic that WAF inspects using the following steps:
Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose.
The name that you give the destination must start with aws-waf-logs-
. Depending on the type of
destination, you might need to configure additional settings or permissions.
For configuration requirements and pricing information for each destination type, see Logging web ACL traffic in the WAF Developer Guide.
Associate your logging destination to your web ACL using a PutLoggingConfiguration
request.
When you successfully enable logging using a PutLoggingConfiguration
request, WAF creates an additional
role or policy that is required to write logs to the logging destination. For an Amazon CloudWatch Logs log group,
WAF creates a resource policy on the log group. For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon
Kinesis Data Firehose, WAF creates a service-linked role.
For additional information about web ACL logging, see Logging web ACL traffic information in the WAF Developer Guide.
Constructor and Description |
---|
LoggingConfiguration() |
Modifier and Type | Method and Description |
---|---|
LoggingConfiguration |
clone() |
boolean |
equals(Object obj) |
List<String> |
getLogDestinationConfigs()
The logging destination configuration that you want to associate with the web ACL.
|
LoggingFilter |
getLoggingFilter()
Filtering that specifies which web requests are kept in the logs and which are dropped.
|
String |
getLogScope()
The owner of the logging configuration, which must be set to
CUSTOMER for the configurations that
you manage. |
String |
getLogType()
Used to distinguish between various logging options.
|
Boolean |
getManagedByFirewallManager()
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration.
|
List<FieldToMatch> |
getRedactedFields()
The parts of the request that you want to keep out of the logs.
|
String |
getResourceArn()
The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs . |
int |
hashCode() |
Boolean |
isManagedByFirewallManager()
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setLogDestinationConfigs(Collection<String> logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
|
void |
setLoggingFilter(LoggingFilter loggingFilter)
Filtering that specifies which web requests are kept in the logs and which are dropped.
|
void |
setLogScope(String logScope)
The owner of the logging configuration, which must be set to
CUSTOMER for the configurations that
you manage. |
void |
setLogType(String logType)
Used to distinguish between various logging options.
|
void |
setManagedByFirewallManager(Boolean managedByFirewallManager)
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration.
|
void |
setRedactedFields(Collection<FieldToMatch> redactedFields)
The parts of the request that you want to keep out of the logs.
|
void |
setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs . |
String |
toString()
Returns a string representation of this object.
|
LoggingConfiguration |
withLogDestinationConfigs(Collection<String> logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
|
LoggingConfiguration |
withLogDestinationConfigs(String... logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
|
LoggingConfiguration |
withLoggingFilter(LoggingFilter loggingFilter)
Filtering that specifies which web requests are kept in the logs and which are dropped.
|
LoggingConfiguration |
withLogScope(LogScope logScope)
The owner of the logging configuration, which must be set to
CUSTOMER for the configurations that
you manage. |
LoggingConfiguration |
withLogScope(String logScope)
The owner of the logging configuration, which must be set to
CUSTOMER for the configurations that
you manage. |
LoggingConfiguration |
withLogType(LogType logType)
Used to distinguish between various logging options.
|
LoggingConfiguration |
withLogType(String logType)
Used to distinguish between various logging options.
|
LoggingConfiguration |
withManagedByFirewallManager(Boolean managedByFirewallManager)
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration.
|
LoggingConfiguration |
withRedactedFields(Collection<FieldToMatch> redactedFields)
The parts of the request that you want to keep out of the logs.
|
LoggingConfiguration |
withRedactedFields(FieldToMatch... redactedFields)
The parts of the request that you want to keep out of the logs.
|
LoggingConfiguration |
withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs . |
public void setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs
.
resourceArn
- The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs
.public String getResourceArn()
The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs
.
LogDestinationConfigs
.public LoggingConfiguration withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with LogDestinationConfigs
.
resourceArn
- The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs
.public List<String> getLogDestinationConfigs()
The logging destination configuration that you want to associate with the web ACL.
You can associate one logging destination to a web ACL.
You can associate one logging destination to a web ACL.
public void setLogDestinationConfigs(Collection<String> logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
You can associate one logging destination to a web ACL.
logDestinationConfigs
- The logging destination configuration that you want to associate with the web ACL. You can associate one logging destination to a web ACL.
public LoggingConfiguration withLogDestinationConfigs(String... logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
You can associate one logging destination to a web ACL.
NOTE: This method appends the values to the existing list (if any). Use
setLogDestinationConfigs(java.util.Collection)
or
withLogDestinationConfigs(java.util.Collection)
if you want to override the existing values.
logDestinationConfigs
- The logging destination configuration that you want to associate with the web ACL. You can associate one logging destination to a web ACL.
public LoggingConfiguration withLogDestinationConfigs(Collection<String> logDestinationConfigs)
The logging destination configuration that you want to associate with the web ACL.
You can associate one logging destination to a web ACL.
logDestinationConfigs
- The logging destination configuration that you want to associate with the web ACL. You can associate one logging destination to a web ACL.
public List<FieldToMatch> getRedactedFields()
The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs will be
REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting, so the
SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs
will be REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting,
so the SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
public void setRedactedFields(Collection<FieldToMatch> redactedFields)
The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs will be
REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting, so the
SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
redactedFields
- The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs
will be REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting,
so the SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
public LoggingConfiguration withRedactedFields(FieldToMatch... redactedFields)
The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs will be
REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting, so the
SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
NOTE: This method appends the values to the existing list (if any). Use
setRedactedFields(java.util.Collection)
or withRedactedFields(java.util.Collection)
if you want
to override the existing values.
redactedFields
- The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs
will be REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting,
so the SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
public LoggingConfiguration withRedactedFields(Collection<FieldToMatch> redactedFields)
The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs will be
REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting, so the
SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
redactedFields
- The parts of the request that you want to keep out of the logs.
For example, if you redact the SingleHeader
field, the HEADER
field in the logs
will be REDACTED
for all rules that use the SingleHeader
FieldToMatch
setting.
Redaction applies only to the component that's specified in the rule's FieldToMatch
setting,
so the SingleHeader
redaction doesn't apply to rules that use the Headers
FieldToMatch
.
You can specify only the following fields for redaction: UriPath
, QueryString
,
SingleHeader
, and Method
.
This setting has no impact on request sampling. With request sampling, the only way to exclude fields is by disabling sampling in the web ACL visibility configuration.
public void setManagedByFirewallManager(Boolean managedByFirewallManager)
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
managedByFirewallManager
- Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration. If true, only Firewall Manager can modify or delete the configuration.public Boolean getManagedByFirewallManager()
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
public LoggingConfiguration withManagedByFirewallManager(Boolean managedByFirewallManager)
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
managedByFirewallManager
- Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy
configuration. If true, only Firewall Manager can modify or delete the configuration.public Boolean isManagedByFirewallManager()
Indicates whether the logging configuration was created by Firewall Manager, as part of an WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
public void setLoggingFilter(LoggingFilter loggingFilter)
Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
loggingFilter
- Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on
the rule action and on the web request labels that were applied by matching rules during web ACL
evaluation.public LoggingFilter getLoggingFilter()
Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
public LoggingConfiguration withLoggingFilter(LoggingFilter loggingFilter)
Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
loggingFilter
- Filtering that specifies which web requests are kept in the logs and which are dropped. You can filter on
the rule action and on the web request labels that were applied by matching rules during web ACL
evaluation.public void setLogType(String logType)
Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
logType
- Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
LogType
public String getLogType()
Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
Default: WAF_LOGS
LogType
public LoggingConfiguration withLogType(String logType)
Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
logType
- Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
LogType
public LoggingConfiguration withLogType(LogType logType)
Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
logType
- Used to distinguish between various logging options. Currently, there is one option.
Default: WAF_LOGS
LogType
public void setLogScope(String logScope)
The owner of the logging configuration, which must be set to CUSTOMER
for the configurations that
you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security Lake.
You can use Security Lake to collect log and event data from various sources for normalization, analysis, and
management. For information, see Collecting data from
Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
logScope
- The owner of the logging configuration, which must be set to CUSTOMER
for the configurations
that you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security
Lake. You can use Security Lake to collect log and event data from various sources for normalization,
analysis, and management. For information, see Collecting data
from Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
LogScope
public String getLogScope()
The owner of the logging configuration, which must be set to CUSTOMER
for the configurations that
you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security Lake.
You can use Security Lake to collect log and event data from various sources for normalization, analysis, and
management. For information, see Collecting data from
Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
CUSTOMER
for the configurations
that you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon
Security Lake. You can use Security Lake to collect log and event data from various sources for
normalization, analysis, and management. For information, see Collecting data
from Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
LogScope
public LoggingConfiguration withLogScope(String logScope)
The owner of the logging configuration, which must be set to CUSTOMER
for the configurations that
you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security Lake.
You can use Security Lake to collect log and event data from various sources for normalization, analysis, and
management. For information, see Collecting data from
Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
logScope
- The owner of the logging configuration, which must be set to CUSTOMER
for the configurations
that you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security
Lake. You can use Security Lake to collect log and event data from various sources for normalization,
analysis, and management. For information, see Collecting data
from Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
LogScope
public LoggingConfiguration withLogScope(LogScope logScope)
The owner of the logging configuration, which must be set to CUSTOMER
for the configurations that
you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security Lake.
You can use Security Lake to collect log and event data from various sources for normalization, analysis, and
management. For information, see Collecting data from
Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
logScope
- The owner of the logging configuration, which must be set to CUSTOMER
for the configurations
that you manage.
The log scope SECURITY_LAKE
indicates a configuration that is managed through Amazon Security
Lake. You can use Security Lake to collect log and event data from various sources for normalization,
analysis, and management. For information, see Collecting data
from Amazon Web Services services in the Amazon Security Lake user guide.
Default: CUSTOMER
LogScope
public String toString()
toString
in class Object
Object.toString()
public LoggingConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.