amazonka-waf-regional-1.5.0: Amazon WAF Regional SDK.

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

Network.AWS.WAFRegional.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 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

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:

  • 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 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 of MaxItems , GetSampledRequests returns information about all of them.

data GetSampledRequests Source #

See: getSampledRequests smart constructor.

Instances

Eq GetSampledRequests Source # 
Data GetSampledRequests Source # 

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 Source # 
Show GetSampledRequests Source # 
Generic GetSampledRequests Source # 
Hashable GetSampledRequests Source # 
ToJSON GetSampledRequests Source # 
NFData GetSampledRequests Source # 

Methods

rnf :: GetSampledRequests -> () #

AWSRequest GetSampledRequests Source # 
ToQuery GetSampledRequests Source # 
ToPath GetSampledRequests Source # 
ToHeaders GetSampledRequests Source # 
type Rep GetSampledRequests Source # 
type Rep GetSampledRequests = D1 (MetaData "GetSampledRequests" "Network.AWS.WAFRegional.GetSampledRequests" "amazonka-waf-regional-1.5.0-Kn8HIfa7qWEERHHaTClrk5" 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 Source # 

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

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

See: getSampledRequestsResponse smart constructor.

Instances

Eq GetSampledRequestsResponse Source # 
Data GetSampledRequestsResponse Source # 

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 Source # 
Show GetSampledRequestsResponse Source # 
Generic GetSampledRequestsResponse Source # 
NFData GetSampledRequestsResponse Source # 
type Rep GetSampledRequestsResponse Source # 
type Rep GetSampledRequestsResponse = D1 (MetaData "GetSampledRequestsResponse" "Network.AWS.WAFRegional.GetSampledRequests" "amazonka-waf-regional-1.5.0-Kn8HIfa7qWEERHHaTClrk5" 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 DecidedStrict) (Rec0 Int)))))

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.