Class: AWSCDK::SAM::CfnSimpleTableProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sam/cfn_simple_table_props.rb

Overview

Properties for defining a CfnSimpleTable.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(primary_key: nil, provisioned_throughput: nil, sse_specification: nil, table_name: nil, tags: nil) ⇒ CfnSimpleTableProps

Returns a new instance of CfnSimpleTableProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'sam/cfn_simple_table_props.rb', line 14

def initialize(primary_key: nil, provisioned_throughput: nil, sse_specification: nil, table_name: nil, tags: nil)
  @primary_key = primary_key.is_a?(Hash) ? ::AWSCDK::SAM::CfnSimpleTable::PrimaryKeyProperty.new(**primary_key.transform_keys(&:to_sym)) : primary_key
  Jsii::Type.check_type(@primary_key, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuU2ltcGxlVGFibGUuUHJpbWFyeUtleVByb3BlcnR5In1dfX0=")), "primaryKey") unless @primary_key.nil?
  @provisioned_throughput = provisioned_throughput.is_a?(Hash) ? ::AWSCDK::SAM::CfnSimpleTable::ProvisionedThroughputProperty.new(**provisioned_throughput.transform_keys(&:to_sym)) : provisioned_throughput
  Jsii::Type.check_type(@provisioned_throughput, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuU2ltcGxlVGFibGUuUHJvdmlzaW9uZWRUaHJvdWdocHV0UHJvcGVydHkifV19fQ==")), "provisionedThroughput") unless @provisioned_throughput.nil?
  @sse_specification = sse_specification.is_a?(Hash) ? ::AWSCDK::SAM::CfnSimpleTable::SSESpecificationProperty.new(**sse_specification.transform_keys(&:to_sym)) : sse_specification
  Jsii::Type.check_type(@sse_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuU2ltcGxlVGFibGUuU1NFU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "sseSpecification") unless @sse_specification.nil?
  @table_name = table_name
  Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#primary_keyAWSCDK::IResolvable, ... (readonly)



29
30
31
# File 'sam/cfn_simple_table_props.rb', line 29

def primary_key
  @primary_key
end

#provisioned_throughputAWSCDK::IResolvable, ... (readonly)



32
33
34
# File 'sam/cfn_simple_table_props.rb', line 32

def provisioned_throughput
  @provisioned_throughput
end

#sse_specificationAWSCDK::IResolvable, ... (readonly)



35
36
37
# File 'sam/cfn_simple_table_props.rb', line 35

def sse_specification
  @sse_specification
end

#table_nameString? (readonly)



38
39
40
# File 'sam/cfn_simple_table_props.rb', line 38

def table_name
  @table_name
end

#tagsHash{String => String}? (readonly)



41
42
43
# File 'sam/cfn_simple_table_props.rb', line 41

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
51
# File 'sam/cfn_simple_table_props.rb', line 43

def self.jsii_properties
  {
    :primary_key => "primaryKey",
    :provisioned_throughput => "provisionedThroughput",
    :sse_specification => "sseSpecification",
    :table_name => "tableName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
62
63
# File 'sam/cfn_simple_table_props.rb', line 53

def to_jsii
  result = {}
  result.merge!({
    "primaryKey" => @primary_key,
    "provisionedThroughput" => @provisioned_throughput,
    "sseSpecification" => @sse_specification,
    "tableName" => @table_name,
    "tags" => @tags,
  })
  result.compact
end