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.
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, Scope, Type, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all pricing_rules in a region.

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 aws.billingconductor.pricing_rules
WHERE region = 'us-east-1';

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 aws.billingconductor.pricing_rules
WHERE region = 'us-east-1' AND data__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 aws.billingconductor.pricing_rules (
Name,
Scope,
Type,
region
)
SELECT
'{{ Name }}',
'{{ Scope }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.billingconductor.pricing_rules
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

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

Read

billingconductor:ListPricingRules,
billingconductor:ListTagsForResource

Update

billingconductor:UpdatePricingRule,
billingconductor:ListPricingRules,
billingconductor:TagResource,
billingconductor:UntagResource

Delete

billingconductor:DeletePricingRule,
billingconductor:ListPricingRules,
billingconductor:UntagResource

List

billingconductor:ListPricingRules,
billingconductor:ListTagsForResource