bill_scenarios
Creates, updates, deletes, gets or lists a bill_scenarios resource.
Overview
| Name | bill_scenarios |
| Type | Resource |
| Id | aws.bcm_pricing_calculator.bill_scenarios |
Fields
The following fields are returned by SELECT queries:
- get_bill_scenario
- list_bill_scenarios
| Name | Datatype | Description |
|---|---|---|
id | string | The 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>) |
name | string | The name of the retrieved bill scenario. (pattern: <code>[a-zA-Z0-9-]+</code>) |
bill_interval | object | The time period covered by the bill scenario. |
cost_category_group_sharing_preference_arn | string | The 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_at | string (date-time) | The timestamp when the bill scenario was created. |
expires_at | string (date-time) | The timestamp when the bill scenario will expire. |
failure_message | string | An error message if the bill scenario retrieval failed. |
group_sharing_preference | string | The setting for the reserved instance and savings plan group sharing used in this estimate. (OPEN, PRIORITIZED, RESTRICTED) |
status | string | The current status of the bill scenario. (READY, LOCKED, FAILED, STALE) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the 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>) |
name | string | The name of the bill scenario. (pattern: <code>[a-zA-Z0-9-]+</code>) |
bill_interval | object | The time period covered by the bill scenario. |
cost_category_group_sharing_preference_arn | string | The 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_at | string (date-time) | The timestamp when the bill scenario was created. |
expires_at | string (date-time) | The timestamp when the bill scenario will expire. |
failure_message | string | An error message if the bill scenario creation or processing failed. |
group_sharing_preference | string | The setting for the reserved instance and savings plan group sharing used in this estimate. (OPEN, PRIORITIZED, RESTRICTED) |
status | string | The current status of the bill scenario. (READY, LOCKED, FAILED, STALE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bill_scenario | select | region | Retrieves details of a specific bill scenario. | |
list_bill_scenarios | select | region | Lists all bill scenarios for the account. | |
create_bill_scenario | insert | region, name | Creates a new bill scenario to model potential changes to Amazon Web Services usage and costs. | |
update_bill_scenario | update | region, identifier | Updates an existing bill scenario. | |
delete_bill_scenario | delete | region | Deletes an existing bill scenario. | |
batch_create_bill_scenario_commitment_modification | exec | region, billScenarioId, commitmentModifications | 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. | |
batch_create_bill_scenario_usage_modification | exec | region, billScenarioId, usageModifications | Create 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_modification | exec | region, billScenarioId, ids | Delete 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_modification | exec | region, billScenarioId, ids | Delete 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_modification | exec | region, billScenarioId, commitmentModifications | Update 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_modification | exec | region, billScenarioId, usageModifications | 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. 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_bill_scenario
- list_bill_scenarios
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
;
Lists all bill scenarios for the account.
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
- create_bill_scenario
- Manifest
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
;
# Description fields are for documentation purposes
- name: bill_scenarios
props:
- name: region
value: "{{ region }}"
description: Required parameter for the bill_scenarios resource.
- name: name
value: "{{ name }}"
description: |
A descriptive name for the bill scenario.
- name: clientToken
value: "{{ clientToken }}"
description: |
A unique, case-sensitive identifier to ensure idempotency of the request.
- name: tags
value: "{{ tags }}"
description: |
The tags to apply to the bill scenario.
- name: groupSharingPreference
value: "{{ groupSharingPreference }}"
description: |
The setting for the reserved instance and savings plan group sharing used in this estimate.
valid_values: ['OPEN', 'PRIORITIZED', 'RESTRICTED']
- name: costCategoryGroupSharingPreferenceArn
value: "{{ costCategoryGroupSharingPreferenceArn }}"
description: |
The arn of the cost category used in the reserved and prioritized group sharing.
UPDATE examples
- update_bill_scenario
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
- delete_bill_scenario
Deletes an existing bill scenario.
DELETE FROM aws.bcm_pricing_calculator.bill_scenarios
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- batch_create_bill_scenario_commitment_modification
- batch_create_bill_scenario_usage_modification
- batch_delete_bill_scenario_commitment_modification
- batch_delete_bill_scenario_usage_modification
- batch_update_bill_scenario_commitment_modification
- batch_update_bill_scenario_usage_modification
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 }}"
}'
;
Create 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.
EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_create_bill_scenario_usage_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"usageModifications": "{{ usageModifications }}",
"clientToken": "{{ clientToken }}"
}'
;
Delete 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.
EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_delete_bill_scenario_commitment_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"ids": "{{ ids }}"
}'
;
Delete 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.
EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_delete_bill_scenario_usage_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"ids": "{{ ids }}"
}'
;
Update 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.
EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_update_bill_scenario_commitment_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"commitmentModifications": "{{ commitmentModifications }}"
}'
;
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. 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.
EXEC aws.bcm_pricing_calculator.bill_scenarios.batch_update_bill_scenario_usage_modification
@region='{{ region }}' --required
@@json=
'{
"billScenarioId": "{{ billScenarioId }}",
"usageModifications": "{{ usageModifications }}"
}'
;