amazonka-apigateway-1.6.1: Amazon API Gateway SDK.

Copyright(c) 2013-2018 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.APIGateway.GetUsage

Contents

Description

Gets the usage data of a usage plan in a specified time interval.

This operation returns paginated results.

Synopsis

Creating a Request

getUsage Source #

Creates a value of GetUsage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • guKeyId - The Id of the API key associated with the resultant usage data.
  • guLimit - The maximum number of returned results per page. The default value is 25 and the maximum value is 500.
  • guPosition - The current pagination position in the paged result set.
  • guUsagePlanId - [Required] The Id of the usage plan associated with the usage data.
  • guStartDate - [Required] The starting date (e.g., 2016-01-01) of the usage data.
  • guEndDate - [Required] The ending date (e.g., 2016-12-31) of the usage data.

data GetUsage Source #

The GET request to get the usage data of a usage plan in a specified time interval.

See: getUsage smart constructor.

Instances
Eq GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Data GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Methods

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

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

toConstr :: GetUsage -> Constr #

dataTypeOf :: GetUsage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Show GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Generic GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Associated Types

type Rep GetUsage :: Type -> Type #

Methods

from :: GetUsage -> Rep GetUsage x #

to :: Rep GetUsage x -> GetUsage #

Hashable GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Methods

hashWithSalt :: Int -> GetUsage -> Int #

hash :: GetUsage -> Int #

AWSPager GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

AWSRequest GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Associated Types

type Rs GetUsage :: Type #

ToHeaders GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Methods

toHeaders :: GetUsage -> [Header] #

ToPath GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

ToQuery GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

NFData GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Methods

rnf :: GetUsage -> () #

type Rep GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

type Rep GetUsage = D1 (MetaData "GetUsage" "Network.AWS.APIGateway.GetUsage" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "GetUsage'" PrefixI True) ((S1 (MetaSel (Just "_guKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_guLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "_guPosition") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_guUsagePlanId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "_guStartDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_guEndDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs GetUsage Source # 
Instance details

Defined in Network.AWS.APIGateway.GetUsage

Request Lenses

guKeyId :: Lens' GetUsage (Maybe Text) Source #

The Id of the API key associated with the resultant usage data.

guLimit :: Lens' GetUsage (Maybe Int) Source #

The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

guPosition :: Lens' GetUsage (Maybe Text) Source #

The current pagination position in the paged result set.

guUsagePlanId :: Lens' GetUsage Text Source #

Required
The Id of the usage plan associated with the usage data.

guStartDate :: Lens' GetUsage Text Source #

Required
The starting date (e.g., 2016-01-01) of the usage data.

guEndDate :: Lens' GetUsage Text Source #

Required
The ending date (e.g., 2016-12-31) of the usage data.

Destructuring the Response

usage :: Usage Source #

Creates a value of Usage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • uUsagePlanId - The plan Id associated with this usage data.
  • uEndDate - The ending date of the usage data.
  • uItems - The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]} , where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota] .
  • uStartDate - The starting date of the usage data.
  • uPosition - Undocumented member.

data Usage Source #

Represents the usage data of a usage plan.

Create and Use Usage Plans , Manage Usage in a Usage Plan

See: usage smart constructor.

Instances
Eq Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

(==) :: Usage -> Usage -> Bool #

(/=) :: Usage -> Usage -> Bool #

Data Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

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

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

toConstr :: Usage -> Constr #

dataTypeOf :: Usage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Show Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

showsPrec :: Int -> Usage -> ShowS #

show :: Usage -> String #

showList :: [Usage] -> ShowS #

Generic Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Associated Types

type Rep Usage :: Type -> Type #

Methods

from :: Usage -> Rep Usage x #

to :: Rep Usage x -> Usage #

Hashable Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

hashWithSalt :: Int -> Usage -> Int #

hash :: Usage -> Int #

FromJSON Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

NFData Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

Methods

rnf :: Usage -> () #

type Rep Usage Source # 
Instance details

Defined in Network.AWS.APIGateway.Types.Product

type Rep Usage = D1 (MetaData "Usage" "Network.AWS.APIGateway.Types.Product" "amazonka-apigateway-1.6.1-BCCM2RP3l9Q2ENgHvKrj59" False) (C1 (MetaCons "Usage'" PrefixI True) ((S1 (MetaSel (Just "_uUsagePlanId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_uEndDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_uItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Map Text [[Integer]]))) :*: (S1 (MetaSel (Just "_uStartDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_uPosition") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))

Response Lenses

uUsagePlanId :: Lens' Usage (Maybe Text) Source #

The plan Id associated with this usage data.

uEndDate :: Lens' Usage (Maybe Text) Source #

The ending date of the usage data.

uItems :: Lens' Usage (HashMap Text [[Integer]]) Source #

The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]} , where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota] .

uStartDate :: Lens' Usage (Maybe Text) Source #

The starting date of the usage data.

uPosition :: Lens' Usage (Maybe Text) Source #

Undocumented member.