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.
{'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' } )
string
[REQUIRED]
A descriptive name for the workload estimate.
string
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is autopopulated if not provided.
string
The type of pricing rates to use for the estimate.
dict
The tags to apply to the workload estimate.
(string) --
(string) --
dict
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.
{'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()
dict
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) --
{'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' )
string
[REQUIRED]
The unique identifier of the workload estimate to retrieve.
dict
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.
{'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 )
dict
Filter workload estimates based on the creation date.
afterTimestamp (datetime) --
Include results after this timestamp.
beforeTimestamp (datetime) --
Include results before this timestamp.
dict
Filter workload estimates based on the expiration date.
afterTimestamp (datetime) --
Include results after this timestamp.
beforeTimestamp (datetime) --
Include results before this timestamp.
list
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).
string
A token to retrieve the next page of results.
integer
The maximum number of results to return per page.
dict
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.
{'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', ] )
list
The updated preferred rate types for the management account.
(string) --
list
The updated preferred rate types for member accounts.
(string) --
list
The updated preferred rate types for a standalone account.
(string) --
dict
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) --
{'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) )
string
[REQUIRED]
The unique identifier of the workload estimate to update.
string
The new name for the workload estimate.
datetime
The new expiration date for the workload estimate.
dict
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.