Class: AWSCDK::DynamoDB::ImportSourceSpecification

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

Overview

Properties for importing data from the S3.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, input_format:, bucket_owner: nil, compression_type: nil, key_prefix: nil) ⇒ ImportSourceSpecification

Returns a new instance of ImportSourceSpecification.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The S3 bucket that is being imported from.

  • input_format (AWSCDK::DynamoDB::InputFormat)

    The format of the imported data.

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

    The account number of the S3 bucket that is being imported from.

  • compression_type (AWSCDK::DynamoDB::InputCompressionType, nil) (defaults to: nil)

    The compression type of the imported data.

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

    The key prefix shared by all S3 Objects that are being imported.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'dynamo_db/import_source_specification.rb', line 12

def initialize(bucket:, input_format:, bucket_owner: nil, compression_type: nil, key_prefix: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @input_format = input_format
  Jsii::Type.check_type(@input_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSW5wdXRGb3JtYXQifQ==")), "inputFormat")
  @bucket_owner = bucket_owner
  Jsii::Type.check_type(@bucket_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketOwner") unless @bucket_owner.nil?
  @compression_type = compression_type
  Jsii::Type.check_type(@compression_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSW5wdXRDb21wcmVzc2lvblR5cGUifQ==")), "compressionType") unless @compression_type.nil?
  @key_prefix = key_prefix
  Jsii::Type.check_type(@key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPrefix") unless @key_prefix.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

The S3 bucket that is being imported from.

Returns:



28
29
30
# File 'dynamo_db/import_source_specification.rb', line 28

def bucket
  @bucket
end

#bucket_ownerString? (readonly)

Note:

Default: - no value

The account number of the S3 bucket that is being imported from.

Returns:

  • (String, nil)


37
38
39
# File 'dynamo_db/import_source_specification.rb', line 37

def bucket_owner
  @bucket_owner
end

#compression_typeAWSCDK::DynamoDB::InputCompressionType? (readonly)

Note:

Default: InputCompressionType.NONE

The compression type of the imported data.



42
43
44
# File 'dynamo_db/import_source_specification.rb', line 42

def compression_type
  @compression_type
end

#input_formatAWSCDK::DynamoDB::InputFormat (readonly)

The format of the imported data.



32
33
34
# File 'dynamo_db/import_source_specification.rb', line 32

def input_format
  @input_format
end

#key_prefixString? (readonly)

Note:

Default: - no value

The key prefix shared by all S3 Objects that are being imported.

Returns:

  • (String, nil)


47
48
49
# File 'dynamo_db/import_source_specification.rb', line 47

def key_prefix
  @key_prefix
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
57
# File 'dynamo_db/import_source_specification.rb', line 49

def self.jsii_properties
  {
    :bucket => "bucket",
    :input_format => "inputFormat",
    :bucket_owner => "bucketOwner",
    :compression_type => "compressionType",
    :key_prefix => "keyPrefix",
  }
end

Instance Method Details

#to_jsiiObject



59
60
61
62
63
64
65
66
67
68
69
# File 'dynamo_db/import_source_specification.rb', line 59

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "inputFormat" => @input_format,
    "bucketOwner" => @bucket_owner,
    "compressionType" => @compression_type,
    "keyPrefix" => @key_prefix,
  })
  result.compact
end