@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.524Z") public class CfnCustomLineItem extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnCustomLineItem.BillingPeriodRangeProperty
The billing period range in which the custom line item request will be applied.
|
static class |
CfnCustomLineItem.Builder
A fluent builder for
CfnCustomLineItem . |
static interface |
CfnCustomLineItem.CustomLineItemChargeDetailsProperty
The charge details of a custom line item.
|
static interface |
CfnCustomLineItem.CustomLineItemFlatChargeDetailsProperty
The charge details of a custom line item.
|
static interface |
CfnCustomLineItem.CustomLineItemPercentageChargeDetailsProperty
A representation of the charge details associated with a percentage custom line item.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnCustomLineItem(Construct scope,
java.lang.String id,
CfnCustomLineItemProps props)
Create a new `AWS::BillingConductor::CustomLineItem`.
|
protected |
CfnCustomLineItem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnCustomLineItem(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
|
java.lang.Number |
getAttrAssociationSize()
The number of resources that are associated to the custom line item.
|
java.lang.Number |
getAttrCreationTime()
The time created.
|
java.lang.String |
getAttrCurrencyCode()
The custom line item's charge value currency.
|
java.lang.Number |
getAttrLastModifiedTime()
The most recent time the custom line item was modified.
|
java.lang.String |
getAttrProductCode()
The product code associated with the custom line item.
|
java.lang.String |
getBillingGroupArn()
The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
|
java.lang.Object |
getBillingPeriodRange()
A time range for which the custom line item is effective.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getCustomLineItemChargeDetails()
The charge details of a custom line item.
|
java.lang.String |
getDescription()
The custom line item's description.
|
java.lang.String |
getName()
The custom line item's name.
|
TagManager |
getTags()
A map that contains tag keys and tag values that are attached to a custom line item.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBillingGroupArn(java.lang.String value)
The Amazon Resource Name (ARN) that references the billing group where the custom line item applies to.
|
void |
setBillingPeriodRange(CfnCustomLineItem.BillingPeriodRangeProperty value)
A time range for which the custom line item is effective.
|
void |
setBillingPeriodRange(IResolvable value)
A time range for which the custom line item is effective.
|
void |
setCustomLineItemChargeDetails(CfnCustomLineItem.CustomLineItemChargeDetailsProperty value)
The charge details of a custom line item.
|
void |
setCustomLineItemChargeDetails(IResolvable value)
The charge details of a custom line item.
|
void |
setDescription(java.lang.String value)
The custom line item's description.
|
void |
setName(java.lang.String value)
The custom line item's name.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnCustomLineItem(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCustomLineItem(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnCustomLineItem(Construct scope, java.lang.String id, CfnCustomLineItemProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.Number getAttrAssociationSize()
public java.lang.Number getAttrCreationTime()
public java.lang.String getAttrCurrencyCode()
Only one of the valid values can be used.
public java.lang.Number getAttrLastModifiedTime()
public java.lang.String getAttrProductCode()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getBillingGroupArn()
public void setBillingGroupArn(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getBillingPeriodRange()
public void setBillingPeriodRange(IResolvable value)
public void setBillingPeriodRange(CfnCustomLineItem.BillingPeriodRangeProperty value)
public java.lang.Object getCustomLineItemChargeDetails()
It should contain only one of Flat
or Percentage
.
public void setCustomLineItemChargeDetails(IResolvable value)
It should contain only one of Flat
or Percentage
.
public void setCustomLineItemChargeDetails(CfnCustomLineItem.CustomLineItemChargeDetailsProperty value)
It should contain only one of Flat
or Percentage
.
public java.lang.String getDescription()
This is shown on the Bills page in association with the charge value.
public void setDescription(java.lang.String value)
This is shown on the Bills page in association with the charge value.