AWS::BillingConductor::CustomLineItem - AWS CloudFormation

AWS::BillingConductor::CustomLineItem

Creates a custom line item that can be used to create a one-time or recurring, fixed or percentage-based charge that you can apply to a single billing group. You can apply custom line items to the current or previous billing period. You can create either a fee or a discount custom line item.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::BillingConductor::CustomLineItem", "Properties" : { "AccountId" : String, "BillingGroupArn" : String, "BillingPeriodRange" : BillingPeriodRange, "CustomLineItemChargeDetails" : CustomLineItemChargeDetails, "Description" : String, "Name" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::BillingConductor::CustomLineItem Properties: AccountId: String BillingGroupArn: String BillingPeriodRange: BillingPeriodRange CustomLineItemChargeDetails: CustomLineItemChargeDetails Description: String Name: String Tags: - Tag

Properties

AccountId

The AWS account in which this custom line item will be applied to.

Required: No

Type: String

Pattern: [0-9]{12}

Update requires: Replacement

BillingGroupArn

The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

Required: Yes

Type: String

Pattern: arn:aws(-cn)?:billingconductor::[0-9]{12}:billinggroup/?[0-9]{12}

Update requires: Replacement

BillingPeriodRange

A time range for which the custom line item is effective.

Required: No

Type: BillingPeriodRange

Update requires: No interruption

CustomLineItemChargeDetails

The charge details of a custom line item. It should contain only one of Flat or Percentage.

Required: No

Type: CustomLineItemChargeDetails

Update requires: No interruption

Description

The custom line item's description. This is shown on the Bills page in association with the charge value.

Required: No

Type: String

Maximum: 255

Update requires: No interruption

Name

The custom line item's name.

Required: Yes

Type: String

Pattern: [a-zA-Z0-9_\+=\.\-@]+

Minimum: 1

Maximum: 128

Update requires: No interruption

Tags

A map that contains tag keys and tag values that are attached to a custom line item.

Required: No

Type: Array of Tag

Update requires: No interruption

Return values

Ref

For more information about using the Ref function, see Ref.

Fn::GetAtt

Arn

The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

AssociationSize

The number of resources that are associated to the custom line item.

CreationTime

The time created.

CurrencyCode

The custom line item's charge value currency. Only one of the valid values can be used.

LastModifiedTime

The most recent time the custom line item was modified.

ProductCode

The product code associated with the custom line item.

Examples

Flat custom line item

The following example shows a flat charge custom line item of $10 attached to a billing group.

JSON

{ "Resources": { "TestFlatCustomLineItem": { "Type": "AWS::BillingConductor::CustomLineItem", "Properties": { "Name": "TestFlatCustomLineItem", "Description": "Test flat custom line item created through CloudFormation for a $10 charge.", "BillingGroupArn": { "Fn::GetAtt": ["TestBillingGroup", "Arn"] }, "CustomLineItemChargeDetails": { "Flat": { "ChargeValue": 10 }, "Type": "FEE" }, "BillingPeriodRange": { "InclusiveStartBillingPeriod": "2022-11" } } } } }

YAML

Resources: TestFlatCustomLineItem: Type: 'AWS::BillingConductor::CustomLineItem' Properties: Name: 'TestFlatCustomLineItem' Description: 'Test flat custom line item created through CloudFormation for a $10 charge.' BillingGroupArn: !GetAtt TestBillingGroup.Arn CustomLineItemChargeDetails: Flat: ChargeValue: 10 Type: 'FEE' BillingPeriodRange: InclusiveStartBillingPeriod: 2022-11

Percentage custom line item

The following example shows a percentage charge custom line item that is 10% of the billing group total cost.

JSON

{ "Resources": { "TestPercentageCustomLineItem": { "Type": "AWS::BillingConductor::CustomLineItem", "Properties": { "Name": "TestPercentageCustomLineItem", "Description": "Test percentage custom line item created through CloudFormation for a %10 additional charge on the overall total bill of the billing group.", "BillingGroupArn": { "Fn::GetAtt": ["TestBillingGroup", "Arn"] }, "CustomLineItemChargeDetails": { "Percentage": { "PercentageValue": 10, "ChildAssociatedResources": [ {"Fn::GetAtt": ["TestBillingGroup", "Arn"]} ] }, "Type": "FEE" } } } } }

YAML

Resources: TestPercentageCustomLineItem: Type: 'AWS::BillingConductor::CustomLineItem' Properties: Name: 'TestPercentageCustomLineItem' Description: 'Test percentage custom line item created through CloudFormation for a %10 additional charge on the overall total bill of the billing group.' BillingGroupArn: !GetAtt TestBillingGroup.Arn CustomLineItemChargeDetails: Percentage: PercentageValue: 10 ChildAssociatedResources: - !GetAtt TestBillingGroup.Arn Type: 'FEE'