| 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 |
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_groupBy :: Lens' GetSavingsPlansCoverage (Maybe [GroupDefinition])
- getSavingsPlansCoverage_metrics :: Lens' GetSavingsPlansCoverage (Maybe [Text])
- getSavingsPlansCoverage_granularity :: Lens' GetSavingsPlansCoverage (Maybe Granularity)
- getSavingsPlansCoverage_nextToken :: Lens' GetSavingsPlansCoverage (Maybe Text)
- getSavingsPlansCoverage_filter :: Lens' GetSavingsPlansCoverage (Maybe Expression)
- getSavingsPlansCoverage_maxResults :: Lens' GetSavingsPlansCoverage (Maybe Natural)
- 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 #
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:groupBy:GetSavingsPlansCoverage', getSavingsPlansCoverage_groupBy - You can group the data using the attributes INSTANCE_FAMILY, REGION,
or SERVICE.
$sel:metrics:GetSavingsPlansCoverage', getSavingsPlansCoverage_metrics - The measurement that you want your Savings Plans coverage reported in.
The only valid value is SpendCoveredBySavingsPlans.
$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:nextToken: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: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:maxResults:GetSavingsPlansCoverage', getSavingsPlansCoverage_maxResults - The number of items to be returned in a response. The default is 20,
with a minimum value of 1.
$sel:sortBy:GetSavingsPlansCoverage', getSavingsPlansCoverage_sortBy - The value by which you want to sort the data.
The following values are supported for Key:
SpendCoveredBySavingsPlan
OnDemandCost
CoveragePercentage
TotalCost
InstanceFamily
Region
Service
Supported values for SortOrder are ASCENDING or DESCENDING.
$sel:timePeriod: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_groupBy :: Lens' GetSavingsPlansCoverage (Maybe [GroupDefinition]) Source #
You can group the data using the attributes INSTANCE_FAMILY, REGION,
or SERVICE.
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_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_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_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_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_sortBy :: Lens' GetSavingsPlansCoverage (Maybe SortDefinition) Source #
The value by which you want to sort the data.
The following values are supported for Key:
SpendCoveredBySavingsPlan
OnDemandCost
CoveragePercentage
TotalCost
InstanceFamily
Region
Service
Supported values for SortOrder are ASCENDING or 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:
$sel:nextToken: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.