Class CfnCustomLineItem

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.827Z") @Stability(Stable) public class CfnCustomLineItem extends CfnResource implements IInspectable
A CloudFormation AWS::BillingConductor::CustomLineItem.

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
         .billingPeriodRange(BillingPeriodRangeProperty.builder()
                 .exclusiveEndBillingPeriod("exclusiveEndBillingPeriod")
                 .inclusiveStartBillingPeriod("inclusiveStartBillingPeriod")
                 .build())
         .customLineItemChargeDetails(CustomLineItemChargeDetailsProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .flat(CustomLineItemFlatChargeDetailsProperty.builder()
                         .chargeValue(123)
                         .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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnCustomLineItemProps props)
      Create a new AWS::BillingConductor::CustomLineItem.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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()
      A map that contains tag keys and tag values that are attached to a custom line item.
    • 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.
    • 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.

      It should contain only one of Flat or Percentage .

    • setCustomLineItemChargeDetails

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

      It should contain only one of Flat or Percentage .

    • setCustomLineItemChargeDetails

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

      It should contain only one of Flat or Percentage .

    • getDescription

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

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

    • setDescription

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

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