| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.CostExplorer.GetSavingsPlansCoverage
Description
Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:
LINKED_ACCOUNT
REGION
SERVICE
INSTANCE_FAMILY
To determine valid values for a dimension, use the GetDimensionValues
operation.
Synopsis
- data GetSavingsPlansCoverage = GetSavingsPlansCoverage' {}
- newGetSavingsPlansCoverage :: DateInterval -> GetSavingsPlansCoverage
- getSavingsPlansCoverage_filter :: Lens' GetSavingsPlansCoverage (Maybe Expression)
- getSavingsPlansCoverage_granularity :: Lens' GetSavingsPlansCoverage (Maybe Granularity)
- getSavingsPlansCoverage_groupBy :: Lens' GetSavingsPlansCoverage (Maybe [GroupDefinition])
- getSavingsPlansCoverage_maxResults :: Lens' GetSavingsPlansCoverage (Maybe Natural)
- getSavingsPlansCoverage_metrics :: Lens' GetSavingsPlansCoverage (Maybe [Text])
- getSavingsPlansCoverage_nextToken :: Lens' GetSavingsPlansCoverage (Maybe Text)
- getSavingsPlansCoverage_sortBy :: Lens' GetSavingsPlansCoverage (Maybe SortDefinition)
- getSavingsPlansCoverage_timePeriod :: Lens' GetSavingsPlansCoverage DateInterval
- data GetSavingsPlansCoverageResponse = GetSavingsPlansCoverageResponse' {}
- newGetSavingsPlansCoverageResponse :: Int -> GetSavingsPlansCoverageResponse
- getSavingsPlansCoverageResponse_nextToken :: Lens' GetSavingsPlansCoverageResponse (Maybe Text)
- getSavingsPlansCoverageResponse_httpStatus :: Lens' GetSavingsPlansCoverageResponse Int
- getSavingsPlansCoverageResponse_savingsPlansCoverages :: Lens' GetSavingsPlansCoverageResponse [SavingsPlansCoverage]
Creating a Request
data GetSavingsPlansCoverage Source #
See: newGetSavingsPlansCoverage smart constructor.
Constructors
| GetSavingsPlansCoverage' | |
Fields
| |
Instances
newGetSavingsPlansCoverage Source #
Arguments
| :: DateInterval | |
| -> GetSavingsPlansCoverage |
Create a value of GetSavingsPlansCoverage 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:filter':GetSavingsPlansCoverage', getSavingsPlansCoverage_filter - Filters Savings Plans coverage data by dimensions. You can filter data
for Savings Plans usage with the following dimensions:
LINKED_ACCOUNT
REGION
SERVICE
INSTANCE_FAMILY
GetSavingsPlansCoverage uses the same
Expression
object as the other operations, but only AND is supported among each
dimension. If there are multiple values for a dimension, they are OR'd
together.
Cost category is also supported.
$sel:granularity:GetSavingsPlansCoverage', getSavingsPlansCoverage_granularity - The granularity of the Amazon Web Services cost data for your Savings
Plans. Granularity can't be set if GroupBy is set.
The GetSavingsPlansCoverage operation supports only DAILY and
MONTHLY granularities.
$sel:groupBy:GetSavingsPlansCoverage', getSavingsPlansCoverage_groupBy - You can group the data using the attributes INSTANCE_FAMILY, REGION,
or SERVICE.
$sel:maxResults:GetSavingsPlansCoverage', getSavingsPlansCoverage_maxResults - The number of items to be returned in a response. The default is 20,
with a minimum value of 1.
GetSavingsPlansCoverage, getSavingsPlansCoverage_metrics - The measurement that you want your Savings Plans coverage reported in.
The only valid value is SpendCoveredBySavingsPlans.
GetSavingsPlansCoverage, getSavingsPlansCoverage_nextToken - 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:sortBy:GetSavingsPlansCoverage', getSavingsPlansCoverage_sortBy - The value that you want to sort the data by.
The following values are supported for Key:
SpendCoveredBySavingsPlan
OnDemandCost
CoveragePercentage
TotalCost
InstanceFamily
Region
Service
The supported values for SortOrder are ASCENDING and DESCENDING.
GetSavingsPlansCoverage, getSavingsPlansCoverage_timePeriod - The time period that you want the usage and costs for. The Start date
must be within 13 months. The End date must be after the Start date,
and before the current date. Future dates can't be used as an End
date.
Request Lenses
getSavingsPlansCoverage_filter :: Lens' GetSavingsPlansCoverage (Maybe Expression) Source #
Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:
LINKED_ACCOUNT
REGION
SERVICE
INSTANCE_FAMILY
GetSavingsPlansCoverage uses the same
Expression
object as the other operations, but only AND is supported among each
dimension. If there are multiple values for a dimension, they are OR'd
together.
Cost category is also supported.
getSavingsPlansCoverage_granularity :: Lens' GetSavingsPlansCoverage (Maybe Granularity) Source #
The granularity of the Amazon Web Services cost data for your Savings
Plans. Granularity can't be set if GroupBy is set.
The GetSavingsPlansCoverage operation supports only DAILY and
MONTHLY granularities.
getSavingsPlansCoverage_groupBy :: Lens' GetSavingsPlansCoverage (Maybe [GroupDefinition]) Source #
You can group the data using the attributes INSTANCE_FAMILY, REGION,
or SERVICE.
getSavingsPlansCoverage_maxResults :: Lens' GetSavingsPlansCoverage (Maybe Natural) Source #
The number of items to be returned in a response. The default is 20,
with a minimum value of 1.
getSavingsPlansCoverage_metrics :: Lens' GetSavingsPlansCoverage (Maybe [Text]) Source #
The measurement that you want your Savings Plans coverage reported in.
The only valid value is SpendCoveredBySavingsPlans.
getSavingsPlansCoverage_nextToken :: Lens' GetSavingsPlansCoverage (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.
getSavingsPlansCoverage_sortBy :: Lens' GetSavingsPlansCoverage (Maybe SortDefinition) Source #
The value that you want to sort the data by.
The following values are supported for Key:
SpendCoveredBySavingsPlan
OnDemandCost
CoveragePercentage
TotalCost
InstanceFamily
Region
Service
The supported values for SortOrder are ASCENDING and DESCENDING.
getSavingsPlansCoverage_timePeriod :: Lens' GetSavingsPlansCoverage DateInterval Source #
The time period that you want the usage and costs for. The Start date
must be within 13 months. The End date must be after the Start date,
and before the current date. Future dates can't be used as an End
date.
Destructuring the Response
data GetSavingsPlansCoverageResponse Source #
See: newGetSavingsPlansCoverageResponse smart constructor.
Constructors
| GetSavingsPlansCoverageResponse' | |
Fields
| |
Instances
newGetSavingsPlansCoverageResponse Source #
Create a value of GetSavingsPlansCoverageResponse 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:
GetSavingsPlansCoverage, getSavingsPlansCoverageResponse_nextToken - 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:httpStatus:GetSavingsPlansCoverageResponse', getSavingsPlansCoverageResponse_httpStatus - The response's http status code.
$sel:savingsPlansCoverages:GetSavingsPlansCoverageResponse', getSavingsPlansCoverageResponse_savingsPlansCoverages - The amount of spend that your Savings Plans covered.
Response Lenses
getSavingsPlansCoverageResponse_nextToken :: Lens' GetSavingsPlansCoverageResponse (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.
getSavingsPlansCoverageResponse_httpStatus :: Lens' GetSavingsPlansCoverageResponse Int Source #
The response's http status code.
getSavingsPlansCoverageResponse_savingsPlansCoverages :: Lens' GetSavingsPlansCoverageResponse [SavingsPlansCoverage] Source #
The amount of spend that your Savings Plans covered.