Skip to main content

pricing_rules

Creates, updates, deletes or gets a pricing_rule resource or lists pricing_rules in a region

Overview

Namepricing_rules
TypeResource
DescriptionA markup/discount that is defined for a specific set of services that can later be associated with a pricing plan.
Idawscc.billingconductor.pricing_rules

Fields

NameDatatypeDescription
arnstringPricing rule ARN
namestringPricing rule name
descriptionstringPricing rule description
scopestringA term used to categorize the granularity of a Pricing Rule.
typestringOne of MARKUP, DISCOUNT or TIERING that describes the behaviour of the pricing rule.
modifier_percentagenumberPricing rule modifier percentage
servicestringThe service which a pricing rule is applied on
billing_entitystringThe seller of services provided by AWS, their affiliates, or third-party providers selling services via AWS Marketplaces. Supported billing entities are AWS, AWS Marketplace, and AISPL.
tieringobjectThe set of tiering configurations for the pricing rule.
usage_typestringThe UsageType which a SKU pricing rule is modifying
operationstringThe Operation which a SKU pricing rule is modifying
associated_pricing_plan_countintegerThe number of pricing plans associated with pricing rule
creation_timeintegerCreation timestamp in UNIX epoch time format
last_modified_timeintegerLatest modified timestamp in UNIX epoch time format
tagsarray
regionstringAWS region.

For more information, see AWS::BillingConductor::PricingRule.

Methods

NameResourceAccessible byRequired Params
create_resourcepricing_rulesINSERTName, Scope, Type, region
delete_resourcepricing_rulesDELETEIdentifier, region
update_resourcepricing_rulesUPDATEIdentifier, PatchDocument, region
list_resourcespricing_rules_list_onlySELECTregion
get_resourcepricing_rulesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual pricing_rule.

SELECT
region,
arn,
name,
description,
scope,
type,
modifier_percentage,
service,
billing_entity,
tiering,
usage_type,
operation,
associated_pricing_plan_count,
creation_time,
last_modified_time,
tags
FROM awscc.billingconductor.pricing_rules
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new pricing_rule resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.billingconductor.pricing_rules (
Name,
Scope,
Type,
region
)
SELECT
'{{ name }}',
'{{ scope }}',
'{{ type }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a pricing_rule resource, using stack-deploy.

/*+ update */
UPDATE awscc.billingconductor.pricing_rules
SET PatchDocument = string('{{ {
"Name": name,
"Description": description,
"Type": type,
"ModifierPercentage": modifier_percentage,
"Tiering": tiering,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.billingconductor.pricing_rules
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the pricing_rules resource, the following permissions are required:

billingconductor:CreatePricingRule,
billingconductor:ListPricingRules,
billingconductor:TagResource,
billingconductor:ListTagsForResource