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

  • groupBy :: Maybe [GroupDefinition]

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

  • metrics :: Maybe [Text]

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

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

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

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

  • maxResults :: Maybe Natural

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

  • sortBy :: Maybe SortDefinition

    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.

  • 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
Eq GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Read GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Show 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 #

NFData GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Methods

rnf :: GetSavingsPlansCoverage -> () #

Hashable GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

ToJSON GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

AWSRequest 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

type Rep GetSavingsPlansCoverage Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

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

Instances details
Eq GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Read GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Show GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Generic GetSavingsPlansCoverageResponse Source # 
Instance details

Defined in Amazonka.CostExplorer.GetSavingsPlansCoverage

Associated Types

type Rep GetSavingsPlansCoverageResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-cost-explorerZSamazonka-cost-explorer" '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:

$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.