Budgets / Client / describe_budget_performance_history

describe_budget_performance_history#

Budgets.Client.describe_budget_performance_history(**kwargs)#

Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history isn’t available for ANNUAL budgets.

See also: AWS API Documentation

Request Syntax

response = client.describe_budget_performance_history(
    AccountId='string',
    BudgetName='string',
    TimePeriod={
        'Start': datetime(2015, 1, 1),
        'End': datetime(2015, 1, 1)
    },
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • AccountId (string) –

    [REQUIRED]

    The account ID of the user. It’s a 12-digit number.

  • BudgetName (string) –

    [REQUIRED]

    A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.

  • TimePeriod (dict) –

    Retrieves how often the budget went into an ALARM state for the specified time period.

    • Start (datetime) –

      The start date for a budget. If you created your budget and didn’t specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn’t set a start date, Amazon Web Services set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, Amazon Web Services set your start date to 01/01/18 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.

      You can change your start date with the UpdateBudget operation.

    • End (datetime) –

      The end date for a budget. If you didn’t specify an end date, Amazon Web Services set your end date to 06/15/87 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.

      After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

  • MaxResults (integer) – An integer that represents how many entries a paginated response contains. The maximum is 100.

  • NextToken (string) – A generic string.

Return type:

dict

Returns:

Response Syntax

{
    'BudgetPerformanceHistory': {
        'BudgetName': 'string',
        'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'|'RI_COVERAGE'|'SAVINGS_PLANS_UTILIZATION'|'SAVINGS_PLANS_COVERAGE',
        'CostFilters': {
            'string': [
                'string',
            ]
        },
        'CostTypes': {
            'IncludeTax': True|False,
            'IncludeSubscription': True|False,
            'UseBlended': True|False,
            'IncludeRefund': True|False,
            'IncludeCredit': True|False,
            'IncludeUpfront': True|False,
            'IncludeRecurring': True|False,
            'IncludeOtherSubscription': True|False,
            'IncludeSupport': True|False,
            'IncludeDiscount': True|False,
            'UseAmortized': True|False
        },
        'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY',
        'BudgetedAndActualAmountsList': [
            {
                'BudgetedAmount': {
                    'Amount': 'string',
                    'Unit': 'string'
                },
                'ActualAmount': {
                    'Amount': 'string',
                    'Unit': 'string'
                },
                'TimePeriod': {
                    'Start': datetime(2015, 1, 1),
                    'End': datetime(2015, 1, 1)
                }
            },
        ]
    },
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • BudgetPerformanceHistory (dict) –

      The history of how often the budget has gone into an ALARM state.

      For DAILY budgets, the history saves the state of the budget for the last 60 days. For MONTHLY budgets, the history saves the state of the budget for the current month plus the last 12 months. For QUARTERLY budgets, the history saves the state of the budget for the last four quarters.

      • BudgetName (string) –

        A string that represents the budget name. The “:” and “" characters, and the “/action/” substring, aren’t allowed.

      • BudgetType (string) –

        The type of a budget. It must be one of the following types:

        COST, USAGE, RI_UTILIZATION, RI_COVERAGE, SAVINGS_PLANS_UTILIZATION, or SAVINGS_PLANS_COVERAGE.

      • CostFilters (dict) –

        The history of the cost filters for a budget during the specified time period.

        • (string) –

          A generic string.

          • (list) –

            • (string) –

      • CostTypes (dict) –

        The history of the cost types for a budget during the specified time period.

        • IncludeTax (boolean) –

          Specifies whether a budget includes taxes.

          The default value is true.

        • IncludeSubscription (boolean) –

          Specifies whether a budget includes subscriptions.

          The default value is true.

        • UseBlended (boolean) –

          Specifies whether a budget uses a blended rate.

          The default value is false.

        • IncludeRefund (boolean) –

          Specifies whether a budget includes refunds.

          The default value is true.

        • IncludeCredit (boolean) –

          Specifies whether a budget includes credits.

          The default value is true.

        • IncludeUpfront (boolean) –

          Specifies whether a budget includes upfront RI costs.

          The default value is true.

        • IncludeRecurring (boolean) –

          Specifies whether a budget includes recurring fees such as monthly RI fees.

          The default value is true.

        • IncludeOtherSubscription (boolean) –

          Specifies whether a budget includes non-RI subscription costs.

          The default value is true.

        • IncludeSupport (boolean) –

          Specifies whether a budget includes support subscription fees.

          The default value is true.

        • IncludeDiscount (boolean) –

          Specifies whether a budget includes discounts.

          The default value is true.

        • UseAmortized (boolean) –

          Specifies whether a budget uses the amortized rate.

          The default value is false.

      • TimeUnit (string) –

        The time unit of the budget, such as MONTHLY or QUARTERLY.

      • BudgetedAndActualAmountsList (list) –

        A list of amounts of cost or usage that you created budgets for, which are compared to your actual costs or usage.

        • (dict) –

          The amount of cost or usage that you created the budget for, compared to your actual costs or usage.

          • BudgetedAmount (dict) –

            The amount of cost or usage that you created the budget for.

            • Amount (string) –

              The cost or usage amount that’s associated with a budget forecast, actual spend, or budget threshold.

            • Unit (string) –

              The unit of measurement that’s used for the budget forecast, actual spend, or budget threshold.

          • ActualAmount (dict) –

            Your actual costs or usage for a budget period.

            • Amount (string) –

              The cost or usage amount that’s associated with a budget forecast, actual spend, or budget threshold.

            • Unit (string) –

              The unit of measurement that’s used for the budget forecast, actual spend, or budget threshold.

          • TimePeriod (dict) –

            The time period that’s covered by this budget comparison.

            • Start (datetime) –

              The start date for a budget. If you created your budget and didn’t specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn’t set a start date, Amazon Web Services set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, Amazon Web Services set your start date to 01/01/18 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.

              You can change your start date with the UpdateBudget operation.

            • End (datetime) –

              The end date for a budget. If you didn’t specify an end date, Amazon Web Services set your end date to 06/15/87 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.

              After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

    • NextToken (string) –

      A generic string.

Exceptions