custom_line_items
Creates, updates, deletes or gets a custom_line_item resource or lists custom_line_items in a region
Overview
| Name | custom_line_items |
| Type | Resource |
| Description | A custom line item is an one time charge that is applied to a specific billing group's bill. |
| Id | awscc.billingconductor.custom_line_items |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | |
description | string | |
custom_line_item_charge_details | object | |
billing_group_arn | string | Billing Group ARN |
billing_period_range | object | |
arn | string | ARN |
creation_time | integer | Creation timestamp in UNIX epoch time format |
last_modified_time | integer | Latest modified timestamp in UNIX epoch time format |
association_size | integer | Number of source values associated to this custom line item |
product_code | string | |
currency_code | string | |
account_id | string | The account which this custom line item will be charged to |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | ARN |
region | string | AWS region. |
For more information, see AWS::BillingConductor::CustomLineItem.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | custom_line_items | INSERT | Name, BillingGroupArn, region |
delete_resource | custom_line_items | DELETE | Identifier, region |
update_resource | custom_line_items | UPDATE | Identifier, PatchDocument, region |
list_resources | custom_line_items_list_only | SELECT | region |
get_resource | custom_line_items | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all custom_line_items in a region.
SELECT
region,
arn
FROM awscc.billingconductor.custom_line_items_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new custom_line_item resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.billingconductor.custom_line_items (
Name,
BillingGroupArn,
region
)
SELECT
'{{ name }}',
'{{ billing_group_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.billingconductor.custom_line_items (
Name,
Description,
CustomLineItemChargeDetails,
BillingGroupArn,
BillingPeriodRange,
AccountId,
Tags,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ custom_line_item_charge_details }}',
'{{ billing_group_arn }}',
'{{ billing_period_range }}',
'{{ account_id }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: custom_line_item
props:
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: custom_line_item_charge_details
value:
flat:
charge_value: null
percentage:
child_associated_resources:
- '{{ child_associated_resources[0] }}'
percentage_value: null
type: '{{ type }}'
line_item_filters:
- attribute: '{{ attribute }}'
match_option: '{{ match_option }}'
values:
- '{{ values[0] }}'
- name: billing_group_arn
value: '{{ billing_group_arn }}'
- name: billing_period_range
value:
inclusive_start_billing_period: '{{ inclusive_start_billing_period }}'
exclusive_end_billing_period: '{{ exclusive_end_billing_period }}'
- name: account_id
value: '{{ account_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.billingconductor.custom_line_items
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the custom_line_items resource, the following permissions are required:
- Create
- Read
- List
- Update
- Delete
billingconductor:CreateCustomLineItem,
billingconductor:BatchAssociateResourcesToCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:TagResource,
billingconductor:ListTagsForResource
billingconductor:ListCustomLineItems,
billingconductor:ListCustomLineItemVersions,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:ListTagsForResource
billingconductor:ListCustomLineItems,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:ListTagsForResource
billingconductor:UpdateCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:BatchAssociateResourcesToCustomLineItem,
billingconductor:BatchDisassociateResourcesFromCustomLineItem,
billingconductor:TagResource,
billingconductor:UntagResource
billingconductor:DeleteCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:BatchDisassociateResourcesFromCustomLineItem,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:UntagResource