Class: AWSCDK::BillingConductor::CfnCustomLineItem::LineItemFilterProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
billing_conductor/cfn_custom_line_item.rb

Overview

A representation of the line item filter for your custom line item.

You can use line item filters to include or exclude specific resource values from the billing group's total cost. For example, if you create a custom line item and you want to filter out a value, such as Savings Plans discounts, you can update LineItemFilter to exclude it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute:, match_option:, attribute_values: nil, values: nil) ⇒ LineItemFilterProperty

Returns a new instance of LineItemFilterProperty.

Parameters:

  • attribute (String)

    The attribute of the line item filter.

  • match_option (String)

    The match criteria of the line item filter.

  • attribute_values (Array<String>, nil) (defaults to: nil)

    The values of the line item filter.

  • values (Array<String>, nil) (defaults to: nil)

    The values of the line item filter.



861
862
863
864
865
866
867
868
869
870
# File 'billing_conductor/cfn_custom_line_item.rb', line 861

def initialize(attribute:, match_option:, attribute_values: nil, values: nil)
  @attribute = attribute
  Jsii::Type.check_type(@attribute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attribute")
  @match_option = match_option
  Jsii::Type.check_type(@match_option, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "matchOption")
  @attribute_values = attribute_values
  Jsii::Type.check_type(@attribute_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "attributeValues") unless @attribute_values.nil?
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "values") unless @values.nil?
end

Instance Attribute Details

#attributeString (readonly)

The attribute of the line item filter.

This specifies what attribute that you can filter on.



878
879
880
# File 'billing_conductor/cfn_custom_line_item.rb', line 878

def attribute
  @attribute
end

#attribute_valuesArray<String>? (readonly)

The values of the line item filter.

This specifies the values to filter on.



892
893
894
# File 'billing_conductor/cfn_custom_line_item.rb', line 892

def attribute_values
  @attribute_values
end

#match_optionString (readonly)

The match criteria of the line item filter.

This parameter specifies whether not to include the resource value from the billing group total cost.



885
886
887
# File 'billing_conductor/cfn_custom_line_item.rb', line 885

def match_option
  @match_option
end

#valuesArray<String>? (readonly)

The values of the line item filter.

This specifies the values to filter on. Currently, you can only exclude Savings Plans discounts.



899
900
901
# File 'billing_conductor/cfn_custom_line_item.rb', line 899

def values
  @values
end

Class Method Details

.jsii_propertiesObject



901
902
903
904
905
906
907
908
# File 'billing_conductor/cfn_custom_line_item.rb', line 901

def self.jsii_properties
  {
    :attribute => "attribute",
    :match_option => "matchOption",
    :attribute_values => "attributeValues",
    :values => "values",
  }
end

Instance Method Details

#to_jsiiObject



910
911
912
913
914
915
916
917
918
919
# File 'billing_conductor/cfn_custom_line_item.rb', line 910

def to_jsii
  result = {}
  result.merge!({
    "attribute" => @attribute,
    "matchOption" => @match_option,
    "attributeValues" => @attribute_values,
    "values" => @values,
  })
  result.compact
end