Skip to content
GitHubXDiscordRSS

CustomLineItem

Learn how to create, update, and manage AWS BillingConductor CustomLineItems using Alchemy Cloud Control.

The CustomLineItem resource lets you manage AWS BillingConductor CustomLineItems which are used for custom billing adjustments in AWS organizations.

Create a basic custom line item with required properties and a description.

import AWS from "alchemy/aws/control";
const basicCustomLineItem = await AWS.BillingConductor.CustomLineItem("basicCustomLineItem", {
Name: "MonthlyAdjustment",
BillingGroupArn: "arn:aws:billingconductor:us-east-1:123456789012:billing-group/my-billing-group",
Description: "Adjustment for monthly usage"
});

Configure a custom line item with billing period range and tags for better tracking.

const advancedCustomLineItem = await AWS.BillingConductor.CustomLineItem("advancedCustomLineItem", {
Name: "QuarterlyAdjustment",
BillingGroupArn: "arn:aws:billingconductor:us-east-1:123456789012:billing-group/my-billing-group",
Description: "Adjustment for quarterly usage",
BillingPeriodRange: {
Start: "2023-01-01T00:00:00Z",
End: "2023-03-31T23:59:59Z"
},
Tags: [
{ Key: "Department", Value: "Finance" },
{ Key: "Project", Value: "CostOptimization" }
]
});

Specific Use Case: Adoption of Existing Resource

Section titled “Specific Use Case: Adoption of Existing Resource”

Create a custom line item and adopt an existing resource if it already exists.

const adoptedCustomLineItem = await AWS.BillingConductor.CustomLineItem("adoptedCustomLineItem", {
Name: "AdoptedAdjustment",
BillingGroupArn: "arn:aws:billingconductor:us-east-1:123456789012:billing-group/my-billing-group",
Description: "Adjustment for adopted resource",
adopt: true
});