BillingandCostManagementPricingCalculator / Client / batch_create_workload_estimate_usage
batch_create_workload_estimate_usage#
- BillingandCostManagementPricingCalculator.Client.batch_create_workload_estimate_usage(**kwargs)#
Create Amazon Web Services service usage that you want to model in a Workload Estimate.
See also: AWS API Documentation
Request Syntax
response = client.batch_create_workload_estimate_usage( workloadEstimateId='string', usage=[ { 'serviceCode': 'string', 'usageType': 'string', 'operation': 'string', 'key': 'string', 'group': 'string', 'usageAccountId': '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', ] } } } }, ], clientToken='string' )
- Parameters:
workloadEstimateId (string) –
[REQUIRED]
The ID of the Workload estimate for which you want to create the modeled usage.
usage (list) –
[REQUIRED]
List of usage that you want to model in the Workload estimate.
(dict) –
Represents an entry in a batch operation to create workload estimate usage.
serviceCode (string) – [REQUIRED]
The Amazon Web Services service code for this usage estimate.
usageType (string) – [REQUIRED]
The type of usage being estimated.
operation (string) – [REQUIRED]
The specific operation associated with this usage estimate.
key (string) – [REQUIRED]
A unique identifier for this entry in the batch operation.
group (string) –
An optional group identifier for the usage estimate.
usageAccountId (string) – [REQUIRED]
The Amazon Web Services account ID associated with this usage estimate.
amount (float) – [REQUIRED]
The estimated usage amount.
historicalUsage (dict) –
Historical usage data associated with this estimate, if available.
serviceCode (string) – [REQUIRED]
The Amazon Web Services service code associated with the usage.
usageType (string) – [REQUIRED]
The type of usage.
operation (string) – [REQUIRED]
The specific operation associated with the usage.
location (string) –
The location associated with the usage.
usageAccountId (string) – [REQUIRED]
The Amazon Web Services account ID associated with the usage.
billInterval (dict) – [REQUIRED]
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) – [REQUIRED]
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) –
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'serviceCode': 'string', 'usageType': 'string', 'operation': 'string', 'location': 'string', 'id': 'string', 'usageAccountId': 'string', 'group': 'string', 'quantity': { 'unit': 'string', 'amount': 123.0 }, 'cost': 123.0, 'currency': 'USD', 'status': 'VALID'|'INVALID'|'STALE', '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', ] } } }, 'key': 'string' }, ], 'errors': [ { 'key': 'string', 'errorCode': 'BAD_REQUEST'|'NOT_FOUND'|'CONFLICT'|'INTERNAL_SERVER_ERROR', 'errorMessage': 'string' }, ] }
Response Structure
(dict) –
items (list) –
Returns the list of successful usage line items that were created for the Workload estimate.
(dict) –
Represents a successfully created item in a batch operation for workload estimate usage.
serviceCode (string) –
The Amazon Web Services service code for this usage estimate.
usageType (string) –
The type of usage that was estimated.
operation (string) –
The specific operation associated with this usage estimate.
location (string) –
The location associated with this usage estimate.
id (string) –
The unique identifier assigned to the created usage estimate.
usageAccountId (string) –
The Amazon Web Services account ID associated with the created usage estimate.
group (string) –
The group identifier for the created usage estimate.
quantity (dict) –
The estimated usage quantity.
unit (string) –
The unit of measurement for the usage quantity.
amount (float) –
The numeric value of the usage quantity.
cost (float) –
The estimated cost associated with this usage.
currency (string) –
The currency of the estimated cost.
status (string) –
The current status of the created usage estimate.
historicalUsage (dict) –
Historical usage data associated with this estimate, 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) –
key (string) –
The key of the successfully created entry.
errors (list) –
Returns the list of errors reason and the usage item keys that cannot be created in the Workload estimate.
(dict) –
Represents an error that occurred during a batch create operation for workload estimate usage.
key (string) –
The key of the entry that caused the error.
errorCode (string) –
The error code associated with the failed operation.
errorMessage (string) –
A descriptive message for the error that occurred.
Exceptions
BillingandCostManagementPricingCalculator.Client.exceptions.ConflictException
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