pricing_plans
Creates, updates, deletes, gets or lists a pricing_plans resource.
Overview
| Name | pricing_plans |
| Type | Resource |
| Id | aws.billingconductor.pricing_plans |
Fields
The following fields are returned by SELECT queries:
- list_pricing_plans
| Name | Datatype | Description |
|---|---|---|
arn | string | The pricing plan Amazon Resource Names (ARN). This can be used to uniquely identify a pricing plan. (pattern: <code>(arn:aws(-cn)?:billingconductor::(aws|[0-9]{12}):pricingplan/)?(BasicPricingPlan|Passthrough|[a-zA-Z0-9]{10})</code>) |
creation_time | integer (int64) | The time when the pricing plan was created. |
description | string | The pricing plan description. |
last_modified_time | integer (int64) | The most recent time when the pricing plan was modified. |
name | string | The name of a pricing plan. (pattern: <code>[a-zA-Z0-9_+=.-@]+</code>) |
size | integer (int64) | The pricing rules count that's currently associated with this pricing plan list element. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_pricing_plans | select | region | A paginated call to get pricing plans for the given billing period. If you don't provide a billing period, the current billing period is used. | |
create_pricing_plan | insert | region | X-Amzn-Client-Token | Creates a pricing plan that is used for computing Amazon Web Services charges for billing groups. |
update_pricing_plan | update | region | This updates an existing pricing plan. | |
delete_pricing_plan | delete | region | Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully. |
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) |
X-Amzn-Client-Token | string | A unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions. |
SELECT examples
- list_pricing_plans
A paginated call to get pricing plans for the given billing period. If you don't provide a billing period, the current billing period is used.
SELECT
arn,
creation_time,
description,
last_modified_time,
name,
size
FROM aws.billingconductor.pricing_plans
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_pricing_plan
- Manifest
Creates a pricing plan that is used for computing Amazon Web Services charges for billing groups.
INSERT INTO aws.billingconductor.pricing_plans (
Name,
Description,
PricingRuleArns,
Tags,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ PricingRuleArns }}',
'{{ Tags }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn
;
# Description fields are for documentation purposes
- name: pricing_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the pricing_plans resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: PricingRuleArns
value:
- "{{ PricingRuleArns }}"
- name: Tags
value: "{{ Tags }}"
- name: X-Amzn-Client-Token
value: "{{ X-Amzn-Client-Token }}"
description: A unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
description: A unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.
UPDATE examples
- update_pricing_plan
This updates an existing pricing plan.
UPDATE aws.billingconductor.pricing_plans
SET
Arn = '{{ Arn }}',
Name = '{{ Name }}',
Description = '{{ Description }}'
WHERE
region = '{{ region }}' --required
RETURNING
arn,
description,
last_modified_time,
name,
size;
DELETE examples
- delete_pricing_plan
Deletes a pricing plan. The pricing plan must not be associated with any billing groups to delete successfully.
DELETE FROM aws.billingconductor.pricing_plans
WHERE region = '{{ region }}' --required
;