# CfnCustomLineItemProps

Properties for defining a `CfnCustomLineItem`.

Used as props by: [CfnCustomLineItem](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_billingconductor.CfnCustomLineItem.html)

- Source: Generated at build time
- Type last changed: v2.223.0 · 10 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_billingconductor as billingconductor } from 'aws-cdk-lib';
const cfnCustomLineItemProps: billingconductor.CfnCustomLineItemProps = {
  billingGroupArn: 'billingGroupArn',
  name: 'name',

  // the properties below are optional
  accountId: 'accountId',
  billingPeriodRange: {
    exclusiveEndBillingPeriod: 'exclusiveEndBillingPeriod',
    inclusiveStartBillingPeriod: 'inclusiveStartBillingPeriod',
  },
  computationRule: 'computationRule',
  customLineItemChargeDetails: {
    type: 'type',

    // the properties below are optional
    flat: {
      chargeValue: 123,
    },
    lineItemFilters: [{
      attribute: 'attribute',
      matchOption: 'matchOption',

      // the properties below are optional
      attributeValues: ['attributeValues'],
      values: ['values'],
    }],
    percentage: {
      percentageValue: 123,

      // the properties below are optional
      childAssociatedResources: ['childAssociatedResources'],
    },
  },
  description: 'description',
  presentationDetails: {
    service: 'service',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_billingconductor as billingconductor

cfn_custom_line_item_props = billingconductor.CfnCustomLineItemProps(
    billing_group_arn="billingGroupArn",
    name="name",

    # the properties below are optional
    account_id="accountId",
    billing_period_range=billingconductor.CfnCustomLineItem.BillingPeriodRangeProperty(
        exclusive_end_billing_period="exclusiveEndBillingPeriod",
        inclusive_start_billing_period="inclusiveStartBillingPeriod"
    ),
    computation_rule="computationRule",
    custom_line_item_charge_details=billingconductor.CfnCustomLineItem.CustomLineItemChargeDetailsProperty(
        type="type",

        # the properties below are optional
        flat=billingconductor.CfnCustomLineItem.CustomLineItemFlatChargeDetailsProperty(
            charge_value=123
        ),
        line_item_filters=[billingconductor.CfnCustomLineItem.LineItemFilterProperty(
            attribute="attribute",
            match_option="matchOption",

            # the properties below are optional
            attribute_values=["attributeValues"],
            values=["values"]
        )],
        percentage=billingconductor.CfnCustomLineItem.CustomLineItemPercentageChargeDetailsProperty(
            percentage_value=123,

            # the properties below are optional
            child_associated_resources=["childAssociatedResources"]
        )
    ),
    description="description",
    presentation_details=billingconductor.CfnCustomLineItem.PresentationDetailsProperty(
        service="service"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.billingconductor.*;

CfnCustomLineItemProps cfnCustomLineItemProps = CfnCustomLineItemProps.builder()
        .billingGroupArn("billingGroupArn")
        .name("name")

        // the properties below are optional
        .accountId("accountId")
        .billingPeriodRange(BillingPeriodRangeProperty.builder()
                .exclusiveEndBillingPeriod("exclusiveEndBillingPeriod")
                .inclusiveStartBillingPeriod("inclusiveStartBillingPeriod")
                .build())
        .computationRule("computationRule")
        .customLineItemChargeDetails(CustomLineItemChargeDetailsProperty.builder()
                .type("type")

                // the properties below are optional
                .flat(CustomLineItemFlatChargeDetailsProperty.builder()
                        .chargeValue(123)
                        .build())
                .lineItemFilters(List.of(LineItemFilterProperty.builder()
                        .attribute("attribute")
                        .matchOption("matchOption")

                        // the properties below are optional
                        .attributeValues(List.of("attributeValues"))
                        .values(List.of("values"))
                        .build()))
                .percentage(CustomLineItemPercentageChargeDetailsProperty.builder()
                        .percentageValue(123)

                        // the properties below are optional
                        .childAssociatedResources(List.of("childAssociatedResources"))
                        .build())
                .build())
        .description("description")
        .presentationDetails(PresentationDetailsProperty.builder()
                .service("service")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.BillingConductor;

var cfnCustomLineItemProps = new CfnCustomLineItemProps {
    BillingGroupArn = "billingGroupArn",
    Name = "name",

    // the properties below are optional
    AccountId = "accountId",
    BillingPeriodRange = new BillingPeriodRangeProperty {
        ExclusiveEndBillingPeriod = "exclusiveEndBillingPeriod",
        InclusiveStartBillingPeriod = "inclusiveStartBillingPeriod"
    },
    ComputationRule = "computationRule",
    CustomLineItemChargeDetails = new CustomLineItemChargeDetailsProperty {
        Type = "type",

        // the properties below are optional
        Flat = new CustomLineItemFlatChargeDetailsProperty {
            ChargeValue = 123
        },
        LineItemFilters = new [] { new LineItemFilterProperty {
            Attribute = "attribute",
            MatchOption = "matchOption",

            // the properties below are optional
            AttributeValues = new [] { "attributeValues" },
            Values = new [] { "values" }
        } },
        Percentage = new CustomLineItemPercentageChargeDetailsProperty {
            PercentageValue = 123,

            // the properties below are optional
            ChildAssociatedResources = new [] { "childAssociatedResources" }
        }
    },
    Description = "description",
    PresentationDetails = new PresentationDetailsProperty {
        Service = "service"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnCustomLineItemProps := &CfnCustomLineItemProps{
	BillingGroupArn: jsii.String("billingGroupArn"),
	Name: jsii.String("name"),

	// the properties below are optional
	AccountId: jsii.String("accountId"),
	BillingPeriodRange: &BillingPeriodRangeProperty{
		ExclusiveEndBillingPeriod: jsii.String("exclusiveEndBillingPeriod"),
		InclusiveStartBillingPeriod: jsii.String("inclusiveStartBillingPeriod"),
	},
	ComputationRule: jsii.String("computationRule"),
	CustomLineItemChargeDetails: &CustomLineItemChargeDetailsProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		Flat: &CustomLineItemFlatChargeDetailsProperty{
			ChargeValue: jsii.Number(123),
		},
		LineItemFilters: []interface{}{
			&LineItemFilterProperty{
				Attribute: jsii.String("attribute"),
				MatchOption: jsii.String("matchOption"),

				// the properties below are optional
				AttributeValues: []*string{
					jsii.String("attributeValues"),
				},
				Values: []*string{
					jsii.String("values"),
				},
			},
		},
		Percentage: &CustomLineItemPercentageChargeDetailsProperty{
			PercentageValue: jsii.Number(123),

			// the properties below are optional
			ChildAssociatedResources: []*string{
				jsii.String("childAssociatedResources"),
			},
		},
	},
	Description: jsii.String("description"),
	PresentationDetails: &PresentationDetailsProperty{
		Service: jsii.String("service"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `accountId`: string — The AWS account in which this custom line item will be applied to.

- `billingGroupArn`: string (required) — The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.

- `billingPeriodRange`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCustomLineItem.BillingPeriodRangeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_billingconductor.CfnCustomLineItem.BillingPeriodRangeProperty.html) — A time range for which the custom line item is effective.

- `computationRule`: string — The computation rule that determines how the custom line item charges are computed and reflected in the bill.

- `customLineItemChargeDetails`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCustomLineItem.CustomLineItemChargeDetailsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_billingconductor.CfnCustomLineItem.CustomLineItemChargeDetailsProperty.html) — The charge details of a custom line item.

  It should contain only one of `Flat` or `Percentage` .

- `description`: string — The custom line item's description.

  This is shown on the Bills page in association with the charge value.

- `name`: string (required) — The custom line item's name.

- `presentationDetails`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCustomLineItem.PresentationDetailsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_billingconductor.CfnCustomLineItem.PresentationDetailsProperty.html) — Configuration details specifying how the custom line item charges are presented, including which service the charges are shown under.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A map that contains tag keys and tag values that are attached to a custom line item.
