Class: AWSCDK::DynamoDB::SecondaryIndexProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::SecondaryIndexProps
- Defined in:
- dynamo_db/secondary_index_props.rb
Overview
Properties for a secondary index.
Direct Known Subclasses
GlobalSecondaryIndexProps, GlobalSecondaryIndexPropsV2, LocalSecondaryIndexProps
Instance Attribute Summary collapse
-
#index_name ⇒ String
readonly
The name of the secondary index.
-
#non_key_attributes ⇒ Array<String>?
readonly
The non-key attributes that are projected into the secondary index.
-
#projection_type ⇒ AWSCDK::DynamoDB::ProjectionType?
readonly
The set of attributes that are projected into the secondary index.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(index_name:, non_key_attributes: nil, projection_type: nil) ⇒ SecondaryIndexProps
constructor
A new instance of SecondaryIndexProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(index_name:, non_key_attributes: nil, projection_type: nil) ⇒ SecondaryIndexProps
Returns a new instance of SecondaryIndexProps.
10 11 12 13 14 15 16 17 |
# File 'dynamo_db/secondary_index_props.rb', line 10 def initialize(index_name:, non_key_attributes: nil, projection_type: nil) @index_name = index_name Jsii::Type.check_type(@index_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexName") @non_key_attributes = non_key_attributes Jsii::Type.check_type(@non_key_attributes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "nonKeyAttributes") unless @non_key_attributes.nil? @projection_type = projection_type Jsii::Type.check_type(@projection_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuUHJvamVjdGlvblR5cGUifQ==")), "projectionType") unless @projection_type.nil? end |
Instance Attribute Details
#index_name ⇒ String (readonly)
The name of the secondary index.
22 23 24 |
# File 'dynamo_db/secondary_index_props.rb', line 22 def index_name @index_name end |
#non_key_attributes ⇒ Array<String>? (readonly)
Note:
Default: - No additional attributes
The non-key attributes that are projected into the secondary index.
27 28 29 |
# File 'dynamo_db/secondary_index_props.rb', line 27 def non_key_attributes @non_key_attributes end |
#projection_type ⇒ AWSCDK::DynamoDB::ProjectionType? (readonly)
Note:
Default: ALL
The set of attributes that are projected into the secondary index.
32 33 34 |
# File 'dynamo_db/secondary_index_props.rb', line 32 def projection_type @projection_type end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 'dynamo_db/secondary_index_props.rb', line 34 def self.jsii_properties { :index_name => "indexName", :non_key_attributes => "nonKeyAttributes", :projection_type => "projectionType", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'dynamo_db/secondary_index_props.rb', line 42 def to_jsii result = {} result.merge!({ "indexName" => @index_name, "nonKeyAttributes" => @non_key_attributes, "projectionType" => @projection_type, }) result.compact end |