Skip to main content

custom_line_items

Creates, updates, deletes or gets a custom_line_item resource or lists custom_line_items in a region

Overview

Namecustom_line_items
TypeResource
DescriptionA custom line item is an one time charge that is applied to a specific billing group's bill.
Idawscc.billingconductor.custom_line_items

Fields

NameDatatypeDescription
namestring
descriptionstring
custom_line_item_charge_detailsobject
billing_group_arnstringBilling Group ARN
billing_period_rangeobject
arnstringARN
creation_timeintegerCreation timestamp in UNIX epoch time format
last_modified_timeintegerLatest modified timestamp in UNIX epoch time format
association_sizeintegerNumber of source values associated to this custom line item
product_codestring
currency_codestring
account_idstringThe account which this custom line item will be charged to
tagsarray
regionstringAWS region.

For more information, see AWS::BillingConductor::CustomLineItem.

Methods

NameResourceAccessible byRequired Params
create_resourcecustom_line_itemsINSERTName, BillingGroupArn, region
delete_resourcecustom_line_itemsDELETEIdentifier, region
update_resourcecustom_line_itemsUPDATEIdentifier, PatchDocument, region
list_resourcescustom_line_items_list_onlySELECTregion
get_resourcecustom_line_itemsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual custom_line_item.

SELECT
region,
name,
description,
custom_line_item_charge_details,
billing_group_arn,
billing_period_range,
arn,
creation_time,
last_modified_time,
association_size,
product_code,
currency_code,
account_id,
tags
FROM awscc.billingconductor.custom_line_items
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.billingconductor.custom_line_items (
Name,
BillingGroupArn,
region
)
SELECT
'{{ name }}',
'{{ billing_group_arn }}',
'{{ 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 custom_line_item resource, using stack-deploy.

/*+ update */
UPDATE awscc.billingconductor.custom_line_items
SET PatchDocument = string('{{ {
"Name": name,
"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.custom_line_items
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 custom_line_items resource, the following permissions are required:

billingconductor:CreateCustomLineItem,
billingconductor:BatchAssociateResourcesToCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:TagResource,
billingconductor:ListTagsForResource