Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data GetReservationUtilization = GetReservationUtilization' {}
- newGetReservationUtilization :: DateInterval -> GetReservationUtilization
- getReservationUtilization_groupBy :: Lens' GetReservationUtilization (Maybe [GroupDefinition])
- getReservationUtilization_nextPageToken :: Lens' GetReservationUtilization (Maybe Text)
- getReservationUtilization_granularity :: Lens' GetReservationUtilization (Maybe Granularity)
- getReservationUtilization_filter :: Lens' GetReservationUtilization (Maybe Expression)
- getReservationUtilization_maxResults :: Lens' GetReservationUtilization (Maybe Natural)
- getReservationUtilization_sortBy :: Lens' GetReservationUtilization (Maybe SortDefinition)
- getReservationUtilization_timePeriod :: Lens' GetReservationUtilization DateInterval
- data GetReservationUtilizationResponse = GetReservationUtilizationResponse' {}
- newGetReservationUtilizationResponse :: Int -> GetReservationUtilizationResponse
- getReservationUtilizationResponse_nextPageToken :: Lens' GetReservationUtilizationResponse (Maybe Text)
- getReservationUtilizationResponse_total :: Lens' GetReservationUtilizationResponse (Maybe ReservationAggregates)
- getReservationUtilizationResponse_httpStatus :: Lens' GetReservationUtilizationResponse Int
- getReservationUtilizationResponse_utilizationsByTime :: Lens' GetReservationUtilizationResponse [UtilizationByTime]
Creating a Request
data GetReservationUtilization Source #
See: newGetReservationUtilization
smart constructor.
GetReservationUtilization' | |
|
Instances
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.
GetReservationUtilizationResponse' | |
|
Instances
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.
getReservationUtilizationResponse_total :: Lens' GetReservationUtilizationResponse (Maybe ReservationAggregates) Source #
The total amount of time that you used your RIs.
getReservationUtilizationResponse_httpStatus :: Lens' GetReservationUtilizationResponse Int Source #
The response's http status code.
getReservationUtilizationResponse_utilizationsByTime :: Lens' GetReservationUtilizationResponse [UtilizationByTime] Source #
The amount of time that you used your RIs.