Note
This is the latest version of AWS WAF , named AWS WAFV2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .
Returns the LoggingConfiguration for the specified web ACL.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
get-logging-configuration
--resource-arn <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--resource-arn
(string)
The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration .
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
To retrieve the logging configurations for a web ACL
The following get-logging-configuration
retrieves the logging configuration for the specified web ACL.
aws wafv2 get-logging-configuration \
--resource-arn arn:aws:wafv2:us-west-2:123456789012:regional/webacl/test/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222 \
--region us-west-2
Output:
{
"LoggingConfiguration":{
"ResourceArn":"arn:aws:wafv2:us-west-2:123456789012:regional/webacl/test/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
"RedactedFields":[
{
"Method":{
}
}
],
"LogDestinationConfigs":[
"arn:aws:firehose:us-west-2:123456789012:deliverystream/aws-waf-logs-custom-transformation"
]
}
}
For more information, see Logging Web ACL Traffic Information in the AWS WAF, AWS Firewall Manager, and AWS Shield Advanced Developer Guide.
LoggingConfiguration -> (structure)
The LoggingConfiguration for the specified web ACL.
ResourceArn -> (string)
The Amazon Resource Name (ARN) of the web ACL that you want to associate with
LogDestinationConfigs
.LogDestinationConfigs -> (list)
The Amazon Kinesis Data Firehose Amazon Resource Name (ARNs) that you want to associate with the web ACL.
(string)
RedactedFields -> (list)
The parts of the request that you want to keep out of the logs. For example, if you redact the
HEADER
field, theHEADER
field in the firehose will bexxx
.Note
You must use one of the following values:
URI
,QUERY_STRING
,HEADER
, orMETHOD
.(structure)
Note
This is the latest version of AWS WAF , named AWS WAFV2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .
The part of a web request that you want AWS WAF to inspect. Include the single
FieldToMatch
type that you want to inspect, with additional specifications as needed, according to the type. You specify a single request component inFieldToMatch
for each rule statement that requires it. To inspect more than one component of a web request, create a separate rule statement for each component.SingleHeader -> (structure)
Inspect a single header. Provide the name of the header to inspect, for example,
User-Agent
orReferer
. This setting isn’t case sensitive.Name -> (string)
The name of the query header to inspect.
SingleQueryArgument -> (structure)
Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or SalesRegion . The name can be up to 30 characters long and isn’t case sensitive.
This is used only to indicate the web request component for AWS WAF to inspect, in the FieldToMatch specification.
Name -> (string)
The name of the query argument to inspect.
AllQueryArguments -> (structure)
Inspect all query arguments.
UriPath -> (structure)
Inspect the request URI path. This is the part of a web request that identifies a resource, for example,
/images/daily-ad.jpg
.QueryString -> (structure)
Inspect the query string. This is the part of a URL that appears after a
?
character, if any.Body -> (structure)
Inspect the request body, which immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.
Note that only the first 8 KB (8192 bytes) of the request body are forwarded to AWS WAF for inspection by the underlying host service. If you don’t need to inspect more than 8 KB, you can guarantee that you don’t allow additional bytes in by combining a statement that inspects the body of the web request, such as ByteMatchStatement or RegexPatternSetReferenceStatement , with a SizeConstraintStatement that enforces an 8 KB size limit on the body of the request. AWS WAF doesn’t support inspecting the entire contents of web requests whose bodies exceed the 8 KB limit.
Method -> (structure)
Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.
ManagedByFirewallManager -> (boolean)
Indicates whether the logging configuration was created by AWS Firewall Manager, as part of an AWS WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.