Class: AWSCDK::DynamoDB::CfnGlobalTable::ProjectionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::CfnGlobalTable::ProjectionProperty
- Defined in:
- dynamo_db/cfn_global_table.rb
Overview
Represents attributes that are copied (projected) from the table into an index.
These are in addition to the primary key attributes and index key attributes, which are automatically projected.
Instance Attribute Summary collapse
-
#non_key_attributes ⇒ Array<String>?
readonly
Represents the non-key attribute names which will be projected into the index.
-
#projection_type ⇒ String?
readonly
The set of attributes that are projected into the index:.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(non_key_attributes: nil, projection_type: nil) ⇒ ProjectionProperty
constructor
A new instance of ProjectionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(non_key_attributes: nil, projection_type: nil) ⇒ ProjectionProperty
Returns a new instance of ProjectionProperty.
1361 1362 1363 1364 1365 1366 |
# File 'dynamo_db/cfn_global_table.rb', line 1361 def initialize(non_key_attributes: nil, projection_type: nil) @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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "projectionType") unless @projection_type.nil? end |
Instance Attribute Details
#non_key_attributes ⇒ Array<String>? (readonly)
Represents the non-key attribute names which will be projected into the index.
For global and local secondary indexes, the total count of NonKeyAttributes summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of INCLUDE . You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.
1374 1375 1376 |
# File 'dynamo_db/cfn_global_table.rb', line 1374 def non_key_attributes @non_key_attributes end |
#projection_type ⇒ String? (readonly)
The set of attributes that are projected into the index:.
KEYS_ONLY- Only the index and primary keys are projected into the index.INCLUDE- In addition to the attributes described inKEYS_ONLY, the secondary index will include other non-key attributes that you specify.ALL- All of the table attributes are projected into the index.
When using the DynamoDB console, ALL is selected by default.
1385 1386 1387 |
# File 'dynamo_db/cfn_global_table.rb', line 1385 def projection_type @projection_type end |
Class Method Details
.jsii_properties ⇒ Object
1387 1388 1389 1390 1391 1392 |
# File 'dynamo_db/cfn_global_table.rb', line 1387 def self.jsii_properties { :non_key_attributes => "nonKeyAttributes", :projection_type => "projectionType", } end |
Instance Method Details
#to_jsii ⇒ Object
1394 1395 1396 1397 1398 1399 1400 1401 |
# File 'dynamo_db/cfn_global_table.rb', line 1394 def to_jsii result = {} result.merge!({ "nonKeyAttributes" => @non_key_attributes, "projectionType" => @projection_type, }) result.compact end |