2025/03/27 - AWS Billing and Cost Management Pricing Calculator - 6 updated api methods
Changes Added standaloneAccountRateTypeSelections for GetPreferences and UpdatePreferences APIs. Added STALE enum value to status attribute in GetBillScenario and UpdateBillScenario APIs.
{'status': {'STALE'}}
Creates a new bill scenario to model potential changes to Amazon Web Services usage and costs.
See also: AWS API Documentation
Request Syntax
client.create_bill_scenario(
name='string',
clientToken='string',
tags={
'string': 'string'
}
)
string
[REQUIRED]
A descriptive name for the bill scenario.
string
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is autopopulated if not provided.
dict
The tags to apply to the bill scenario.
(string) --
(string) --
dict
Response Syntax
{
'id': 'string',
'name': 'string',
'billInterval': {
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
'status': 'READY'|'LOCKED'|'FAILED'|'STALE',
'createdAt': datetime(2015, 1, 1),
'expiresAt': datetime(2015, 1, 1),
'failureMessage': 'string'
}
Response Structure
(dict) --
id (string) --
The unique identifier for the created bill scenario.
name (string) --
The name of the created bill scenario.
billInterval (dict) --
The time period covered by the bill scenario.
start (datetime) --
The start date and time of the interval.
end (datetime) --
The end date and time of the interval.
status (string) --
The current status of the bill scenario.
createdAt (datetime) --
The timestamp when the bill scenario was created.
expiresAt (datetime) --
The timestamp when the bill scenario will expire.
failureMessage (string) --
An error message if the bill scenario creation failed.
{'status': {'STALE'}}
Retrieves details of a specific bill scenario.
See also: AWS API Documentation
Request Syntax
client.get_bill_scenario(
identifier='string'
)
string
[REQUIRED]
The unique identifier of the bill scenario to retrieve.
dict
Response Syntax
{
'id': 'string',
'name': 'string',
'billInterval': {
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
'status': 'READY'|'LOCKED'|'FAILED'|'STALE',
'createdAt': datetime(2015, 1, 1),
'expiresAt': datetime(2015, 1, 1),
'failureMessage': 'string'
}
Response Structure
(dict) --
id (string) --
The unique identifier of the retrieved bill scenario.
name (string) --
The name of the retrieved bill scenario.
billInterval (dict) --
The time period covered by the bill scenario.
start (datetime) --
The start date and time of the interval.
end (datetime) --
The end date and time of the interval.
status (string) --
The current status of the bill scenario.
createdAt (datetime) --
The timestamp when the bill scenario was created.
expiresAt (datetime) --
The timestamp when the bill scenario will expire.
failureMessage (string) --
An error message if the bill scenario retrieval failed.
{'standaloneAccountRateTypeSelections': ['BEFORE_DISCOUNTS | AFTER_DISCOUNTS']}
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',
],
'memberAccountRateTypeSelections': [
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
],
'standaloneAccountRateTypeSelections': [
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
]
}
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) --
{'items': {'status': {'STALE'}}}
Lists all bill scenarios for the account.
See also: AWS API Documentation
Request Syntax
client.list_bill_scenarios(
filters=[
{
'name': 'STATUS'|'NAME',
'values': [
'string',
],
'matchOption': 'EQUALS'|'STARTS_WITH'|'CONTAINS'
},
],
createdAtFilter={
'afterTimestamp': datetime(2015, 1, 1),
'beforeTimestamp': datetime(2015, 1, 1)
},
expiresAtFilter={
'afterTimestamp': datetime(2015, 1, 1),
'beforeTimestamp': datetime(2015, 1, 1)
},
nextToken='string',
maxResults=123
)
list
Filters to apply to the list of bill scenarios.
(dict) --
Represents a filter for listing bill scenarios.
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).
dict
Filter bill scenarios based on the creation date.
afterTimestamp (datetime) --
Include results after this timestamp.
beforeTimestamp (datetime) --
Include results before this timestamp.
dict
Filter bill scenarios based on the expiration date.
afterTimestamp (datetime) --
Include results after this timestamp.
beforeTimestamp (datetime) --
Include results before this timestamp.
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',
'billInterval': {
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
'status': 'READY'|'LOCKED'|'FAILED'|'STALE',
'createdAt': datetime(2015, 1, 1),
'expiresAt': datetime(2015, 1, 1),
'failureMessage': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The list of bill scenarios for the account.
(dict) --
Provides a summary of a bill scenario.
id (string) --
The unique identifier of the bill scenario.
name (string) --
The name of the bill scenario.
billInterval (dict) --
The time period covered by the bill scenario.
start (datetime) --
The start date and time of the interval.
end (datetime) --
The end date and time of the interval.
status (string) --
The current status of the bill scenario.
createdAt (datetime) --
The timestamp when the bill scenario was created.
expiresAt (datetime) --
The timestamp when the bill scenario will expire.
failureMessage (string) --
An error message if the bill scenario creation or processing failed.
nextToken (string) --
A token to retrieve the next page of results, if any.
{'status': {'STALE'}}
Updates an existing bill scenario.
See also: AWS API Documentation
Request Syntax
client.update_bill_scenario(
identifier='string',
name='string',
expiresAt=datetime(2015, 1, 1)
)
string
[REQUIRED]
The unique identifier of the bill scenario to update.
string
The new name for the bill scenario.
datetime
The new expiration date for the bill scenario.
dict
Response Syntax
{
'id': 'string',
'name': 'string',
'billInterval': {
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
'status': 'READY'|'LOCKED'|'FAILED'|'STALE',
'createdAt': datetime(2015, 1, 1),
'expiresAt': datetime(2015, 1, 1),
'failureMessage': 'string'
}
Response Structure
(dict) --
id (string) --
The unique identifier of the updated bill scenario.
name (string) --
The updated name of the bill scenario.
billInterval (dict) --
The time period covered by the updated bill scenario.
start (datetime) --
The start date and time of the interval.
end (datetime) --
The end date and time of the interval.
status (string) --
The current status of the updated bill scenario.
createdAt (datetime) --
The timestamp when the bill scenario was originally created.
expiresAt (datetime) --
The updated expiration timestamp for the bill scenario.
failureMessage (string) --
An error message if the bill scenario update failed.
{'standaloneAccountRateTypeSelections': ['BEFORE_DISCOUNTS | AFTER_DISCOUNTS']}
Updates the preferences for Pricing Calculator.
See also: AWS API Documentation
Request Syntax
client.update_preferences(
managementAccountRateTypeSelections=[
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
],
memberAccountRateTypeSelections=[
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
],
standaloneAccountRateTypeSelections=[
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
]
)
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',
],
'memberAccountRateTypeSelections': [
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
],
'standaloneAccountRateTypeSelections': [
'BEFORE_DISCOUNTS'|'AFTER_DISCOUNTS',
]
}
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) --