Class: AWSCDK::Timestream::CfnTable::PartitionKeyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
timestream/cfn_table.rb

Overview

An attribute used in partitioning data in a table.

A dimension key partitions data using the values of the dimension specified by the dimension-name as partition key, while a measure key partitions data using measure names (values of the 'measure_name' column).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, enforcement_in_record: nil, name: nil) ⇒ PartitionKeyProperty

Returns a new instance of PartitionKeyProperty.

Parameters:

  • type (String)

    The type of the partition key.

  • enforcement_in_record (String, nil) (defaults to: nil)

    The level of enforcement for the specification of a dimension key in ingested records.

  • name (String, nil) (defaults to: nil)

    The name of the attribute used for a dimension key.



675
676
677
678
679
680
681
682
# File 'timestream/cfn_table.rb', line 675

def initialize(type:, enforcement_in_record: nil, name: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @enforcement_in_record = enforcement_in_record
  Jsii::Type.check_type(@enforcement_in_record, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "enforcementInRecord") unless @enforcement_in_record.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#enforcement_in_recordString? (readonly)

The level of enforcement for the specification of a dimension key in ingested records.

Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).



697
698
699
# File 'timestream/cfn_table.rb', line 697

def enforcement_in_record
  @enforcement_in_record
end

#nameString? (readonly)

The name of the attribute used for a dimension key.



702
703
704
# File 'timestream/cfn_table.rb', line 702

def name
  @name
end

#typeString (readonly)

The type of the partition key.

Options are DIMENSION (dimension key) and MEASURE (measure key).



690
691
692
# File 'timestream/cfn_table.rb', line 690

def type
  @type
end

Class Method Details

.jsii_propertiesObject



704
705
706
707
708
709
710
# File 'timestream/cfn_table.rb', line 704

def self.jsii_properties
  {
    :type => "type",
    :enforcement_in_record => "enforcementInRecord",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



712
713
714
715
716
717
718
719
720
# File 'timestream/cfn_table.rb', line 712

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "enforcementInRecord" => @enforcement_in_record,
    "name" => @name,
  })
  result.compact
end