amazonka-cost-explorer-1.6.0: Amazon Cost Explorer Service 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.CostExplorer.GetReservationCoverage

Contents

Description

Retrieves the reservation coverage for your account. This allows you to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's master account can see the coverage of the associated member accounts. For any time period, you can filter data about reservation usage by the following dimensions:

  • AZ
  • CACHE_ENGINE
  • DATABASE_ENGINE
  • DEPLOYMENT_OPTION
  • INSTANCE_TYPE
  • LINKED_ACCOUNT
  • OPERATING_SYSTEM
  • PLATFORM
  • REGION
  • SERVICE
  • TAG
  • TENANCY

To determine valid values for a dimension, use the GetDimensionValues operation.

Synopsis

Creating a Request

getReservationCoverage Source #

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

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

  • grcGroupBy - You can group the data by the following attributes: * AZ * CACHE_ENGINE * DATABASE_ENGINE * DEPLOYMENT_OPTION * INSTANCE_TYPE * LINKED_ACCOUNT * OPERATING_SYSTEM * PLATFORM * REGION * TAG * TENANCY
  • grcNextPageToken - The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
  • grcGranularity - The granularity of the AWS cost data for the reservation. Valid values are MONTHLY and DAILY . If GroupBy is set, Granularity can't be set. If Granularity isn't set, the response object doesn't include Granularity , either MONTHLY or DAILY .
  • grcFilter - Filters utilization data by dimensions. You can filter by the following dimensions: * AZ * CACHE_ENGINE * DATABASE_ENGINE * DEPLOYMENT_OPTION * INSTANCE_TYPE * LINKED_ACCOUNT * OPERATING_SYSTEM * PLATFORM * REGION * SERVICE * TAG * TENANCY GetReservationCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.
  • grcTimePeriod - The start and end dates of the period for which you want to retrieve data about reservation coverage. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01 , then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01 .

data GetReservationCoverage Source #

You can use the following request parameters to query for how much of your instance usage is covered by a reservation.

See: getReservationCoverage smart constructor.

Instances

Eq GetReservationCoverage Source # 
Data GetReservationCoverage Source # 

Methods

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

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

toConstr :: GetReservationCoverage -> Constr #

dataTypeOf :: GetReservationCoverage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetReservationCoverage Source # 
Show GetReservationCoverage Source # 
Generic GetReservationCoverage Source # 
Hashable GetReservationCoverage Source # 
ToJSON GetReservationCoverage Source # 
NFData GetReservationCoverage Source # 

Methods

rnf :: GetReservationCoverage -> () #

AWSRequest GetReservationCoverage Source # 
ToHeaders GetReservationCoverage Source # 
ToPath GetReservationCoverage Source # 
ToQuery GetReservationCoverage Source # 
type Rep GetReservationCoverage Source # 
type Rep GetReservationCoverage = D1 * (MetaData "GetReservationCoverage" "Network.AWS.CostExplorer.GetReservationCoverage" "amazonka-cost-explorer-1.6.0-1EmcUb6qhvECvPsx1AQih6" False) (C1 * (MetaCons "GetReservationCoverage'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_grcGroupBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [GroupDefinition]))) (S1 * (MetaSel (Just Symbol "_grcNextPageToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_grcGranularity") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Granularity))) ((:*:) * (S1 * (MetaSel (Just Symbol "_grcFilter") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Expression))) (S1 * (MetaSel (Just Symbol "_grcTimePeriod") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * DateInterval))))))
type Rs GetReservationCoverage Source # 

Request Lenses

grcGroupBy :: Lens' GetReservationCoverage [GroupDefinition] Source #

You can group the data by the following attributes: * AZ * CACHE_ENGINE * DATABASE_ENGINE * DEPLOYMENT_OPTION * INSTANCE_TYPE * LINKED_ACCOUNT * OPERATING_SYSTEM * PLATFORM * REGION * TAG * TENANCY

grcNextPageToken :: Lens' GetReservationCoverage (Maybe Text) Source #

The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.

grcGranularity :: Lens' GetReservationCoverage (Maybe Granularity) Source #

The granularity of the AWS cost data for the reservation. Valid values are MONTHLY and DAILY . If GroupBy is set, Granularity can't be set. If Granularity isn't set, the response object doesn't include Granularity , either MONTHLY or DAILY .

grcFilter :: Lens' GetReservationCoverage (Maybe Expression) Source #

Filters utilization data by dimensions. You can filter by the following dimensions: * AZ * CACHE_ENGINE * DATABASE_ENGINE * DEPLOYMENT_OPTION * INSTANCE_TYPE * LINKED_ACCOUNT * OPERATING_SYSTEM * PLATFORM * REGION * SERVICE * TAG * TENANCY GetReservationCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.

grcTimePeriod :: Lens' GetReservationCoverage DateInterval Source #

The start and end dates of the period for which you want to retrieve data about reservation coverage. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01 , then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01 .

Destructuring the Response

getReservationCoverageResponse Source #

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

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

  • grcrsNextPageToken - The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
  • grcrsTotal - The total amount of instance usage that is covered by a reservation.
  • grcrsResponseStatus - -- | The response status code.
  • grcrsCoveragesByTime - The amount of time that your reservations covered.

data GetReservationCoverageResponse Source #

See: getReservationCoverageResponse smart constructor.

Instances

Eq GetReservationCoverageResponse Source # 
Data GetReservationCoverageResponse Source # 

Methods

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

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

toConstr :: GetReservationCoverageResponse -> Constr #

dataTypeOf :: GetReservationCoverageResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetReservationCoverageResponse Source # 
Show GetReservationCoverageResponse Source # 
Generic GetReservationCoverageResponse Source # 
NFData GetReservationCoverageResponse Source # 
type Rep GetReservationCoverageResponse Source # 
type Rep GetReservationCoverageResponse = D1 * (MetaData "GetReservationCoverageResponse" "Network.AWS.CostExplorer.GetReservationCoverage" "amazonka-cost-explorer-1.6.0-1EmcUb6qhvECvPsx1AQih6" False) (C1 * (MetaCons "GetReservationCoverageResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_grcrsNextPageToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_grcrsTotal") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Coverage)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_grcrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_grcrsCoveragesByTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * [CoverageByTime])))))

Response Lenses

grcrsNextPageToken :: Lens' GetReservationCoverageResponse (Maybe Text) Source #

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.

grcrsTotal :: Lens' GetReservationCoverageResponse (Maybe Coverage) Source #

The total amount of instance usage that is covered by a reservation.

grcrsCoveragesByTime :: Lens' GetReservationCoverageResponse [CoverageByTime] Source #

The amount of time that your reservations covered.