Skip to main content

workload_estimates

Creates, updates, deletes, gets or lists a workload_estimates resource.

Overview

Nameworkload_estimates
TypeResource
Idaws.bcm_pricing_calculator.workload_estimates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the retrieved workload estimate. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
namestringThe name of the retrieved workload estimate. (pattern: <code>[a-zA-Z0-9-]+</code>)
cost_currencystringThe currency of the estimated cost. (USD)
created_atstring (date-time)The timestamp when the workload estimate was created.
expires_atstring (date-time)The timestamp when the workload estimate will expire.
failure_messagestringAn error message if the workload estimate retrieval failed.
rate_timestampstring (date-time)The timestamp of the pricing rates used for the estimate.
rate_typestringThe type of pricing rates used for the estimate. (BEFORE_DISCOUNTS, AFTER_DISCOUNTS, AFTER_DISCOUNTS_AND_COMMITMENTS)
statusstringThe current status of the workload estimate. (UPDATING, VALID, INVALID, ACTION_NEEDED)
total_costnumber (double)The total estimated cost for the workload.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workload_estimateselectregionRetrieves details of a specific workload estimate.
list_workload_estimatesselectregionLists all workload estimates for the account.
create_workload_estimateinsertregion, nameCreates a new workload estimate to model costs for a specific workload.
update_workload_estimateupdateregion, identifierUpdates an existing workload estimate.
delete_workload_estimatedeleteregionDeletes an existing workload estimate.
batch_create_workload_estimate_usageexecregion, workloadEstimateId, usageCreate Amazon Web Services service usage that you want to model in a Workload Estimate. The BatchCreateWorkloadEstimateUsage operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:CreateWorkloadEstimateUsage in your policies.
batch_delete_workload_estimate_usageexecregion, workloadEstimateId, idsDelete usage that you have created in a Workload estimate. You can only delete usage that you had added and cannot model deletion (or removal) of a existing usage. If you want model removal of an existing usage, see BatchUpdateWorkloadEstimateUsage. The BatchDeleteWorkloadEstimateUsage operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:DeleteWorkloadEstimateUsage in your policies.
batch_update_workload_estimate_usageexecregion, workloadEstimateId, usageUpdate a newly added or existing usage lines. You can update the usage amounts and usage group based on a usage ID and a Workload estimate ID. The BatchUpdateWorkloadEstimateUsage operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:UpdateWorkloadEstimateUsage in your policies.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves details of a specific workload estimate.

SELECT
id,
name,
cost_currency,
created_at,
expires_at,
failure_message,
rate_timestamp,
rate_type,
status,
total_cost
FROM aws.bcm_pricing_calculator.workload_estimates
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.bcm_pricing_calculator.workload_estimates (
name,
clientToken,
rateType,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ clientToken }}',
'{{ rateType }}',
'{{ tags }}',
'{{ region }}'
RETURNING
id,
name,
cost_currency,
created_at,
expires_at,
failure_message,
rate_timestamp,
rate_type,
status,
total_cost
;

UPDATE examples

Updates an existing workload estimate.

UPDATE aws.bcm_pricing_calculator.workload_estimates
SET
identifier = '{{ identifier }}',
name = '{{ name }}',
expiresAt = '{{ expiresAt }}'
WHERE
region = '{{ region }}' --required
AND identifier = '{{ identifier }}' --required
RETURNING
id,
name,
cost_currency,
created_at,
expires_at,
failure_message,
rate_timestamp,
rate_type,
status,
total_cost;

DELETE examples

Deletes an existing workload estimate.

DELETE FROM aws.bcm_pricing_calculator.workload_estimates
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Create Amazon Web Services service usage that you want to model in a Workload Estimate. The BatchCreateWorkloadEstimateUsage operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:CreateWorkloadEstimateUsage in your policies.

EXEC aws.bcm_pricing_calculator.workload_estimates.batch_create_workload_estimate_usage
@region='{{ region }}' --required
@@json=
'{
"workloadEstimateId": "{{ workloadEstimateId }}",
"usage": "{{ usage }}",
"clientToken": "{{ clientToken }}"
}'
;