pricing_rules
Creates, updates, deletes or gets a pricing_rule resource or lists pricing_rules in a region
Overview
| Name | pricing_rules |
| Type | Resource |
| Description | A markup/discount that is defined for a specific set of services that can later be associated with a pricing plan. |
| Id | awscc.billingconductor.pricing_rules |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | Pricing rule ARN |
name | string | Pricing rule name |
description | string | Pricing rule description |
scope | string | A term used to categorize the granularity of a Pricing Rule. |
type | string | One of MARKUP, DISCOUNT or TIERING that describes the behaviour of the pricing rule. |
modifier_percentage | number | Pricing rule modifier percentage |
service | string | The service which a pricing rule is applied on |
billing_entity | string | The 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. |
tiering | object | The set of tiering configurations for the pricing rule. |
usage_type | string | The UsageType which a SKU pricing rule is modifying |
operation | string | The Operation which a SKU pricing rule is modifying |
associated_pricing_plan_count | integer | The number of pricing plans associated with pricing rule |
creation_time | integer | Creation timestamp in UNIX epoch time format |
last_modified_time | integer | Latest modified timestamp in UNIX epoch time format |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Pricing rule ARN |
region | string | AWS region. |
For more information, see AWS::BillingConductor::PricingRule.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | pricing_rules | INSERT | Name, Scope, Type, region |
delete_resource | pricing_rules | DELETE | Identifier, region |
update_resource | pricing_rules | UPDATE | Identifier, PatchDocument, region |
list_resources | pricing_rules_list_only | SELECT | region |
get_resource | pricing_rules | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all pricing_rules in a region.
SELECT
region,
arn
FROM awscc.billingconductor.pricing_rules_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new pricing_rule resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.billingconductor.pricing_rules (
Name,
Scope,
Type,
region
)
SELECT
'{{ name }}',
'{{ scope }}',
'{{ type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.billingconductor.pricing_rules (
Name,
Description,
Scope,
Type,
ModifierPercentage,
Service,
BillingEntity,
Tiering,
UsageType,
Operation,
Tags,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ scope }}',
'{{ type }}',
'{{ modifier_percentage }}',
'{{ service }}',
'{{ billing_entity }}',
'{{ tiering }}',
'{{ usage_type }}',
'{{ operation }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: pricing_rule
props:
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: scope
value: '{{ scope }}'
- name: type
value: '{{ type }}'
- name: modifier_percentage
value: null
- name: service
value: '{{ service }}'
- name: billing_entity
value: '{{ billing_entity }}'
- name: tiering
value:
free_tier:
activated: '{{ activated }}'
- name: usage_type
value: '{{ usage_type }}'
- name: operation
value: '{{ operation }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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:
- Create
- Read
- Update
- Delete
- List
billingconductor:CreatePricingRule,
billingconductor:ListPricingRules,
billingconductor:TagResource,
billingconductor:ListTagsForResource
billingconductor:ListPricingRules,
billingconductor:ListTagsForResource
billingconductor:UpdatePricingRule,
billingconductor:ListPricingRules,
billingconductor:TagResource,
billingconductor:UntagResource
billingconductor:DeletePricingRule,
billingconductor:ListPricingRules,
billingconductor:UntagResource
billingconductor:ListPricingRules,
billingconductor:ListTagsForResource