Class: AWSCDK::QuickSight::CfnDashboard::AggregationFunctionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_dashboard.rb

Overview

An aggregation function aggregates values from a dimension or measure.

This is a union type structure. For this structure to be valid, only one of the attributes can be defined.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_aggregation_function: nil, categorical_aggregation_function: nil, date_aggregation_function: nil, numerical_aggregation_function: nil) ⇒ AggregationFunctionProperty

Returns a new instance of AggregationFunctionProperty.

Parameters:



833
834
835
836
837
838
839
840
841
842
# File 'quick_sight/cfn_dashboard.rb', line 833

def initialize(attribute_aggregation_function: nil, categorical_aggregation_function: nil, date_aggregation_function: nil, numerical_aggregation_function: nil)
  @attribute_aggregation_function = attribute_aggregation_function.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnDashboard::AttributeAggregationFunctionProperty.new(**attribute_aggregation_function.transform_keys(&:to_sym)) : attribute_aggregation_function
  Jsii::Type.check_type(@attribute_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkRhc2hib2FyZC5BdHRyaWJ1dGVBZ2dyZWdhdGlvbkZ1bmN0aW9uUHJvcGVydHkifV19fQ==")), "attributeAggregationFunction") unless @attribute_aggregation_function.nil?
  @categorical_aggregation_function = categorical_aggregation_function
  Jsii::Type.check_type(@categorical_aggregation_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "categoricalAggregationFunction") unless @categorical_aggregation_function.nil?
  @date_aggregation_function = date_aggregation_function
  Jsii::Type.check_type(@date_aggregation_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dateAggregationFunction") unless @date_aggregation_function.nil?
  @numerical_aggregation_function = numerical_aggregation_function.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnDashboard::NumericalAggregationFunctionProperty.new(**numerical_aggregation_function.transform_keys(&:to_sym)) : numerical_aggregation_function
  Jsii::Type.check_type(@numerical_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkRhc2hib2FyZC5OdW1lcmljYWxBZ2dyZWdhdGlvbkZ1bmN0aW9uUHJvcGVydHkifV19fQ==")), "numericalAggregationFunction") unless @numerical_aggregation_function.nil?
end

Instance Attribute Details

#attribute_aggregation_functionAWSCDK::IResolvable, ... (readonly)

Aggregation for attributes.



848
849
850
# File 'quick_sight/cfn_dashboard.rb', line 848

def attribute_aggregation_function
  @attribute_aggregation_function
end

#categorical_aggregation_functionString? (readonly)

Aggregation for categorical values.

  • COUNT : Aggregate by the total number of values, including duplicates.
  • DISTINCT_COUNT : Aggregate by the total number of distinct values.


856
857
858
# File 'quick_sight/cfn_dashboard.rb', line 856

def categorical_aggregation_function
  @categorical_aggregation_function
end

#date_aggregation_functionString? (readonly)

Aggregation for date values.

  • COUNT : Aggregate by the total number of values, including duplicates.
  • DISTINCT_COUNT : Aggregate by the total number of distinct values.
  • MIN : Select the smallest date value.
  • MAX : Select the largest date value.


866
867
868
# File 'quick_sight/cfn_dashboard.rb', line 866

def date_aggregation_function
  @date_aggregation_function
end

#numerical_aggregation_functionAWSCDK::IResolvable, ... (readonly)

Aggregation for numerical values.



871
872
873
# File 'quick_sight/cfn_dashboard.rb', line 871

def numerical_aggregation_function
  @numerical_aggregation_function
end

Class Method Details

.jsii_propertiesObject



873
874
875
876
877
878
879
880
# File 'quick_sight/cfn_dashboard.rb', line 873

def self.jsii_properties
  {
    :attribute_aggregation_function => "attributeAggregationFunction",
    :categorical_aggregation_function => "categoricalAggregationFunction",
    :date_aggregation_function => "dateAggregationFunction",
    :numerical_aggregation_function => "numericalAggregationFunction",
  }
end

Instance Method Details

#to_jsiiObject



882
883
884
885
886
887
888
889
890
891
# File 'quick_sight/cfn_dashboard.rb', line 882

def to_jsii
  result = {}
  result.merge!({
    "attributeAggregationFunction" => @attribute_aggregation_function,
    "categoricalAggregationFunction" => @categorical_aggregation_function,
    "dateAggregationFunction" => @date_aggregation_function,
    "numericalAggregationFunction" => @numerical_aggregation_function,
  })
  result.compact
end