Class: AWSCDK::DynamoDB::CfnTable::CsvProperty

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

Overview

The options for imported source files in CSV format.

The values are Delimiter and HeaderList.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delimiter: nil, header_list: nil) ⇒ CsvProperty

Returns a new instance of CsvProperty.

Parameters:

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

    The delimiter used for separating items in the CSV file being imported.

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

    List of the headers used to specify a common header for all source CSV files being imported.



914
915
916
917
918
919
# File 'dynamo_db/cfn_table.rb', line 914

def initialize(delimiter: nil, header_list: nil)
  @delimiter = delimiter
  Jsii::Type.check_type(@delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") unless @delimiter.nil?
  @header_list = header_list
  Jsii::Type.check_type(@header_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "headerList") unless @header_list.nil?
end

Instance Attribute Details

#delimiterString? (readonly)

The delimiter used for separating items in the CSV file being imported.



925
926
927
# File 'dynamo_db/cfn_table.rb', line 925

def delimiter
  @delimiter
end

#header_listArray<String>? (readonly)

List of the headers used to specify a common header for all source CSV files being imported.

If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.



932
933
934
# File 'dynamo_db/cfn_table.rb', line 932

def header_list
  @header_list
end

Class Method Details

.jsii_propertiesObject



934
935
936
937
938
939
# File 'dynamo_db/cfn_table.rb', line 934

def self.jsii_properties
  {
    :delimiter => "delimiter",
    :header_list => "headerList",
  }
end

Instance Method Details

#to_jsiiObject



941
942
943
944
945
946
947
948
# File 'dynamo_db/cfn_table.rb', line 941

def to_jsii
  result = {}
  result.merge!({
    "delimiter" => @delimiter,
    "headerList" => @header_list,
  })
  result.compact
end