amazonka-apigateway-1.4.5: Amazon API Gateway 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.APIGateway.UpdateUsage

Contents

Description

Grants a temporary extension to the reamining quota of a usage plan associated with a specified API key.

Synopsis

Creating a Request

updateUsage #

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

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

  • uuPatchOperations - A list of update operations to be applied to the specified resource and in the order specified in this list.
  • uuUsagePlanId - The Id of the usage plan associated with the usage data.
  • uuKeyId - The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

data UpdateUsage #

The PATCH request to grant a temporary extension to the reamining quota of a usage plan associated with a specified API key.

See: updateUsage smart constructor.

Instances

Eq UpdateUsage # 
Data UpdateUsage # 

Methods

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

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

toConstr :: UpdateUsage -> Constr #

dataTypeOf :: UpdateUsage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read UpdateUsage # 
Show UpdateUsage # 
Generic UpdateUsage # 

Associated Types

type Rep UpdateUsage :: * -> * #

Hashable UpdateUsage # 
ToJSON UpdateUsage # 
NFData UpdateUsage # 

Methods

rnf :: UpdateUsage -> () #

AWSRequest UpdateUsage # 
ToQuery UpdateUsage # 
ToPath UpdateUsage # 
ToHeaders UpdateUsage # 

Methods

toHeaders :: UpdateUsage -> [Header] #

type Rep UpdateUsage # 
type Rep UpdateUsage = D1 (MetaData "UpdateUsage" "Network.AWS.APIGateway.UpdateUsage" "amazonka-apigateway-1.4.5-5OCToOwmZjEH3FMiU9Yogu" False) (C1 (MetaCons "UpdateUsage'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_uuPatchOperations") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [PatchOperation]))) ((:*:) (S1 (MetaSel (Just Symbol "_uuUsagePlanId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_uuKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs UpdateUsage # 

Request Lenses

uuPatchOperations :: Lens' UpdateUsage [PatchOperation] #

A list of update operations to be applied to the specified resource and in the order specified in this list.

uuUsagePlanId :: Lens' UpdateUsage Text #

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

uuKeyId :: Lens' UpdateUsage Text #

The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

Destructuring the Response

usage :: Usage #

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 #

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 # 

Methods

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

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

Data Usage # 

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

Methods

showsPrec :: Int -> Usage -> ShowS #

show :: Usage -> String #

showList :: [Usage] -> ShowS #

Generic Usage # 

Associated Types

type Rep Usage :: * -> * #

Methods

from :: Usage -> Rep Usage x #

to :: Rep Usage x -> Usage #

Hashable Usage # 

Methods

hashWithSalt :: Int -> Usage -> Int #

hash :: Usage -> Int #

FromJSON Usage # 
NFData Usage # 

Methods

rnf :: Usage -> () #

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

Response Lenses

uUsagePlanId :: Lens' Usage (Maybe Text) #

The plan Id associated with this usage data.

uEndDate :: Lens' Usage (Maybe Text) #

The ending date of the usage data.

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

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

The starting date of the usage data.

uPosition :: Lens' Usage (Maybe Text) #

Undocumented member.