amazonka-waf-1.3.5: Amazon WAF SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.WAF.GetSampledRequests

Contents

Description

Gets detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,000 requests that your AWS resource received during a time range that you choose. You can specify a sample size of up to 100 requests, and you can specify any time range in the previous three hours.

GetSampledRequests returns a time range, which is usually the time range that you specified. However, if your resource (such as a CloudFront distribution) received 5,000 requests before the specified time range elapsed, GetSampledRequests returns an updated time range. This new time range indicates the actual period during which AWS WAF selected the requests in the sample.

See: AWS API Reference for GetSampledRequests.

Synopsis

Creating a Request

getSampledRequests Source

Creates a value of GetSampledRequests with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

gsrWebACLId :: Lens' GetSampledRequests Text Source

The WebACLId of the WebACL for which you want GetSampledRequests to return a sample of requests.

gsrRuleId :: Lens' GetSampledRequests Text Source

RuleId is one of two values:

  • The RuleId of the Rule for which you want GetSampledRequests to return a sample of requests.
  • Default_Action, which causes GetSampledRequests to return a sample of the requests that didn't match any of the rules in the specified WebACL.

gsrTimeWindow :: Lens' GetSampledRequests TimeWindow Source

The start date and time and the end date and time of the range for which you want GetSampledRequests to return a sample of requests. Specify the date and time in Unix time format (in seconds). You can specify any time range in the previous three hours.

gsrMaxItems :: Lens' GetSampledRequests Natural Source

The number of requests that you want AWS WAF to return from among the first 5,000 requests that your AWS resource received during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests returns information about all of them.

Destructuring the Response

getSampledRequestsResponse Source

Creates a value of GetSampledRequestsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

gsrrsSampledRequests :: Lens' GetSampledRequestsResponse [SampledHTTPRequest] Source

A complex type that contains detailed information about each of the requests in the sample.

gsrrsPopulationSize :: Lens' GetSampledRequestsResponse (Maybe Integer) Source

The total number of requests from which GetSampledRequests got a sample of MaxItems requests. If PopulationSize is less than MaxItems, the sample includes every request that your AWS resource received during the specified time range.

gsrrsTimeWindow :: Lens' GetSampledRequestsResponse (Maybe TimeWindow) Source

Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, GetSampledRequests returns the time range for the first 5,000 requests.