AWS Cost Explorer Service

2022/12/05 - AWS Cost Explorer Service - 2 new api methods

Changes  This release introduces two new APIs that offer a 1-click experience to refresh Savings Plans recommendations. The two APIs are StartSavingsPlansPurchaseRecommendationGeneration and ListSavingsPlansPurchaseRecommendationGeneration.

StartSavingsPlansPurchaseRecommendationGeneration (new) Link ¶

Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.

Note

StartSavingsPlansPurchaseRecommendationGeneration has no request syntax because no input parameters are needed to support this operation.

See also: AWS API Documentation

Request Syntax

client.start_savings_plans_purchase_recommendation_generation()
rtype

dict

returns

Response Syntax

{
    'RecommendationId': 'string',
    'GenerationStartedTime': 'string',
    'EstimatedCompletionTime': 'string'
}

Response Structure

  • (dict) --

    • RecommendationId (string) --

      The ID for this specific recommendation.

    • GenerationStartedTime (string) --

      The start time of the recommendation generation.

    • EstimatedCompletionTime (string) --

      The estimated time for when the recommendation generation will complete.

ListSavingsPlansPurchaseRecommendationGeneration (new) Link ¶

Retrieves a list of your historical recommendation generations within the past 30 days.

See also: AWS API Documentation

Request Syntax

client.list_savings_plans_purchase_recommendation_generation(
    GenerationStatus='SUCCEEDED'|'PROCESSING'|'FAILED',
    RecommendationIds=[
        'string',
    ],
    PageSize=123,
    NextPageToken='string'
)
type GenerationStatus

string

param GenerationStatus

The status of the recommendation generation.

type RecommendationIds

list

param RecommendationIds

The IDs for each specific recommendation.

  • (string) --

type PageSize

integer

param PageSize

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

type NextPageToken

string

param NextPageToken

The token to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'GenerationSummaryList': [
        {
            'RecommendationId': 'string',
            'GenerationStatus': 'SUCCEEDED'|'PROCESSING'|'FAILED',
            'GenerationStartedTime': 'string',
            'GenerationCompletionTime': 'string',
            'EstimatedCompletionTime': 'string'
        },
    ],
    'NextPageToken': 'string'
}

Response Structure

  • (dict) --

    • GenerationSummaryList (list) --

      The list of historical recommendation generations.

      • (dict) --

        The summary of the Savings Plans recommendation generation.

        • RecommendationId (string) --

          Indicates the ID for this specific recommendation.

        • GenerationStatus (string) --

          Indicates whether the recommendation generation succeeded, is processing, or failed.

        • GenerationStartedTime (string) --

          Indicates the start time of the recommendation generation.

        • GenerationCompletionTime (string) --

          Indicates the completion time of the recommendation generation.

        • EstimatedCompletionTime (string) --

          Indicates the estimated time for when the recommendation generation will complete.

    • NextPageToken (string) --

      The token to retrieve the next set of results.