Skip to main content

pricing_plans

Creates, updates, deletes or gets a pricing_plan resource or lists pricing_plans in a region

Overview

Namepricing_plans
TypeResource
DescriptionPricing Plan enables you to customize your billing details consistent with the usage that accrues in each of your billing groups.
Idawscc.billingconductor.pricing_plans

Fields

NameDatatypeDescription
arnstringPricing Plan ARN
namestring
pricing_rule_arnsarray
sizeintegerNumber of associated pricing rules
descriptionstring
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::PricingPlan.

Methods

NameResourceAccessible byRequired Params
create_resourcepricing_plansINSERTName, region
delete_resourcepricing_plansDELETEIdentifier, region
update_resourcepricing_plansUPDATEIdentifier, PatchDocument, region
list_resourcespricing_plans_list_onlySELECTregion
get_resourcepricing_plansSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.billingconductor.pricing_plans (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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:

ParameterDescription
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:

billingconductor:CreatePricingPlan,
billingconductor:AssociatePricingRules,
billingconductor:ListPricingPlans,
billingconductor:TagResource,
billingconductor:ListTagsForResource