pricing_plans
Creates, updates, deletes or gets a pricing_plan
resource or lists pricing_plans
in a region
Overview
Name | pricing_plans |
Type | Resource |
Description | Pricing Plan enables you to customize your billing details consistent with the usage that accrues in each of your billing groups. |
Id | aws.billingconductor.pricing_plans |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | Pricing Plan ARN |
name | string | |
pricing_rule_arns | array | |
size | integer | Number of associated pricing rules |
description | string | |
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all pricing_plans
in a region.
SELECT
region,
arn,
name,
pricing_rule_arns,
size,
description,
creation_time,
last_modified_time,
tags
FROM aws.billingconductor.pricing_plans
WHERE region = 'us-east-1';
Gets all properties from an individual pricing_plan
.
SELECT
region,
arn,
name,
pricing_rule_arns,
size,
description,
creation_time,
last_modified_time,
tags
FROM aws.billingconductor.pricing_plans
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new pricing_plan
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.billingconductor.pricing_plans (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.billingconductor.pricing_plans (
Name,
PricingRuleArns,
Description,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ PricingRuleArns }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: pricing_plan
props:
- name: Name
value: '{{ Name }}'
- name: PricingRuleArns
value:
- '{{ PricingRuleArns[0] }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.billingconductor.pricing_plans
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the pricing_plans
resource, the following permissions are required:
Create
billingconductor:CreatePricingPlan,
billingconductor:AssociatePricingRules,
billingconductor:ListPricingPlans,
billingconductor:TagResource,
billingconductor:ListTagsForResource
Read
billingconductor:ListPricingPlans,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:ListTagsForResource
List
billingconductor:ListPricingPlans,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:ListTagsForResource
Update
billingconductor:ListPricingPlans,
billingconductor:UpdatePricingPlan,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:AssociatePricingRules,
billingconductor:DisassociatePricingRules,
billingconductor:TagResource,
billingconductor:UntagResource
Delete
billingconductor:ListPricingPlans,
billingconductor:DeletePricingPlan,
billingconductor:UntagResource