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 | awscc.billingconductor.pricing_plans |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Pricing Plan ARN |
region | string | AWS region. |
For more information, see AWS::BillingConductor::PricingPlan.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | pricing_plans | INSERT | Name, region |
delete_resource | pricing_plans | DELETE | Identifier, region |
update_resource | pricing_plans | UPDATE | Identifier, PatchDocument, region |
list_resources | pricing_plans_list_only | SELECT | region |
get_resource | pricing_plans | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual pricing_plan.
SELECT
region,
arn,
name,
pricing_rule_arns,
size,
description,
creation_time,
last_modified_time,
tags
FROM awscc.billingconductor.pricing_plans
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all pricing_plans in a region.
SELECT
region,
arn
FROM awscc.billingconductor.pricing_plans_list_only
WHERE
region = '{{ region }}';
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 awscc.billingconductor.pricing_plans (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.billingconductor.pricing_plans (
Name,
PricingRuleArns,
Description,
Tags,
region
)
SELECT
'{{ name }}',
'{{ pricing_rule_arns }}',
'{{ description }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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: pricing_rule_arns
value:
- '{{ pricing_rule_arns[0] }}'
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a pricing_plan resource, using stack-deploy.
/*+ update */
UPDATE awscc.billingconductor.pricing_plans
SET PatchDocument = string('{{ {
"Name": name,
"PricingRuleArns": pricing_rule_arns,
"Description": description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.billingconductor.pricing_plans
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the pricing_plans resource, the following permissions are required:
- Create
- Read
- List
- Update
- Delete
billingconductor:CreatePricingPlan,
billingconductor:AssociatePricingRules,
billingconductor:ListPricingPlans,
billingconductor:TagResource,
billingconductor:ListTagsForResource
billingconductor:ListPricingPlans,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:ListTagsForResource
billingconductor:ListPricingPlans,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:ListTagsForResource
billingconductor:ListPricingPlans,
billingconductor:UpdatePricingPlan,
billingconductor:ListPricingRulesAssociatedToPricingPlan,
billingconductor:AssociatePricingRules,
billingconductor:DisassociatePricingRules,
billingconductor:TagResource,
billingconductor:UntagResource
billingconductor:ListPricingPlans,
billingconductor:DeletePricingPlan,
billingconductor:UntagResource