Skip to main content

bill_scenarios

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

Overview

Namebill_scenarios
TypeResource
Idaws.bcm_pricing_calculator.bill_scenarios

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the retrieved bill scenario. (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 bill scenario. (pattern: <code>[a-zA-Z0-9-]+</code>)
bill_intervalobjectThe time period covered by the bill scenario.
cost_category_group_sharing_preference_arnstringThe arn of the cost category used in the reserved and prioritized group sharing. (pattern: <code>arn:aws[-a-z0-9]*:ce::[0-9]{12}:costcategory/[a-f0-9-]{36}</code>)
created_atstring (date-time)The timestamp when the bill scenario was created.
expires_atstring (date-time)The timestamp when the bill scenario will expire.
failure_messagestringAn error message if the bill scenario retrieval failed.
group_sharing_preferencestringThe setting for the reserved instance and savings plan group sharing used in this estimate. (OPEN, PRIORITIZED, RESTRICTED)
statusstringThe current status of the bill scenario. (READY, LOCKED, FAILED, STALE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bill_scenarioselectregionRetrieves details of a specific bill scenario.
list_bill_scenariosselectregionLists all bill scenarios for the account.
create_bill_scenarioinsertregion, nameCreates a new bill scenario to model potential changes to Amazon Web Services usage and costs.
update_bill_scenarioupdateregion, identifierUpdates an existing bill scenario.
delete_bill_scenariodeleteregionDeletes an existing bill scenario.
batch_create_bill_scenario_commitment_modificationexecregion, billScenarioId, commitmentModificationsCreate Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved Instances commitments that you want to model in a Bill Scenario. The BatchCreateBillScenarioCommitmentModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:CreateBillScenarioCommitmentModification in your policies.
batch_create_bill_scenario_usage_modificationexecregion, billScenarioId, usageModificationsCreate Amazon Web Services service usage that you want to model in a Bill Scenario. The BatchCreateBillScenarioUsageModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:CreateBillScenarioUsageModification in your policies.
batch_delete_bill_scenario_commitment_modificationexecregion, billScenarioId, idsDelete commitment that you have created in a Bill Scenario. You can only delete a commitment that you had added and cannot model deletion (or removal) of a existing commitment. If you want model deletion of an existing commitment, see the negate BillScenarioCommitmentModificationAction of BatchCreateBillScenarioCommitmentModification operation. The BatchDeleteBillScenarioCommitmentModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:DeleteBillScenarioCommitmentModification in your policies.
batch_delete_bill_scenario_usage_modificationexecregion, billScenarioId, idsDelete usage that you have created in a Bill Scenario. 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 BatchUpdateBillScenarioUsageModification. The BatchDeleteBillScenarioUsageModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:DeleteBillScenarioUsageModification in your policies.
batch_update_bill_scenario_commitment_modificationexecregion, billScenarioId, commitmentModificationsUpdate a newly added or existing commitment. You can update the commitment group based on a commitment ID and a Bill scenario ID. The BatchUpdateBillScenarioCommitmentModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:UpdateBillScenarioCommitmentModification in your policies.
batch_update_bill_scenario_usage_modificationexecregion, billScenarioId, usageModificationsUpdate 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. The BatchUpdateBillScenarioUsageModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:UpdateBillScenarioUsageModification 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 bill scenario.

SELECT
id,
name,
bill_interval,
cost_category_group_sharing_preference_arn,
created_at,
expires_at,
failure_message,
group_sharing_preference,
status
FROM aws.bcm_pricing_calculator.bill_scenarios
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new bill scenario to model potential changes to Amazon Web Services usage and costs.

INSERT INTO aws.bcm_pricing_calculator.bill_scenarios (
name,
clientToken,
tags,
groupSharingPreference,
costCategoryGroupSharingPreferenceArn,
region
)
SELECT
'{{ name }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ groupSharingPreference }}',
'{{ costCategoryGroupSharingPreferenceArn }}',
'{{ region }}'
RETURNING
id,
name,
bill_interval,
cost_category_group_sharing_preference_arn,
created_at,
expires_at,
failure_message,
group_sharing_preference,
status
;

UPDATE examples

Updates an existing bill scenario.

UPDATE aws.bcm_pricing_calculator.bill_scenarios
SET
identifier = '{{ identifier }}',
name = '{{ name }}',
expiresAt = '{{ expiresAt }}',
groupSharingPreference = '{{ groupSharingPreference }}',
costCategoryGroupSharingPreferenceArn = '{{ costCategoryGroupSharingPreferenceArn }}'
WHERE
region = '{{ region }}' --required
AND identifier = '{{ identifier }}' --required
RETURNING
id,
name,
bill_interval,
cost_category_group_sharing_preference_arn,
created_at,
expires_at,
failure_message,
group_sharing_preference,
status;

DELETE examples

Deletes an existing bill scenario.

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

Lifecycle Methods

Create Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved Instances commitments that you want to model in a Bill Scenario. The BatchCreateBillScenarioCommitmentModification operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission bcm-pricing-calculator:CreateBillScenarioCommitmentModification in your policies.

EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_create_bill_scenario_commitment_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"commitmentModifications": "{{ commitmentModifications }}",
"clientToken": "{{ clientToken }}"
}'
;