Class CostCategoryRule
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<CostCategoryRule.Builder,
CostCategoryRule>
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CostCategoryRule.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
The value the line item is categorized as if the line item contains the matched dimension.final Expression
rule()
An Expression object used to categorize costs.static Class
<? extends CostCategoryRule.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final CostCategoryRuleType
type()
You can define theCostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
.final String
You can define theCostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
.final String
value()
Returns the value of the Value property for this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
value
Returns the value of the Value property for this object.- Returns:
- The value of the Value property for this object.
-
rule
An Expression object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently the only dimensions supported are
LINKED_ACCOUNT
,SERVICE_CODE
,RECORD_TYPE
,LINKED_ACCOUNT_NAME
,REGION
, andUSAGE_TYPE
.RECORD_TYPE
is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the Billing and Cost Management User Guide.- Returns:
- An Expression
object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently
the only dimensions supported are
LINKED_ACCOUNT
,SERVICE_CODE
,RECORD_TYPE
,LINKED_ACCOUNT_NAME
,REGION
, andUSAGE_TYPE
.RECORD_TYPE
is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the Billing and Cost Management User Guide.
-
inheritedValue
The value the line item is categorized as if the line item contains the matched dimension.
- Returns:
- The value the line item is categorized as if the line item contains the matched dimension.
-
type
You can define the
CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use.If the service returns an enum value that is not available in the current SDK version,
type
will returnCostCategoryRuleType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- You can define the
CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use. - See Also:
-
typeAsString
You can define the
CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use.If the service returns an enum value that is not available in the current SDK version,
type
will returnCostCategoryRuleType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- You can define the
CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use. - See Also:
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<CostCategoryRule.Builder,
CostCategoryRule> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-