amazonka-apigateway-1.6.0: 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.UpdateUsage

Contents

Description

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

Synopsis

Creating a Request

updateUsage Source #

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 - [Required] The Id of the usage plan associated with the usage data.
  • uuKeyId - [Required] The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

data UpdateUsage Source #

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

See: updateUsage smart constructor.

Instances

Eq UpdateUsage Source # 
Data UpdateUsage Source # 

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 Source # 
Show UpdateUsage Source # 
Generic UpdateUsage Source # 

Associated Types

type Rep UpdateUsage :: * -> * #

Hashable UpdateUsage Source # 
ToJSON UpdateUsage Source # 
NFData UpdateUsage Source # 

Methods

rnf :: UpdateUsage -> () #

AWSRequest UpdateUsage Source # 
ToHeaders UpdateUsage Source # 

Methods

toHeaders :: UpdateUsage -> [Header] #

ToPath UpdateUsage Source # 
ToQuery UpdateUsage Source # 
type Rep UpdateUsage Source # 
type Rep UpdateUsage = D1 * (MetaData "UpdateUsage" "Network.AWS.APIGateway.UpdateUsage" "amazonka-apigateway-1.6.0-JJ9NJtNe0aRBcVRYpJCEA2" 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 Source # 

Request Lenses

uuPatchOperations :: Lens' UpdateUsage [PatchOperation] Source #

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

uuUsagePlanId :: Lens' UpdateUsage Text Source #

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

uuKeyId :: Lens' UpdateUsage Text Source #

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

Methods

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

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

Data Usage Source # 

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

Methods

showsPrec :: Int -> Usage -> ShowS #

show :: Usage -> String #

showList :: [Usage] -> ShowS #

Generic Usage Source # 

Associated Types

type Rep Usage :: * -> * #

Methods

from :: Usage -> Rep Usage x #

to :: Rep Usage x -> Usage #

Hashable Usage Source # 

Methods

hashWithSalt :: Int -> Usage -> Int #

hash :: Usage -> Int #

FromJSON Usage Source # 
NFData Usage Source # 

Methods

rnf :: Usage -> () #

type Rep Usage Source # 
type Rep Usage = D1 * (MetaData "Usage" "Network.AWS.APIGateway.Types.Product" "amazonka-apigateway-1.6.0-JJ9NJtNe0aRBcVRYpJCEA2" 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) 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.