Class: AWSCDK::DynamoDB::CfnTable::AttributeDefinitionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::CfnTable::AttributeDefinitionProperty
- Defined in:
- dynamo_db/cfn_table.rb
Overview
Represents an attribute for describing the schema for the table and indexes.
Instance Attribute Summary collapse
-
#attribute_name ⇒ String
readonly
A name for the attribute.
-
#attribute_type ⇒ String
readonly
The data type for the attribute, where:.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attribute_name:, attribute_type:) ⇒ AttributeDefinitionProperty
constructor
A new instance of AttributeDefinitionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(attribute_name:, attribute_type:) ⇒ AttributeDefinitionProperty
Returns a new instance of AttributeDefinitionProperty.
820 821 822 823 824 825 |
# File 'dynamo_db/cfn_table.rb', line 820 def initialize(attribute_name:, attribute_type:) @attribute_name = attribute_name Jsii::Type.check_type(@attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName") @attribute_type = attribute_type Jsii::Type.check_type(@attribute_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeType") end |
Instance Attribute Details
#attribute_name ⇒ String (readonly)
A name for the attribute.
831 832 833 |
# File 'dynamo_db/cfn_table.rb', line 831 def attribute_name @attribute_name end |
#attribute_type ⇒ String (readonly)
The data type for the attribute, where:.
S- the attribute is of type StringN- the attribute is of type NumberB- the attribute is of type Binary
840 841 842 |
# File 'dynamo_db/cfn_table.rb', line 840 def attribute_type @attribute_type end |
Class Method Details
.jsii_properties ⇒ Object
842 843 844 845 846 847 |
# File 'dynamo_db/cfn_table.rb', line 842 def self.jsii_properties { :attribute_name => "attributeName", :attribute_type => "attributeType", } end |
Instance Method Details
#to_jsii ⇒ Object
849 850 851 852 853 854 855 856 |
# File 'dynamo_db/cfn_table.rb', line 849 def to_jsii result = {} result.merge!({ "attributeName" => @attribute_name, "attributeType" => @attribute_type, }) result.compact end |