Class: AWSCDK::Glue::CfnCrawler::DynamoDBTargetProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_crawler.rb

Overview

Specifies an Amazon DynamoDB table to crawl.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path: nil, scan_all: nil, scan_rate: nil) ⇒ DynamoDBTargetProperty

Returns a new instance of DynamoDBTargetProperty.

Parameters:

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

    The name of the DynamoDB table to crawl.

  • scan_all (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether to scan all the records, or to sample rows from the table.

  • scan_rate (Numeric, nil) (defaults to: nil)

    The percentage of the configured read capacity units to use by the AWS Glue crawler.



839
840
841
842
843
844
845
846
# File 'glue/cfn_crawler.rb', line 839

def initialize(path: nil, scan_all: nil, scan_rate: nil)
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @scan_all = scan_all
  Jsii::Type.check_type(@scan_all, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "scanAll") unless @scan_all.nil?
  @scan_rate = scan_rate
  Jsii::Type.check_type(@scan_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scanRate") unless @scan_rate.nil?
end

Instance Attribute Details

#pathString? (readonly)

The name of the DynamoDB table to crawl.



852
853
854
# File 'glue/cfn_crawler.rb', line 852

def path
  @path
end

#scan_allBoolean, ... (readonly)

Indicates whether to scan all the records, or to sample rows from the table.

Scanning all the records can take a long time when the table is not a high throughput table.

A value of true means to scan all records, while a value of false means to sample the records. If no value is specified, the value defaults to true .



861
862
863
# File 'glue/cfn_crawler.rb', line 861

def scan_all
  @scan_all
end

#scan_rateNumeric? (readonly)

The percentage of the configured read capacity units to use by the AWS Glue crawler.

Read capacity units is a term defined by DynamoDB, and is a numeric value that acts as rate limiter for the number of reads that can be performed on that table per second.

The valid values are null or a value between 0.1 to 1.5. A null value is used when user does not provide a value, and defaults to 0.5 of the configured Read Capacity Unit (for provisioned tables), or 0.25 of the max configured Read Capacity Unit (for tables using on-demand mode).



870
871
872
# File 'glue/cfn_crawler.rb', line 870

def scan_rate
  @scan_rate
end

Class Method Details

.jsii_propertiesObject



872
873
874
875
876
877
878
# File 'glue/cfn_crawler.rb', line 872

def self.jsii_properties
  {
    :path => "path",
    :scan_all => "scanAll",
    :scan_rate => "scanRate",
  }
end

Instance Method Details

#to_jsiiObject



880
881
882
883
884
885
886
887
888
# File 'glue/cfn_crawler.rb', line 880

def to_jsii
  result = {}
  result.merge!({
    "path" => @path,
    "scanAll" => @scan_all,
    "scanRate" => @scan_rate,
  })
  result.compact
end