Skip to main content

pricing_plans

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

Overview

Namepricing_plans
TypeResource
Idaws.billingconductor.pricing_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe 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_timeinteger (int64)The time when the pricing plan was created.
descriptionstringThe pricing plan description.
last_modified_timeinteger (int64)The most recent time when the pricing plan was modified.
namestringThe name of a pricing plan. (pattern: <code>[a-zA-Z0-9_+=.-@]+</code>)
sizeinteger (int64)The pricing rules count that's currently associated with this pricing plan list element.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_pricing_plansselectregionA 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_planinsertregionX-Amzn-Client-TokenCreates a pricing plan that is used for computing Amazon Web Services charges for billing groups.
update_pricing_planupdateregionThis updates an existing pricing plan.
delete_pricing_plandeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
X-Amzn-Client-TokenstringA 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

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

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
;

UPDATE examples

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

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
;