Skip to main content

custom_line_items

Creates, updates, deletes, gets or lists a custom_line_items resource.

Overview

Namecustom_line_items
TypeResource
Idaws.billingconductor.custom_line_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account in which this custom line item will be applied to. (pattern: <code>[0-9]{12}</code>)
arnstringThe Amazon Resource Names (ARNs) for custom line items. (pattern: <code>(arn:aws(-cn)?:billingconductor::[0-9]{12}:customlineitem/)?[a-zA-Z0-9]{10}</code>)
association_sizeinteger (int64)The number of resources that are associated to the custom line item.
billing_group_arnstringThe Amazon Resource Name (ARN) that references the billing group where the custom line item applies to. (pattern: <code>(arn:aws(-cn)?:billingconductor::[0-9]{12}:billinggroup/)?[a-zA-Z0-9]{10,12}</code>)
charge_detailsobjectA representation of the charge details of a custom line item.
computation_rulestringThe display settings of the custom line item (ITEMIZED, CONSOLIDATED)
creation_timeinteger (int64)The time created.
currency_codestringThe custom line item's charge value currency. Only one of the valid values can be used. (USD, CNY)
descriptionstringThe custom line item's description. This is shown on the Bills page in association with the charge value.
last_modified_timeinteger (int64)The most recent time when the custom line item was modified.
namestringThe custom line item's name. (pattern: <code>[a-zA-Z0-9_+=.-@]+</code>)
presentation_detailsobjectAn object that defines how custom line item charges are presented in the bill, containing specifications for service presentation.
product_codestringThe product code that's associated with the custom line item.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_custom_line_itemsselectregionA paginated call to get a list of all custom line items (FFLIs) for the given billing period. If you don't provide a billing period, the current billing period is used.
create_custom_line_iteminsertregion, BillingGroupArn, ChargeDetailsX-Amzn-Client-TokenCreates a custom line item that can be used to create a one-time fixed charge that can be applied to a single billing group for the current or previous billing period. The one-time fixed charge is either a fee or discount.
update_custom_line_itemupdateregionUpdate an existing custom line item in the current or previous billing period.
delete_custom_line_itemdeleteregionDeletes the custom line item identified by the given ARN in the current, or previous billing period.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
X-Amzn-Client-TokenstringA unique, case-sensitive identifier that you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.

SELECT examples

A paginated call to get a list of all custom line items (FFLIs) for the given billing period. If you don't provide a billing period, the current billing period is used.

SELECT
account_id,
arn,
association_size,
billing_group_arn,
charge_details,
computation_rule,
creation_time,
currency_code,
description,
last_modified_time,
name,
presentation_details,
product_code
FROM aws.billingconductor.custom_line_items
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a custom line item that can be used to create a one-time fixed charge that can be applied to a single billing group for the current or previous billing period. The one-time fixed charge is either a fee or discount.

INSERT INTO aws.billingconductor.custom_line_items (
Name,
Description,
BillingGroupArn,
BillingPeriodRange,
Tags,
ChargeDetails,
AccountId,
ComputationRule,
PresentationDetails,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ BillingGroupArn }}' /* required */,
'{{ BillingPeriodRange }}',
'{{ Tags }}',
'{{ ChargeDetails }}' /* required */,
'{{ AccountId }}',
'{{ ComputationRule }}',
'{{ PresentationDetails }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn
;

UPDATE examples

Update an existing custom line item in the current or previous billing period.

UPDATE aws.billingconductor.custom_line_items
SET
Arn = '{{ Arn }}',
Name = '{{ Name }}',
Description = '{{ Description }}',
ChargeDetails = '{{ ChargeDetails }}',
BillingPeriodRange = '{{ BillingPeriodRange }}'
WHERE
region = '{{ region }}' --required
RETURNING
arn,
association_size,
billing_group_arn,
charge_details,
description,
last_modified_time,
name;

DELETE examples

Deletes the custom line item identified by the given ARN in the current, or previous billing period.

DELETE FROM aws.billingconductor.custom_line_items
WHERE region = '{{ region }}' --required
;