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

Amazonka.APIGateway.GetUsage

Description

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

This operation returns paginated results.

Synopsis

Creating a Request

data GetUsage Source #

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

See: newGetUsage smart constructor.

Constructors

GetUsage' 

Fields

  • keyId :: Maybe Text

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

  • limit :: Maybe Int

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

  • position :: Maybe Text

    The current pagination position in the paged result set.

  • usagePlanId :: Text
    Required
    The Id of the usage plan associated with the usage data.
  • startDate :: Text
    Required
    The starting date (e.g., 2016-01-01) of the usage data.
  • endDate :: Text
    Required
    The ending date (e.g., 2016-12-31) of the usage data.

Instances

Instances details
Eq GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Read GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Show GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Generic GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Associated Types

type Rep GetUsage :: Type -> Type #

Methods

from :: GetUsage -> Rep GetUsage x #

to :: Rep GetUsage x -> GetUsage #

NFData GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Methods

rnf :: GetUsage -> () #

Hashable GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Methods

hashWithSalt :: Int -> GetUsage -> Int #

hash :: GetUsage -> Int #

AWSPager GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

AWSRequest GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Associated Types

type AWSResponse GetUsage #

ToHeaders GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

Methods

toHeaders :: GetUsage -> [Header] #

ToPath GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

ToQuery GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

type Rep GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

type Rep GetUsage = D1 ('MetaData "GetUsage" "Amazonka.APIGateway.GetUsage" "libZSservicesZSamazonka-apigatewayZSamazonka-apigateway" 'False) (C1 ('MetaCons "GetUsage'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "keyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "usagePlanId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "startDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse GetUsage Source # 
Instance details

Defined in Amazonka.APIGateway.GetUsage

newGetUsage Source #

Create a value of GetUsage with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:keyId:GetUsage', getUsage_keyId - The Id of the API key associated with the resultant usage data.

$sel:limit:GetUsage', getUsage_limit - The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

$sel:position:GetUsage', getUsage_position - The current pagination position in the paged result set.

$sel:usagePlanId:GetUsage', getUsage_usagePlanId - [Required] The Id of the usage plan associated with the usage data.

$sel:startDate:GetUsage', getUsage_startDate - [Required] The starting date (e.g., 2016-01-01) of the usage data.

$sel:endDate:GetUsage', getUsage_endDate - [Required] The ending date (e.g., 2016-12-31) of the usage data.

Request Lenses

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

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

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

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

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

The current pagination position in the paged result set.

getUsage_usagePlanId :: Lens' GetUsage Text Source #

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

getUsage_startDate :: Lens' GetUsage Text Source #

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

getUsage_endDate :: Lens' GetUsage Text Source #

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

Destructuring the Response

data Usage Source #

Represents the usage data of a usage plan.

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

See: newUsage smart constructor.

Constructors

Usage' 

Fields

  • usagePlanId :: Maybe Text

    The plan Id associated with this usage data.

  • endDate :: Maybe Text

    The ending date of the usage data.

  • items :: Maybe (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].

  • startDate :: Maybe Text

    The starting date of the usage data.

  • position :: Maybe Text
     

Instances

Instances details
Eq Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Methods

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

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

Read Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Show Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Methods

showsPrec :: Int -> Usage -> ShowS #

show :: Usage -> String #

showList :: [Usage] -> ShowS #

Generic Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Associated Types

type Rep Usage :: Type -> Type #

Methods

from :: Usage -> Rep Usage x #

to :: Rep Usage x -> Usage #

NFData Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Methods

rnf :: Usage -> () #

Hashable Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

Methods

hashWithSalt :: Int -> Usage -> Int #

hash :: Usage -> Int #

FromJSON Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

type Rep Usage Source # 
Instance details

Defined in Amazonka.APIGateway.Types.Usage

type Rep Usage = D1 ('MetaData "Usage" "Amazonka.APIGateway.Types.Usage" "libZSservicesZSamazonka-apigatewayZSamazonka-apigateway" 'False) (C1 ('MetaCons "Usage'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "usagePlanId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "items") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text [[Integer]]))) :*: (S1 ('MetaSel ('Just "startDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))

newUsage :: Usage Source #

Create a value of Usage with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:usagePlanId:Usage', usage_usagePlanId - The plan Id associated with this usage data.

$sel:endDate:Usage', usage_endDate - The ending date of the usage data.

$sel:items:Usage', usage_items - 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].

$sel:startDate:Usage', usage_startDate - The starting date of the usage data.

$sel:position:Usage', usage_position - Undocumented member.

Response Lenses

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

The plan Id associated with this usage data.

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

The ending date of the usage data.

usage_items :: Lens' Usage (Maybe (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].

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

The starting date of the usage data.

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

Undocumented member.