custom_line_items
Creates, updates, deletes, gets or lists a custom_line_items resource.
Overview
| Name | custom_line_items |
| Type | Resource |
| Id | aws.billingconductor.custom_line_items |
Fields
The following fields are returned by SELECT queries:
- list_custom_line_items
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account in which this custom line item will be applied to. (pattern: <code>[0-9]{12}</code>) |
arn | string | The 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_size | integer (int64) | The number of resources that are associated to the custom line item. |
billing_group_arn | string | The 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_details | object | A representation of the charge details of a custom line item. |
computation_rule | string | The display settings of the custom line item (ITEMIZED, CONSOLIDATED) |
creation_time | integer (int64) | The time created. |
currency_code | string | The custom line item's charge value currency. Only one of the valid values can be used. (USD, CNY) |
description | string | The custom line item's description. This is shown on the Bills page in association with the charge value. |
last_modified_time | integer (int64) | The most recent time when the custom line item was modified. |
name | string | The custom line item's name. (pattern: <code>[a-zA-Z0-9_+=.-@]+</code>) |
presentation_details | object | An object that defines how custom line item charges are presented in the bill, containing specifications for service presentation. |
product_code | string | The product code that's associated with the custom line item. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_custom_line_items | select | region | 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. | |
create_custom_line_item | insert | region, BillingGroupArn, ChargeDetails | X-Amzn-Client-Token | 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. |
update_custom_line_item | update | region | Update an existing custom line item in the current or previous billing period. | |
delete_custom_line_item | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
X-Amzn-Client-Token | string | A 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
- list_custom_line_items
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
- create_custom_line_item
- Manifest
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
;
# Description fields are for documentation purposes
- name: custom_line_items
props:
- name: region
value: "{{ region }}"
description: Required parameter for the custom_line_items resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: BillingGroupArn
value: "{{ BillingGroupArn }}"
- name: BillingPeriodRange
description: |
The billing period range in which the custom line item request will be applied.
value:
InclusiveStartBillingPeriod: "{{ InclusiveStartBillingPeriod }}"
ExclusiveEndBillingPeriod: "{{ ExclusiveEndBillingPeriod }}"
- name: Tags
value: "{{ Tags }}"
- name: ChargeDetails
description: |
The charge details of a custom line item. It should contain only one of Flat or Percentage.
value:
Flat:
ChargeValue: {{ ChargeValue }}
Percentage:
PercentageValue: {{ PercentageValue }}
AssociatedValues:
- "{{ AssociatedValues }}"
Type: "{{ Type }}"
LineItemFilters:
- Attribute: "{{ Attribute }}"
MatchOption: "{{ MatchOption }}"
Values: "{{ Values }}"
AttributeValues: "{{ AttributeValues }}"
- name: AccountId
value: "{{ AccountId }}"
- name: ComputationRule
value: "{{ ComputationRule }}"
description: |
The display settings of the custom line item
valid_values: ['ITEMIZED', 'CONSOLIDATED']
- name: PresentationDetails
description: |
An object that defines how custom line item charges are presented in the bill, containing specifications for service presentation.
value:
Service: "{{ Service }}"
- name: X-Amzn-Client-Token
value: "{{ X-Amzn-Client-Token }}"
description: A 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.
description: A 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.
UPDATE examples
- update_custom_line_item
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
- delete_custom_line_item
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
;