AWS Billing and Cost Management Pricing Calculator

2025/05/29 - AWS Billing and Cost Management Pricing Calculator - 6 updated api methods

Changes  Add AFTER_DISCOUNTS_AND_COMMITMENTS to Workload Estimate Rate Type. Set ListWorkLoadEstimateUsage maxResults range to minimum of 0 and maximum of 300.

CreateWorkloadEstimate (updated) Link ¶
Changes (both)
{'rateType': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}

Creates a new workload estimate to model costs for a specific workload.

See also: AWS API Documentation

Request Syntax

client.create_workload_estimate(
    name='string',
    clientToken='string',
    rateType='BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    tags={
        'string': 'string'
    }
)
type name:

string

param name:

[REQUIRED]

A descriptive name for the workload estimate.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier to ensure idempotency of the request.

This field is autopopulated if not provided.

type rateType:

string

param rateType:

The type of pricing rates to use for the estimate.

type tags:

dict

param tags:

The tags to apply to the workload estimate.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier for the created workload estimate.

    • name (string) --

      The name of the created workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was created.

    • expiresAt (datetime) --

      The timestamp when the workload estimate will expire.

    • rateType (string) --

      The type of pricing rates used for the estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the estimate.

    • status (string) --

      The current status of the workload estimate.

    • totalCost (float) --

      The total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate creation failed.

GetPreferences (updated) Link ¶
Changes (response)
{'managementAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'},
 'memberAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'},
 'standaloneAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}

Retrieves the current preferences for Pricing Calculator.

See also: AWS API Documentation

Request Syntax

client.get_preferences()
rtype:

dict

returns:

Response Syntax

{
    'managementAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    'memberAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    'standaloneAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ]
}

Response Structure

  • (dict) --

    • managementAccountRateTypeSelections (list) --

      The preferred rate types for the management account.

      • (string) --

    • memberAccountRateTypeSelections (list) --

      The preferred rate types for member accounts.

      • (string) --

    • standaloneAccountRateTypeSelections (list) --

      The preferred rate types for a standalone account.

      • (string) --

GetWorkloadEstimate (updated) Link ¶
Changes (response)
{'rateType': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}

Retrieves details of a specific workload estimate.

See also: AWS API Documentation

Request Syntax

client.get_workload_estimate(
    identifier='string'
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the workload estimate to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier of the retrieved workload estimate.

    • name (string) --

      The name of the retrieved workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was created.

    • expiresAt (datetime) --

      The timestamp when the workload estimate will expire.

    • rateType (string) --

      The type of pricing rates used for the estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the estimate.

    • status (string) --

      The current status of the workload estimate.

    • totalCost (float) --

      The total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate retrieval failed.

ListWorkloadEstimates (updated) Link ¶
Changes (response)
{'items': {'rateType': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}}

Lists all workload estimates for the account.

See also: AWS API Documentation

Request Syntax

client.list_workload_estimates(
    createdAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    expiresAtFilter={
        'afterTimestamp': datetime(2015, 1, 1),
        'beforeTimestamp': datetime(2015, 1, 1)
    },
    filters=[
        {
            'name': 'STATUS'|'NAME',
            'values': [
                'string',
            ],
            'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
        },
    ],
    nextToken='string',
    maxResults=123
)
type createdAtFilter:

dict

param createdAtFilter:

Filter workload estimates based on the creation date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type expiresAtFilter:

dict

param expiresAtFilter:

Filter workload estimates based on the expiration date.

  • afterTimestamp (datetime) --

    Include results after this timestamp.

  • beforeTimestamp (datetime) --

    Include results before this timestamp.

type filters:

list

param filters:

Filters to apply to the list of workload estimates.

  • (dict) --

    Represents a filter for listing workload estimates.

    • name (string) -- [REQUIRED]

      The name of the filter attribute.

    • values (list) -- [REQUIRED]

      The values to filter by.

      • (string) --

    • matchOption (string) --

      The match option for the filter (e.g., equals, contains).

type nextToken:

string

param nextToken:

A token to retrieve the next page of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'createdAt': datetime(2015, 1, 1),
            'expiresAt': datetime(2015, 1, 1),
            'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
            'rateTimestamp': datetime(2015, 1, 1),
            'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
            'totalCost': 123.0,
            'costCurrency': 'USD',
            'failureMessage': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • items (list) --

      The list of workload estimates for the account.

      • (dict) --

        Provides a summary of a workload estimate.

        • id (string) --

          The unique identifier of the workload estimate.

        • name (string) --

          The name of the workload estimate.

        • createdAt (datetime) --

          The timestamp when the workload estimate was created.

        • expiresAt (datetime) --

          The timestamp when the workload estimate will expire.

        • rateType (string) --

          The type of pricing rates used for the estimate.

        • rateTimestamp (datetime) --

          The timestamp of the pricing rates used for the estimate.

        • status (string) --

          The current status of the workload estimate.

        • totalCost (float) --

          The total estimated cost for the workload.

        • costCurrency (string) --

          The currency of the estimated cost.

        • failureMessage (string) --

          An error message if the workload estimate creation or processing failed.

    • nextToken (string) --

      A token to retrieve the next page of results, if any.

UpdatePreferences (updated) Link ¶
Changes (both)
{'managementAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'},
 'memberAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'},
 'standaloneAccountRateTypeSelections': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}

Updates the preferences for Pricing Calculator.

See also: AWS API Documentation

Request Syntax

client.update_preferences(
    managementAccountRateTypeSelections=[
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    memberAccountRateTypeSelections=[
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    standaloneAccountRateTypeSelections=[
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ]
)
type managementAccountRateTypeSelections:

list

param managementAccountRateTypeSelections:

The updated preferred rate types for the management account.

  • (string) --

type memberAccountRateTypeSelections:

list

param memberAccountRateTypeSelections:

The updated preferred rate types for member accounts.

  • (string) --

type standaloneAccountRateTypeSelections:

list

param standaloneAccountRateTypeSelections:

The updated preferred rate types for a standalone account.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'managementAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    'memberAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ],
    'standaloneAccountRateTypeSelections': [
        'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    ]
}

Response Structure

  • (dict) --

    • managementAccountRateTypeSelections (list) --

      The updated preferred rate types for the management account.

      • (string) --

    • memberAccountRateTypeSelections (list) --

      The updated preferred rate types for member accounts.

      • (string) --

    • standaloneAccountRateTypeSelections (list) --

      The updated preferred rate types for a standalone account.

      • (string) --

UpdateWorkloadEstimate (updated) Link ¶
Changes (response)
{'rateType': {'AFTER_DISCOUNTS_AND_COMMITMENTS'}}

Updates an existing workload estimate.

See also: AWS API Documentation

Request Syntax

client.update_workload_estimate(
    identifier='string',
    name='string',
    expiresAt=datetime(2015, 1, 1)
)
type identifier:

string

param identifier:

[REQUIRED]

The unique identifier of the workload estimate to update.

type name:

string

param name:

The new name for the workload estimate.

type expiresAt:

datetime

param expiresAt:

The new expiration date for the workload estimate.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'expiresAt': datetime(2015, 1, 1),
    'rateType': 'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS'|'AFTER_DISCOUNTS_AND_COMMITMENTS',
    'rateTimestamp': datetime(2015, 1, 1),
    'status': 'UPDATING'|'VALID'|'INVALID'|'ACTION_NEEDED',
    'totalCost': 123.0,
    'costCurrency': 'USD',
    'failureMessage': 'string'
}

Response Structure

  • (dict) --

    Mixin for common fields returned by CRUD APIs

    • id (string) --

      The unique identifier of the updated workload estimate.

    • name (string) --

      The updated name of the workload estimate.

    • createdAt (datetime) --

      The timestamp when the workload estimate was originally created.

    • expiresAt (datetime) --

      The updated expiration timestamp for the workload estimate.

    • rateType (string) --

      The type of pricing rates used for the updated estimate.

    • rateTimestamp (datetime) --

      The timestamp of the pricing rates used for the updated estimate.

    • status (string) --

      The current status of the updated workload estimate.

    • totalCost (float) --

      The updated total estimated cost for the workload.

    • costCurrency (string) --

      The currency of the updated estimated cost.

    • failureMessage (string) --

      An error message if the workload estimate update failed.