Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- getSampledRequests :: Text -> Text -> TimeWindow -> Natural -> GetSampledRequests
- data GetSampledRequests
- gsrWebACLId :: Lens' GetSampledRequests Text
- gsrRuleId :: Lens' GetSampledRequests Text
- gsrTimeWindow :: Lens' GetSampledRequests TimeWindow
- gsrMaxItems :: Lens' GetSampledRequests Natural
- getSampledRequestsResponse :: Int -> GetSampledRequestsResponse
- data GetSampledRequestsResponse
- gsrrsSampledRequests :: Lens' GetSampledRequestsResponse [SampledHTTPRequest]
- gsrrsPopulationSize :: Lens' GetSampledRequestsResponse (Maybe Integer)
- gsrrsTimeWindow :: Lens' GetSampledRequestsResponse (Maybe TimeWindow)
- gsrrsResponseStatus :: Lens' GetSampledRequestsResponse Int
Creating a Request
:: Text | |
-> Text | |
-> TimeWindow | |
-> Natural | |
-> GetSampledRequests |
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:
data GetSampledRequests Source
See: getSampledRequests
smart constructor.
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 theRule
for which you wantGetSampledRequests
to return a sample of requests. Default_Action
, which causesGetSampledRequests
to return a sample of the requests that didn't match any of the rules in the specifiedWebACL
.
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:
data GetSampledRequestsResponse Source
See: getSampledRequestsResponse
smart constructor.
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.
gsrrsResponseStatus :: Lens' GetSampledRequestsResponse Int Source
The response status code.