amazonka-cost-explorer-2.0: Amazon Cost Explorer Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Creating a Request

data GetSavingsPlansCoverage Source #

See: newGetSavingsPlansCoverage smart constructor.

Constructors

GetSavingsPlansCoverage' 

Fields

  • filter' :: Maybe Expression

    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.

  • granularity :: Maybe 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.

  • groupBy :: Maybe [GroupDefinition]

    You can group the data using the attributes INSTANCE_FAMILY, REGION, or SERVICE.

  • maxResults :: Maybe Natural

    The number of items to be returned in a response. The default is 20, with a minimum value of 1.

  • metrics :: Maybe [Text]

    The measurement that you want your Savings Plans coverage reported in. The only valid value is SpendCoveredBySavingsPlans.

  • nextToken :: 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.

  • sortBy :: Maybe SortDefinition

    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.

  • timePeriod :: DateInterval

    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.

Instances

Instances details
ToJSON GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

ToHeaders GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

ToPath GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

ToQuery GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

AWSRequest GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Generic GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Associated Types

type Rep GetSavingsPlansCoverage :: Type -> Type #

Read GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Show GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

NFData GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Methods

rnf :: GetSavingsPlansCoverage -> () #

Eq GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Hashable GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

type AWSResponse GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

type Rep GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

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: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

Instances details
Generic GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Associated Types

type Rep GetSavingsPlansCoverageResponse :: Type -> Type #

Read GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Show GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

NFData GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Eq GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

type Rep GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

type Rep GetSavingsPlansCoverageResponse = D1 ('MetaData "GetSavingsPlansCoverageResponse" "Amazonka.CostExplorer.GetSavingsPlansCoverage" "amazonka-cost-explorer-2.0-QqVzyVvst98QYs5s2Ea4h" 'False) (C1 ('MetaCons "GetSavingsPlansCoverageResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "savingsPlansCoverages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SavingsPlansCoverage]))))

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.