libZSservicesZSamazonka-cost-explorerZSamazonka-cost-explorer
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.CostExplorer.GetReservationUtilization

Description

Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID.

Synopsis

Creating a Request

data GetReservationUtilization Source #

See: newGetReservationUtilization smart constructor.

Constructors

GetReservationUtilization' 

Fields

  • groupBy :: Maybe [GroupDefinition]

    Groups only by SUBSCRIPTION_ID. Metadata is included.

  • nextPageToken :: Maybe Text

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

  • granularity :: Maybe Granularity

    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. If both GroupBy and Granularity aren't set, GetReservationUtilization defaults to DAILY.

    The GetReservationUtilization operation supports only DAILY and MONTHLY granularities.

  • filter' :: Maybe Expression

    Filters utilization data by dimensions. You can filter by the following dimensions:

    • AZ
    • CACHE_ENGINE
    • DEPLOYMENT_OPTION
    • INSTANCE_TYPE
    • LINKED_ACCOUNT
    • OPERATING_SYSTEM
    • PLATFORM
    • REGION
    • SERVICE
    • SCOPE
    • TENANCY

    GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

  • maxResults :: Maybe Natural

    The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.

  • sortBy :: Maybe SortDefinition

    The value by which you want to sort the data.

    The following values are supported for Key:

    • UtilizationPercentage
    • UtilizationPercentageInUnits
    • PurchasedHours
    • PurchasedUnits
    • TotalActualHours
    • TotalActualUnits
    • UnusedHours
    • UnusedUnits
    • OnDemandCostOfRIHoursUsed
    • NetRISavings
    • TotalPotentialRISavings
    • AmortizedUpfrontFee
    • AmortizedRecurringFee
    • TotalAmortizedFee
    • RICostForUnusedHours
    • RealizedSavings
    • UnrealizedSavings

    Supported values for SortOrder are ASCENDING or DESCENDING.

  • timePeriod :: DateInterval

    Sets the start and end dates for retrieving RI utilization. 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.

Instances

Instances details
Eq GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Read GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Show GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Generic GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Associated Types

type Rep GetReservationUtilization :: Type -> Type #

NFData GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Hashable GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

ToJSON GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

AWSRequest GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

ToHeaders GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

ToPath GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

ToQuery GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

type Rep GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

type Rep GetReservationUtilization = D1 ('MetaData "GetReservationUtilization" "Amazonka.CostExplorer.GetReservationUtilization" "libZSservicesZSamazonka-cost-explorerZSamazonka-cost-explorer" 'False) (C1 ('MetaCons "GetReservationUtilization'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "groupBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [GroupDefinition])) :*: (S1 ('MetaSel ('Just "nextPageToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "granularity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Granularity)))) :*: ((S1 ('MetaSel ('Just "filter'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Expression)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "sortBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SortDefinition)) :*: S1 ('MetaSel ('Just "timePeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DateInterval)))))
type AWSResponse GetReservationUtilization Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

newGetReservationUtilization Source #

Create a value of GetReservationUtilization 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:groupBy:GetReservationUtilization', getReservationUtilization_groupBy - Groups only by SUBSCRIPTION_ID. Metadata is included.

$sel:nextPageToken:GetReservationUtilization', getReservationUtilization_nextPageToken - The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.

$sel:granularity:GetReservationUtilization', getReservationUtilization_granularity - 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. If both GroupBy and Granularity aren't set, GetReservationUtilization defaults to DAILY.

The GetReservationUtilization operation supports only DAILY and MONTHLY granularities.

$sel:filter':GetReservationUtilization', getReservationUtilization_filter - Filters utilization data by dimensions. You can filter by the following dimensions:

  • AZ
  • CACHE_ENGINE
  • DEPLOYMENT_OPTION
  • INSTANCE_TYPE
  • LINKED_ACCOUNT
  • OPERATING_SYSTEM
  • PLATFORM
  • REGION
  • SERVICE
  • SCOPE
  • TENANCY

GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

$sel:maxResults:GetReservationUtilization', getReservationUtilization_maxResults - The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.

$sel:sortBy:GetReservationUtilization', getReservationUtilization_sortBy - The value by which you want to sort the data.

The following values are supported for Key:

  • UtilizationPercentage
  • UtilizationPercentageInUnits
  • PurchasedHours
  • PurchasedUnits
  • TotalActualHours
  • TotalActualUnits
  • UnusedHours
  • UnusedUnits
  • OnDemandCostOfRIHoursUsed
  • NetRISavings
  • TotalPotentialRISavings
  • AmortizedUpfrontFee
  • AmortizedRecurringFee
  • TotalAmortizedFee
  • RICostForUnusedHours
  • RealizedSavings
  • UnrealizedSavings

Supported values for SortOrder are ASCENDING or DESCENDING.

$sel:timePeriod:GetReservationUtilization', getReservationUtilization_timePeriod - Sets the start and end dates for retrieving RI utilization. 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.

Request Lenses

getReservationUtilization_groupBy :: Lens' GetReservationUtilization (Maybe [GroupDefinition]) Source #

Groups only by SUBSCRIPTION_ID. Metadata is included.

getReservationUtilization_nextPageToken :: Lens' GetReservationUtilization (Maybe Text) Source #

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

getReservationUtilization_granularity :: Lens' GetReservationUtilization (Maybe Granularity) Source #

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. If both GroupBy and Granularity aren't set, GetReservationUtilization defaults to DAILY.

The GetReservationUtilization operation supports only DAILY and MONTHLY granularities.

getReservationUtilization_filter :: Lens' GetReservationUtilization (Maybe Expression) Source #

Filters utilization data by dimensions. You can filter by the following dimensions:

  • AZ
  • CACHE_ENGINE
  • DEPLOYMENT_OPTION
  • INSTANCE_TYPE
  • LINKED_ACCOUNT
  • OPERATING_SYSTEM
  • PLATFORM
  • REGION
  • SERVICE
  • SCOPE
  • TENANCY

GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

getReservationUtilization_maxResults :: Lens' GetReservationUtilization (Maybe Natural) Source #

The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.

getReservationUtilization_sortBy :: Lens' GetReservationUtilization (Maybe SortDefinition) Source #

The value by which you want to sort the data.

The following values are supported for Key:

  • UtilizationPercentage
  • UtilizationPercentageInUnits
  • PurchasedHours
  • PurchasedUnits
  • TotalActualHours
  • TotalActualUnits
  • UnusedHours
  • UnusedUnits
  • OnDemandCostOfRIHoursUsed
  • NetRISavings
  • TotalPotentialRISavings
  • AmortizedUpfrontFee
  • AmortizedRecurringFee
  • TotalAmortizedFee
  • RICostForUnusedHours
  • RealizedSavings
  • UnrealizedSavings

Supported values for SortOrder are ASCENDING or DESCENDING.

getReservationUtilization_timePeriod :: Lens' GetReservationUtilization DateInterval Source #

Sets the start and end dates for retrieving RI utilization. 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

data GetReservationUtilizationResponse Source #

See: newGetReservationUtilizationResponse smart constructor.

Constructors

GetReservationUtilizationResponse' 

Fields

Instances

Instances details
Eq GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Read GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Show GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Generic GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

Associated Types

type Rep GetReservationUtilizationResponse :: Type -> Type #

NFData GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

type Rep GetReservationUtilizationResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetReservationUtilization

type Rep GetReservationUtilizationResponse = D1 ('MetaData "GetReservationUtilizationResponse" "Amazonka.CostExplorer.GetReservationUtilization" "libZSservicesZSamazonka-cost-explorerZSamazonka-cost-explorer" 'False) (C1 ('MetaCons "GetReservationUtilizationResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nextPageToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "total") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ReservationAggregates))) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "utilizationsByTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [UtilizationByTime]))))

newGetReservationUtilizationResponse Source #

Create a value of GetReservationUtilizationResponse 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:nextPageToken:GetReservationUtilization', getReservationUtilizationResponse_nextPageToken - The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.

$sel:total:GetReservationUtilizationResponse', getReservationUtilizationResponse_total - The total amount of time that you used your RIs.

$sel:httpStatus:GetReservationUtilizationResponse', getReservationUtilizationResponse_httpStatus - The response's http status code.

$sel:utilizationsByTime:GetReservationUtilizationResponse', getReservationUtilizationResponse_utilizationsByTime - The amount of time that you used your RIs.

Response Lenses

getReservationUtilizationResponse_nextPageToken :: Lens' GetReservationUtilizationResponse (Maybe Text) Source #

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