AWS Cost Explorer Service

2019/11/18 - AWS Cost Explorer Service - 1 updated api methods

Changes  add EstimatedOnDemandCostWithCurrentCommitment to GetSavingsPlansPurchaseRecommendationRequest API

GetSavingsPlansPurchaseRecommendation (updated) Link ΒΆ
Changes (response)
{'SavingsPlansPurchaseRecommendation': {'SavingsPlansPurchaseRecommendationDetails': {'EstimatedOnDemandCostWithCurrentCommitment': 'string'},
                                        'SavingsPlansPurchaseRecommendationSummary': {'EstimatedOnDemandCostWithCurrentCommitment': 'string'}}}

Retrieves your request parameters, Savings Plan Recommendations Summary and Details.

See also: AWS API Documentation

Request Syntax

client.get_savings_plans_purchase_recommendation(
    SavingsPlansType='COMPUTE_SP'|'EC2_INSTANCE_SP',
    TermInYears='ONE_YEAR'|'THREE_YEARS',
    PaymentOption='NO_UPFRONT'|'PARTIAL_UPFRONT'|'ALL_UPFRONT'|'LIGHT_UTILIZATION'|'MEDIUM_UTILIZATION'|'HEAVY_UTILIZATION',
    NextPageToken='string',
    PageSize=123,
    LookbackPeriodInDays='SEVEN_DAYS'|'THIRTY_DAYS'|'SIXTY_DAYS'
)
type SavingsPlansType

string

param SavingsPlansType

[REQUIRED]

The Savings Plans recommendation type requested.

type TermInYears

string

param TermInYears

[REQUIRED]

The savings plan recommendation term used to generated these recommendations.

type PaymentOption

string

param PaymentOption

[REQUIRED]

The payment option used to generate these recommendations.

type NextPageToken

string

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

type PageSize

integer

param PageSize

The number of recommendations that you want returned in a single response object.

type LookbackPeriodInDays

string

param LookbackPeriodInDays

[REQUIRED]

The lookback period used to generate the recommendation.

rtype

dict

returns

Response Syntax

{
    'Metadata': {
        'RecommendationId': 'string',
        'GenerationTimestamp': 'string'
    },
    'SavingsPlansPurchaseRecommendation': {
        'SavingsPlansType': 'COMPUTE_SP'|'EC2_INSTANCE_SP',
        'TermInYears': 'ONE_YEAR'|'THREE_YEARS',
        'PaymentOption': 'NO_UPFRONT'|'PARTIAL_UPFRONT'|'ALL_UPFRONT'|'LIGHT_UTILIZATION'|'MEDIUM_UTILIZATION'|'HEAVY_UTILIZATION',
        'LookbackPeriodInDays': 'SEVEN_DAYS'|'THIRTY_DAYS'|'SIXTY_DAYS',
        'SavingsPlansPurchaseRecommendationDetails': [
            {
                'SavingsPlansDetails': {
                    'Region': 'string',
                    'InstanceFamily': 'string',
                    'OfferingId': 'string'
                },
                'AccountId': 'string',
                'UpfrontCost': 'string',
                'EstimatedROI': 'string',
                'CurrencyCode': 'string',
                'EstimatedSPCost': 'string',
                'EstimatedOnDemandCost': 'string',
                'EstimatedOnDemandCostWithCurrentCommitment': 'string',
                'EstimatedSavingsAmount': 'string',
                'EstimatedSavingsPercentage': 'string',
                'HourlyCommitmentToPurchase': 'string',
                'EstimatedAverageUtilization': 'string',
                'EstimatedMonthlySavingsAmount': 'string',
                'CurrentMinimumHourlyOnDemandSpend': 'string',
                'CurrentMaximumHourlyOnDemandSpend': 'string',
                'CurrentAverageHourlyOnDemandSpend': 'string'
            },
        ],
        'SavingsPlansPurchaseRecommendationSummary': {
            'EstimatedROI': 'string',
            'CurrencyCode': 'string',
            'EstimatedTotalCost': 'string',
            'CurrentOnDemandSpend': 'string',
            'EstimatedSavingsAmount': 'string',
            'TotalRecommendationCount': 'string',
            'DailyCommitmentToPurchase': 'string',
            'HourlyCommitmentToPurchase': 'string',
            'EstimatedSavingsPercentage': 'string',
            'EstimatedMonthlySavingsAmount': 'string',
            'EstimatedOnDemandCostWithCurrentCommitment': 'string'
        }
    },
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • Metadata (dict) --

      Information regarding this specific recommendation set.

      • RecommendationId (string) --

        The unique identifier for the recommendation set.

      • GenerationTimestamp (string) --

        The timestamp showing when the recommendations were generated.

    • SavingsPlansPurchaseRecommendation (dict) --

      Contains your request parameters, Savings Plan Recommendations Summary, and Details.

      • SavingsPlansType (string) --

        The requested Savings Plans recommendation type.

      • TermInYears (string) --

        The Savings Plans recommendation term in years, used to generate the recommendation.

      • PaymentOption (string) --

        The payment option used to generate the recommendation.

      • LookbackPeriodInDays (string) --

        The lookback period in days, used to generate the recommendation.

      • SavingsPlansPurchaseRecommendationDetails (list) --

        Details for the Savings Plans we recommend you to purchase to cover existing, Savings Plans eligible workloads.

        • (dict) --

          Details for your recommended Savings Plans.

          • SavingsPlansDetails (dict) --

            Details for your recommended Savings Plans.

            • Region (string) --

              A collection of AWS resources in a geographic area. Each AWS Region is isolated and independent of the other Regions.

            • InstanceFamily (string) --

              A group of instance types that Savings Plans applies to.

            • OfferingId (string) --

              The unique ID used to distinguish Savings Plans from one another.

          • AccountId (string) --

            The AccountID the recommendation is generated for.

          • UpfrontCost (string) --

            The upfront cost of the recommended Savings Plans, based on the selected payment option.

          • EstimatedROI (string) --

            The estimated return on investment based on the recommended Savings Plans purchased. This is calculated as estimatedSavingsAmount / estimatedSPCost *100.

          • CurrencyCode (string) --

            The currency code Amazon Web Services used to generate the recommendations and present potential savings.

          • EstimatedSPCost (string) --

            The cost of the recommended Savings Plans over the length of the lookback period.

          • EstimatedOnDemandCost (string) --

            The remaining On-Demand cost estimated to not be covered by the recommended Savings Plans, over the length of the lookback period.

          • EstimatedOnDemandCostWithCurrentCommitment (string) --

            The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.

          • EstimatedSavingsAmount (string) --

            The estimated savings amount based on the recommended Savings Plans over the length of the lookback period.

          • EstimatedSavingsPercentage (string) --

            The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.

          • HourlyCommitmentToPurchase (string) --

            The recommended hourly commitment level for the Savings Plans type, and configuration based on the usage during the lookback period.

          • EstimatedAverageUtilization (string) --

            The estimated utilization of the recommended Savings Plans.

          • EstimatedMonthlySavingsAmount (string) --

            The estimated monthly savings amount, based on the recommended Savings Plans.

          • CurrentMinimumHourlyOnDemandSpend (string) --

            The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.

          • CurrentMaximumHourlyOnDemandSpend (string) --

            The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.

          • CurrentAverageHourlyOnDemandSpend (string) --

            The average value of hourly On-Demand spend over the lookback period of the applicable usage type.

      • SavingsPlansPurchaseRecommendationSummary (dict) --

        Summary metrics for your Savings Plans Recommendations.

        • EstimatedROI (string) --

          The estimated return on investment based on the recommended Savings Plans and estimated savings.

        • CurrencyCode (string) --

          The currency code Amazon Web Services used to generate the recommendations and present potential savings.

        • EstimatedTotalCost (string) --

          The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost of Savings Plans during this term, and the remaining On-Demand usage.

        • CurrentOnDemandSpend (string) --

          The current total on demand spend of the applicable usage types over the lookback period.

        • EstimatedSavingsAmount (string) --

          The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.

        • TotalRecommendationCount (string) --

          The aggregate number of Savings Plans recommendations that exist for your account.

        • DailyCommitmentToPurchase (string) --

          The recommended Savings Plans cost on a daily (24 hourly) basis.

        • HourlyCommitmentToPurchase (string) --

          The recommended hourly commitment based on the recommendation parameters.

        • EstimatedSavingsPercentage (string) --

          The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated as estimatedSavingsAmount / CurrentOnDemandSpend *100.

        • EstimatedMonthlySavingsAmount (string) --

          The estimated monthly savings amount, based on the recommended Savings Plans purchase.

        • EstimatedOnDemandCostWithCurrentCommitment (string) --

          The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.

    • NextPageToken (string) --

      The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.