Class: AWSCDK::DataBrew::CfnDataset::FilesLimitProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
data_brew/cfn_dataset.rb

Overview

Represents a limit imposed on number of Amazon S3 files that should be selected for a dataset from a connected Amazon S3 path.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_files:, order: nil, ordered_by: nil) ⇒ FilesLimitProperty

Returns a new instance of FilesLimitProperty.

Parameters:

  • max_files (Numeric)

    The number of Amazon S3 files to select.

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

    A criteria to use for Amazon S3 files sorting before their selection.

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

    A criteria to use for Amazon S3 files sorting before their selection.



947
948
949
950
951
952
953
954
# File 'data_brew/cfn_dataset.rb', line 947

def initialize(max_files:, order: nil, ordered_by: nil)
  @max_files = max_files
  Jsii::Type.check_type(@max_files, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxFiles")
  @order = order
  Jsii::Type.check_type(@order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "order") unless @order.nil?
  @ordered_by = ordered_by
  Jsii::Type.check_type(@ordered_by, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "orderedBy") unless @ordered_by.nil?
end

Instance Attribute Details

#max_filesNumeric (readonly)

The number of Amazon S3 files to select.



960
961
962
# File 'data_brew/cfn_dataset.rb', line 960

def max_files
  @max_files
end

#orderString? (readonly)

A criteria to use for Amazon S3 files sorting before their selection.

By default uses DESCENDING order, i.e. most recent files are selected first. Anotherpossible value is ASCENDING.



967
968
969
# File 'data_brew/cfn_dataset.rb', line 967

def order
  @order
end

#ordered_byString? (readonly)

A criteria to use for Amazon S3 files sorting before their selection.

By default uses LAST_MODIFIED_DATE as a sorting criteria. Currently it's the only allowed value.



974
975
976
# File 'data_brew/cfn_dataset.rb', line 974

def ordered_by
  @ordered_by
end

Class Method Details

.jsii_propertiesObject



976
977
978
979
980
981
982
# File 'data_brew/cfn_dataset.rb', line 976

def self.jsii_properties
  {
    :max_files => "maxFiles",
    :order => "order",
    :ordered_by => "orderedBy",
  }
end

Instance Method Details

#to_jsiiObject



984
985
986
987
988
989
990
991
992
# File 'data_brew/cfn_dataset.rb', line 984

def to_jsii
  result = {}
  result.merge!({
    "maxFiles" => @max_files,
    "order" => @order,
    "orderedBy" => @ordered_by,
  })
  result.compact
end