| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.WAF.GetSampledRequests
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 500 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.
Synopsis
- 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
Arguments
| :: 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:
gsrWebACLId- TheWebACLIdof theWebACLfor which you wantGetSampledRequeststo return a sample of requests.gsrRuleId-RuleIdis one of three values: * TheRuleIdof theRuleor theRuleGroupIdof theRuleGroupfor which you wantGetSampledRequeststo return a sample of requests. *Default_Action, which causesGetSampledRequeststo return a sample of the requests that didn't match any of the rules in the specifiedWebACL.gsrTimeWindow- The start date and time and the end date and time of the range for which you wantGetSampledRequeststo return a sample of requests. Specify the date and time in the following format:"2016-09-27T14:50Z". You can specify any time range in the previous three hours.gsrMaxItems- 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 ofMaxItems,GetSampledRequestsreturns information about all of them.
data GetSampledRequests Source #
See: getSampledRequests smart constructor.
Instances
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 three values: * The RuleId of the Rule or the RuleGroupId of the RuleGroup 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 the following format: "2016-09-27T14:50Z" . 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 #
Arguments
| :: Int | |
| -> GetSampledRequestsResponse |
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:
gsrrsSampledRequests- A complex type that contains detailed information about each of the requests in the sample.gsrrsPopulationSize- The total number of requests from whichGetSampledRequestsgot a sample ofMaxItemsrequests. IfPopulationSizeis less thanMaxItems, the sample includes every request that your AWS resource received during the specified time range.gsrrsTimeWindow- Usually,TimeWindowis the time range that you specified in theGetSampledRequestsrequest. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request,GetSampledRequestsreturns the time range for the first 5,000 requests.gsrrsResponseStatus- -- | The response status code.
data GetSampledRequestsResponse Source #
See: getSampledRequestsResponse smart constructor.
Instances
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.