workload_estimates
Creates, updates, deletes, gets or lists a workload_estimates resource.
Overview
| Name | workload_estimates |
| Type | Resource |
| Id | aws.bcm_pricing_calculator.workload_estimates |
Fields
The following fields are returned by SELECT queries:
- get_workload_estimate
- list_workload_estimates
| Name | Datatype | Description |
|---|---|---|
id | string | The 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>) |
name | string | The name of the retrieved workload estimate. (pattern: <code>[a-zA-Z0-9-]+</code>) |
cost_currency | string | The currency of the estimated cost. (USD) |
created_at | string (date-time) | The timestamp when the workload estimate was created. |
expires_at | string (date-time) | The timestamp when the workload estimate will expire. |
failure_message | string | An error message if the workload estimate retrieval failed. |
rate_timestamp | string (date-time) | The timestamp of the pricing rates used for the estimate. |
rate_type | string | The type of pricing rates used for the estimate. (BEFORE_DISCOUNTS, AFTER_DISCOUNTS, AFTER_DISCOUNTS_AND_COMMITMENTS) |
status | string | The current status of the workload estimate. (UPDATING, VALID, INVALID, ACTION_NEEDED) |
total_cost | number (double) | The total estimated cost for the workload. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the 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>) |
name | string | The name of the workload estimate. (pattern: <code>[a-zA-Z0-9-]+</code>) |
cost_currency | string | The currency of the estimated cost. (USD) |
created_at | string (date-time) | The timestamp when the workload estimate was created. |
expires_at | string (date-time) | The timestamp when the workload estimate will expire. |
failure_message | string | An error message if the workload estimate creation or processing failed. |
rate_timestamp | string (date-time) | The timestamp of the pricing rates used for the estimate. |
rate_type | string | The type of pricing rates used for the estimate. (BEFORE_DISCOUNTS, AFTER_DISCOUNTS, AFTER_DISCOUNTS_AND_COMMITMENTS) |
status | string | The current status of the workload estimate. (UPDATING, VALID, INVALID, ACTION_NEEDED) |
total_cost | number (double) | The total estimated cost for the workload. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workload_estimate | select | region | Retrieves details of a specific workload estimate. | |
list_workload_estimates | select | region | Lists all workload estimates for the account. | |
create_workload_estimate | insert | region, name | Creates a new workload estimate to model costs for a specific workload. | |
update_workload_estimate | update | region, identifier | Updates an existing workload estimate. | |
delete_workload_estimate | delete | region | Deletes an existing workload estimate. | |
batch_create_workload_estimate_usage | exec | region, workloadEstimateId, usage | 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. | |
batch_delete_workload_estimate_usage | exec | region, workloadEstimateId, ids | Delete 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_usage | exec | region, workloadEstimateId, usage | Update 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_workload_estimate
- list_workload_estimates
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
;
Lists all workload estimates for the account.
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
- create_workload_estimate
- Manifest
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
;
# Description fields are for documentation purposes
- name: workload_estimates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workload_estimates resource.
- name: name
value: "{{ name }}"
description: |
A descriptive name for the workload estimate.
- name: clientToken
value: "{{ clientToken }}"
description: |
A unique, case-sensitive identifier to ensure idempotency of the request.
- name: rateType
value: "{{ rateType }}"
description: |
The type of pricing rates to use for the estimate.
valid_values: ['BEFORE_DISCOUNTS', 'AFTER_DISCOUNTS', 'AFTER_DISCOUNTS_AND_COMMITMENTS']
- name: tags
value: "{{ tags }}"
description: |
The tags to apply to the workload estimate.
UPDATE examples
- update_workload_estimate
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
- delete_workload_estimate
Deletes an existing workload estimate.
DELETE FROM aws.bcm_pricing_calculator.workload_estimates
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- batch_create_workload_estimate_usage
- batch_delete_workload_estimate_usage
- batch_update_workload_estimate_usage
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 }}"
}'
;
Delete 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.
EXEC aws.bcm_pricing_calculator.workload_estimates.batch_delete_workload_estimate_usage
@region='{{ region }}' --required
@@json=
'{
"workloadEstimateId": "{{ workloadEstimateId }}",
"ids": "{{ ids }}"
}'
;
Update 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.
EXEC aws.bcm_pricing_calculator.workload_estimates.batch_update_workload_estimate_usage
@region='{{ region }}' --required
@@json=
'{
"workloadEstimateId": "{{ workloadEstimateId }}",
"usage": "{{ usage }}"
}'
;