Class CfnCustomLineItem

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.billingconductor.CfnCustomLineItem
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:48.178Z") @Stability(Stable) public class CfnCustomLineItem extends CfnResource implements IInspectable, ITaggable
Creates a custom line item that can be used to create a one-time or recurring, fixed or percentage-based charge that you can apply to a single billing group.

You can apply custom line items to the current or previous billing period. You can create either a fee or a discount custom line item.

Example:

 // 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.*;
 CfnCustomLineItem cfnCustomLineItem = CfnCustomLineItem.Builder.create(this, "MyCfnCustomLineItem")
         .billingGroupArn("billingGroupArn")
         .name("name")
         // the properties below are optional
         .accountId("accountId")
         .billingPeriodRange(BillingPeriodRangeProperty.builder()
                 .exclusiveEndBillingPeriod("exclusiveEndBillingPeriod")
                 .inclusiveStartBillingPeriod("inclusiveStartBillingPeriod")
                 .build())
         .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")
                         .values(List.of("values"))
                         .build()))
                 .percentage(CustomLineItemPercentageChargeDetailsProperty.builder()
                         .percentageValue(123)
                         // the properties below are optional
                         .childAssociatedResources(List.of("childAssociatedResources"))
                         .build())
                 .build())
         .description("description")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCustomLineItem

      protected CfnCustomLineItem(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCustomLineItem

      protected CfnCustomLineItem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCustomLineItem

      @Stability(Stable) public CfnCustomLineItem(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCustomLineItemProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
    • getAttrAssociationSize

      @Stability(Stable) @NotNull public Number getAttrAssociationSize()
      The number of resources that are associated to the custom line item.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public Number getAttrCreationTime()
      The time created.
    • getAttrCurrencyCode

      @Stability(Stable) @NotNull public String getAttrCurrencyCode()
      The custom line item's charge value currency.

      Only one of the valid values can be used.

    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public Number getAttrLastModifiedTime()
      The most recent time the custom line item was modified.
    • getAttrProductCode

      @Stability(Stable) @NotNull public String getAttrProductCode()
      The product code associated with the custom line item.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getBillingGroupArn

      @Stability(Stable) @NotNull public String getBillingGroupArn()
      The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
    • setBillingGroupArn

      @Stability(Stable) public void setBillingGroupArn(@NotNull String value)
      The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The custom line item's name.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The custom line item's name.
    • getAccountId

      @Stability(Stable) @Nullable public String getAccountId()
      The AWS account in which this custom line item will be applied to.
    • setAccountId

      @Stability(Stable) public void setAccountId(@Nullable String value)
      The AWS account in which this custom line item will be applied to.
    • getBillingPeriodRange

      @Stability(Stable) @Nullable public Object getBillingPeriodRange()
      A time range for which the custom line item is effective.
    • setBillingPeriodRange

      @Stability(Stable) public void setBillingPeriodRange(@Nullable IResolvable value)
      A time range for which the custom line item is effective.
    • setBillingPeriodRange

      @Stability(Stable) public void setBillingPeriodRange(@Nullable CfnCustomLineItem.BillingPeriodRangeProperty value)
      A time range for which the custom line item is effective.
    • getCustomLineItemChargeDetails

      @Stability(Stable) @Nullable public Object getCustomLineItemChargeDetails()
      The charge details of a custom line item.
    • setCustomLineItemChargeDetails

      @Stability(Stable) public void setCustomLineItemChargeDetails(@Nullable IResolvable value)
      The charge details of a custom line item.
    • setCustomLineItemChargeDetails

      @Stability(Stable) public void setCustomLineItemChargeDetails(@Nullable CfnCustomLineItem.CustomLineItemChargeDetailsProperty value)
      The charge details of a custom line item.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The custom line item's description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The custom line item's description.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A map that contains tag keys and tag values that are attached to a custom line item.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A map that contains tag keys and tag values that are attached to a custom line item.