Class: AWSCDK::DynamoDB::CfnGlobalTable::AttributeDefinitionProperty

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

Overview

Represents an attribute for describing the schema for the table and indexes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_name:, attribute_type:) ⇒ AttributeDefinitionProperty

Returns a new instance of AttributeDefinitionProperty.

Parameters:

  • attribute_name (String)

    A name for the attribute.

  • attribute_type (String)

    The data type for the attribute, where:.



806
807
808
809
810
811
# File 'dynamo_db/cfn_global_table.rb', line 806

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_nameString (readonly)

A name for the attribute.



817
818
819
# File 'dynamo_db/cfn_global_table.rb', line 817

def attribute_name
  @attribute_name
end

#attribute_typeString (readonly)

The data type for the attribute, where:.

  • S - the attribute is of type String
  • N - the attribute is of type Number
  • B - the attribute is of type Binary


826
827
828
# File 'dynamo_db/cfn_global_table.rb', line 826

def attribute_type
  @attribute_type
end

Class Method Details

.jsii_propertiesObject



828
829
830
831
832
833
# File 'dynamo_db/cfn_global_table.rb', line 828

def self.jsii_properties
  {
    :attribute_name => "attributeName",
    :attribute_type => "attributeType",
  }
end

Instance Method Details

#to_jsiiObject



835
836
837
838
839
840
841
842
# File 'dynamo_db/cfn_global_table.rb', line 835

def to_jsii
  result = {}
  result.merge!({
    "attributeName" => @attribute_name,
    "attributeType" => @attribute_type,
  })
  result.compact
end