amazonka-waf-1.4.5: Amazon WAF SDK.

Copyright(c) 2013-2016 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.

Synopsis

Creating a Request

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 - The WebACLId of the WebACL for which you want GetSampledRequests to return a sample of requests.
  • gsrRuleId - 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 - 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 - 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.

data GetSampledRequests #

See: getSampledRequests smart constructor.

Instances

Eq GetSampledRequests # 
Data GetSampledRequests # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetSampledRequests -> c GetSampledRequests #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetSampledRequests #

toConstr :: GetSampledRequests -> Constr #

dataTypeOf :: GetSampledRequests -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetSampledRequests) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetSampledRequests) #

gmapT :: (forall b. Data b => b -> b) -> GetSampledRequests -> GetSampledRequests #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetSampledRequests -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetSampledRequests -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetSampledRequests -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetSampledRequests -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetSampledRequests -> m GetSampledRequests #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetSampledRequests -> m GetSampledRequests #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetSampledRequests -> m GetSampledRequests #

Read GetSampledRequests # 
Show GetSampledRequests # 
Generic GetSampledRequests # 
Hashable GetSampledRequests # 
ToJSON GetSampledRequests # 
NFData GetSampledRequests # 

Methods

rnf :: GetSampledRequests -> () #

AWSRequest GetSampledRequests # 
ToQuery GetSampledRequests # 
ToPath GetSampledRequests # 
ToHeaders GetSampledRequests # 
type Rep GetSampledRequests # 
type Rep GetSampledRequests = D1 (MetaData "GetSampledRequests" "Network.AWS.WAF.GetSampledRequests" "amazonka-waf-1.4.5-FqbkHngJH7OAVhvyuXSuC3" False) (C1 (MetaCons "GetSampledRequests'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_gsrWebACLId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_gsrRuleId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_gsrTimeWindow") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TimeWindow)) (S1 (MetaSel (Just Symbol "_gsrMaxItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat)))))
type Rs GetSampledRequests # 

Request Lenses

gsrWebACLId :: Lens' GetSampledRequests Text #

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

gsrRuleId :: Lens' GetSampledRequests Text #

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 #

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 #

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 #

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 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 - 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 - -- | The response status code.

data GetSampledRequestsResponse #

See: getSampledRequestsResponse smart constructor.

Instances

Eq GetSampledRequestsResponse # 
Data GetSampledRequestsResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetSampledRequestsResponse -> c GetSampledRequestsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetSampledRequestsResponse #

toConstr :: GetSampledRequestsResponse -> Constr #

dataTypeOf :: GetSampledRequestsResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetSampledRequestsResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetSampledRequestsResponse) #

gmapT :: (forall b. Data b => b -> b) -> GetSampledRequestsResponse -> GetSampledRequestsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetSampledRequestsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetSampledRequestsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetSampledRequestsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetSampledRequestsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetSampledRequestsResponse -> m GetSampledRequestsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetSampledRequestsResponse -> m GetSampledRequestsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetSampledRequestsResponse -> m GetSampledRequestsResponse #

Read GetSampledRequestsResponse # 
Show GetSampledRequestsResponse # 
Generic GetSampledRequestsResponse # 
NFData GetSampledRequestsResponse # 
type Rep GetSampledRequestsResponse # 
type Rep GetSampledRequestsResponse = D1 (MetaData "GetSampledRequestsResponse" "Network.AWS.WAF.GetSampledRequests" "amazonka-waf-1.4.5-FqbkHngJH7OAVhvyuXSuC3" False) (C1 (MetaCons "GetSampledRequestsResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_gsrrsSampledRequests") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [SampledHTTPRequest]))) (S1 (MetaSel (Just Symbol "_gsrrsPopulationSize") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer)))) ((:*:) (S1 (MetaSel (Just Symbol "_gsrrsTimeWindow") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe TimeWindow))) (S1 (MetaSel (Just Symbol "_gsrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

gsrrsSampledRequests :: Lens' GetSampledRequestsResponse [SampledHTTPRequest] #

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

gsrrsPopulationSize :: Lens' GetSampledRequestsResponse (Maybe Integer) #

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) #

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 #

  • - | The response status code.