BillingandCostManagementPricingCalculator / Client / batch_update_bill_scenario_usage_modification
batch_update_bill_scenario_usage_modification#
- BillingandCostManagementPricingCalculator.Client.batch_update_bill_scenario_usage_modification(**kwargs)#
Update a newly added or existing usage lines. You can update the usage amounts, usage hour, and usage group based on a usage ID and a Bill scenario ID.
See also: AWS API Documentation
Request Syntax
response = client.batch_update_bill_scenario_usage_modification( billScenarioId='string', usageModifications=[ { 'id': 'string', 'group': 'string', 'amounts': [ { 'startHour': datetime(2015, 1, 1), 'amount': 123.0 }, ] }, ] )
- Parameters:
billScenarioId (string) –
[REQUIRED]
The ID of the Bill Scenario for which you want to modify the usage lines.
usageModifications (list) –
[REQUIRED]
List of usage lines that you want to update in a Bill Scenario identified by the usage ID.
(dict) –
Represents an entry in a batch operation to update bill scenario usage modifications.
id (string) – [REQUIRED]
The unique identifier of the usage modification to update.
group (string) –
The updated group identifier for the usage modification.
amounts (list) –
The updated usage amounts for the modification.
(dict) –
Represents a usage amount for a specific time period.
startHour (datetime) – [REQUIRED]
The start hour of the usage period.
amount (float) – [REQUIRED]
The usage amount for the period.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'serviceCode': 'string', 'usageType': 'string', 'operation': 'string', 'location': 'string', 'availabilityZone': 'string', 'id': 'string', 'group': 'string', 'usageAccountId': 'string', 'quantities': [ { 'startHour': datetime(2015, 1, 1), 'unit': 'string', 'amount': 123.0 }, ], 'historicalUsage': { 'serviceCode': 'string', 'usageType': 'string', 'operation': 'string', 'location': 'string', 'usageAccountId': 'string', 'billInterval': { 'start': datetime(2015, 1, 1), 'end': datetime(2015, 1, 1) }, 'filterExpression': { 'and': [ {'... recursive ...'}, ], 'or': [ {'... recursive ...'}, ], 'not': {'... recursive ...'}, 'costCategories': { 'key': 'string', 'matchOptions': [ 'string', ], 'values': [ 'string', ] }, 'dimensions': { 'key': 'string', 'matchOptions': [ 'string', ], 'values': [ 'string', ] }, 'tags': { 'key': 'string', 'matchOptions': [ 'string', ], 'values': [ 'string', ] } } } }, ], 'errors': [ { 'id': 'string', 'errorMessage': 'string', 'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR' }, ] }
Response Structure
(dict) –
items (list) –
Returns the list of successful usage line items that were updated for a Bill Scenario.
(dict) –
Represents a usage modification item in a bill scenario.
serviceCode (string) –
The Amazon Web Services service code for this usage modification.
usageType (string) –
The type of usage being modified.
operation (string) –
The specific operation associated with this usage modification.
location (string) –
The location associated with this usage modification.
availabilityZone (string) –
The availability zone associated with this usage modification, if applicable.
id (string) –
The unique identifier of the usage modification.
group (string) –
The group identifier for the usage modification.
usageAccountId (string) –
The Amazon Web Services account ID associated with this usage modification.
quantities (list) –
The modified usage quantities.
(dict) –
Represents a usage quantity with associated unit and time period.
startHour (datetime) –
The start hour of the usage period.
unit (string) –
The unit of measurement for the usage quantity.
amount (float) –
The numeric value of the usage quantity.
historicalUsage (dict) –
Historical usage data associated with this modification, if available.
serviceCode (string) –
The Amazon Web Services service code associated with the usage.
usageType (string) –
The type of usage.
operation (string) –
The specific operation associated with the usage.
location (string) –
The location associated with the usage.
usageAccountId (string) –
The Amazon Web Services account ID associated with the usage.
billInterval (dict) –
The time interval for the historical usage data.
start (datetime) –
The start date and time of the interval.
end (datetime) –
The end date and time of the interval.
filterExpression (dict) –
An optional filter expression to apply to the historical usage data.
and (list) –
A list of expressions to be combined with AND logic.
(dict) –
Represents a complex filtering expression for cost and usage data.
or (list) –
A list of expressions to be combined with OR logic.
(dict) –
Represents a complex filtering expression for cost and usage data.
not (dict) –
An expression to be negated.
costCategories (dict) –
Filters based on cost categories.
key (string) –
The key or attribute to filter on.
matchOptions (list) –
The match options for the filter (e.g., equals, contains).
(string) –
values (list) –
The values to match against.
(string) –
dimensions (dict) –
Filters based on dimensions (e.g., service, operation).
key (string) –
The key or attribute to filter on.
matchOptions (list) –
The match options for the filter (e.g., equals, contains).
(string) –
values (list) –
The values to match against.
(string) –
tags (dict) –
Filters based on resource tags.
key (string) –
The key or attribute to filter on.
matchOptions (list) –
The match options for the filter (e.g., equals, contains).
(string) –
values (list) –
The values to match against.
(string) –
errors (list) –
Returns the list of error reasons and usage line item IDs that could not be updated for the Bill Scenario.
(dict) –
Represents an error that occurred when updating usage in a Bill Scenario.
id (string) –
The ID of the error.
errorMessage (string) –
The message that describes the error.
errorCode (string) –
The code associated with the error.
Exceptions
BillingandCostManagementPricingCalculator.Client.exceptions.ValidationException
BillingandCostManagementPricingCalculator.Client.exceptions.DataUnavailableException
BillingandCostManagementPricingCalculator.Client.exceptions.ServiceQuotaExceededException
BillingandCostManagementPricingCalculator.Client.exceptions.InternalServerException
BillingandCostManagementPricingCalculator.Client.exceptions.ResourceNotFoundException
BillingandCostManagementPricingCalculator.Client.exceptions.AccessDeniedException
BillingandCostManagementPricingCalculator.Client.exceptions.ThrottlingException