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 | aws.billingconductor.custom_line_items |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, BillingGroupArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all custom_line_items
in a region.
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 aws.billingconductor.custom_line_items
WHERE region = 'us-east-1';
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 aws.billingconductor.custom_line_items
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.billingconductor.custom_line_items (
Name,
BillingGroupArn,
region
)
SELECT
'{{ Name }}',
'{{ BillingGroupArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.billingconductor.custom_line_items (
Name,
Description,
CustomLineItemChargeDetails,
BillingGroupArn,
BillingPeriodRange,
AccountId,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ CustomLineItemChargeDetails }}',
'{{ BillingGroupArn }}',
'{{ BillingPeriodRange }}',
'{{ AccountId }}',
'{{ 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: CustomLineItemChargeDetails
value:
Flat:
ChargeValue: null
Percentage:
ChildAssociatedResources:
- '{{ ChildAssociatedResources[0] }}'
PercentageValue: null
Type: '{{ Type }}'
LineItemFilters:
- Attribute: '{{ Attribute }}'
MatchOption: '{{ MatchOption }}'
Values:
- '{{ Values[0] }}'
- name: BillingGroupArn
value: '{{ BillingGroupArn }}'
- name: BillingPeriodRange
value:
InclusiveStartBillingPeriod: '{{ InclusiveStartBillingPeriod }}'
ExclusiveEndBillingPeriod: '{{ ExclusiveEndBillingPeriod }}'
- name: AccountId
value: '{{ AccountId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.billingconductor.custom_line_items
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the custom_line_items
resource, the following permissions are required:
Create
billingconductor:CreateCustomLineItem,
billingconductor:BatchAssociateResourcesToCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:TagResource,
billingconductor:ListTagsForResource
Read
billingconductor:ListCustomLineItems,
billingconductor:ListCustomLineItemVersions,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:ListTagsForResource
List
billingconductor:ListCustomLineItems,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:ListTagsForResource
Update
billingconductor:UpdateCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:BatchAssociateResourcesToCustomLineItem,
billingconductor:BatchDisassociateResourcesFromCustomLineItem,
billingconductor:TagResource,
billingconductor:UntagResource
Delete
billingconductor:DeleteCustomLineItem,
billingconductor:ListCustomLineItems,
billingconductor:BatchDisassociateResourcesFromCustomLineItem,
billingconductor:ListResourcesAssociatedToCustomLineItem,
billingconductor:UntagResource