<note> <p>This is <b>AWS WAF Classic</b> documentation. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the developer guide.</p> <p> <b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With the latest version, AWS WAF has a single set of endpoints for regional and global use. </p> </note> <p>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.</p> <p> <code>GetSampledRequests</code> 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, <code>GetSampledRequests</code> returns an updated time range. This new time range indicates the actual period during which AWS WAF selected the requests in the sample.</p>
Headers
Request body
Response
Success
Example response
{
"PopulationSize": 50,
"SampledRequests": [
{
"Action": "BLOCK",
"Request": {
"ClientIP": "192.0.2.44",
"Country": "US",
"HTTPVersion": "HTTP/1.1",
"Headers": [
{
"Name": "User-Agent",
"Value": "BadBot "
}
],
"Method": "HEAD"
},
"Timestamp": "2016-09-27T14:55Z",
"Weight": 1
}
],
"TimeWindow": {
"EndTime": "2016-09-27T15:50Z",
"StartTime": "2016-09-27T14:50Z"
}
}