Class: AWSCDK::DynamoDB::TableAttributesV2
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::TableAttributesV2
- Defined in:
- dynamo_db/table_attributes_v2.rb
Overview
Attributes of a DynamoDB table.
Instance Attribute Summary collapse
-
#encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
KMS encryption key for the table.
-
#global_indexes ⇒ Array<String>?
readonly
The name of the global indexes set for the table.
-
#grant_index_permissions ⇒ Boolean?
readonly
Whether or not to grant permissions for all indexes of the table.
-
#local_indexes ⇒ Array<String>?
readonly
The name of the local indexes set for the table.
-
#table_arn ⇒ String?
readonly
The ARN of the table.
-
#table_id ⇒ String?
readonly
The ID of the table.
-
#table_name ⇒ String?
readonly
The name of the table.
-
#table_stream_arn ⇒ String?
readonly
The stream ARN of the table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encryption_key: nil, global_indexes: nil, grant_index_permissions: nil, local_indexes: nil, table_arn: nil, table_id: nil, table_name: nil, table_stream_arn: nil) ⇒ TableAttributesV2
constructor
A new instance of TableAttributesV2.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encryption_key: nil, global_indexes: nil, grant_index_permissions: nil, local_indexes: nil, table_arn: nil, table_id: nil, table_name: nil, table_stream_arn: nil) ⇒ TableAttributesV2
Returns a new instance of TableAttributesV2.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'dynamo_db/table_attributes_v2.rb', line 15 def initialize(encryption_key: nil, global_indexes: nil, grant_index_permissions: nil, local_indexes: nil, table_arn: nil, table_id: nil, table_name: nil, table_stream_arn: nil) @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil? @global_indexes = global_indexes Jsii::Type.check_type(@global_indexes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "globalIndexes") unless @global_indexes.nil? @grant_index_permissions = Jsii::Type.check_type(@grant_index_permissions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "grantIndexPermissions") unless @grant_index_permissions.nil? @local_indexes = local_indexes Jsii::Type.check_type(@local_indexes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "localIndexes") unless @local_indexes.nil? @table_arn = table_arn Jsii::Type.check_type(@table_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableArn") unless @table_arn.nil? @table_id = table_id Jsii::Type.check_type(@table_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableId") unless @table_id.nil? @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil? @table_stream_arn = table_stream_arn Jsii::Type.check_type(@table_stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableStreamArn") unless @table_stream_arn.nil? end |
Instance Attribute Details
#encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - no KMS encryption key
KMS encryption key for the table.
38 39 40 |
# File 'dynamo_db/table_attributes_v2.rb', line 38 def encryption_key @encryption_key end |
#global_indexes ⇒ Array<String>? (readonly)
Default: - no global indexes
The name of the global indexes set for the table.
Note: You must set either this property or local_indexes if you want permissions
to be granted for indexes as well as the table itself.
46 47 48 |
# File 'dynamo_db/table_attributes_v2.rb', line 46 def global_indexes @global_indexes end |
#grant_index_permissions ⇒ Boolean? (readonly)
Default: false
Whether or not to grant permissions for all indexes of the table.
Note: If false, permissions will only be granted to indexes when global_indexes
or local_indexes is specified.
54 55 56 |
# File 'dynamo_db/table_attributes_v2.rb', line 54 def @grant_index_permissions end |
#local_indexes ⇒ Array<String>? (readonly)
Default: - no local indexes
The name of the local indexes set for the table.
Note: You must set either this property or global_indexes if you want permissions
to be granted for indexes as well as the table itself.
62 63 64 |
# File 'dynamo_db/table_attributes_v2.rb', line 62 def local_indexes @local_indexes end |
#table_arn ⇒ String? (readonly)
Default: - table arn generated using tableName and region of stack
The ARN of the table.
Note: You must specify this or the table_name.
69 70 71 |
# File 'dynamo_db/table_attributes_v2.rb', line 69 def table_arn @table_arn end |
#table_id ⇒ String? (readonly)
Default: - no table id
The ID of the table.
74 75 76 |
# File 'dynamo_db/table_attributes_v2.rb', line 74 def table_id @table_id end |
#table_name ⇒ String? (readonly)
Default: - table name retrieved from provided tableArn
The name of the table.
Note: You must specify this or the table_arn.
81 82 83 |
# File 'dynamo_db/table_attributes_v2.rb', line 81 def table_name @table_name end |
#table_stream_arn ⇒ String? (readonly)
Default: - no table stream ARN
The stream ARN of the table.
86 87 88 |
# File 'dynamo_db/table_attributes_v2.rb', line 86 def table_stream_arn @table_stream_arn end |
Class Method Details
.jsii_properties ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'dynamo_db/table_attributes_v2.rb', line 88 def self.jsii_properties { :encryption_key => "encryptionKey", :global_indexes => "globalIndexes", :grant_index_permissions => "grantIndexPermissions", :local_indexes => "localIndexes", :table_arn => "tableArn", :table_id => "tableId", :table_name => "tableName", :table_stream_arn => "tableStreamArn", } end |
Instance Method Details
#to_jsii ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'dynamo_db/table_attributes_v2.rb', line 101 def to_jsii result = {} result.merge!({ "encryptionKey" => @encryption_key, "globalIndexes" => @global_indexes, "grantIndexPermissions" => @grant_index_permissions, "localIndexes" => @local_indexes, "tableArn" => @table_arn, "tableId" => @table_id, "tableName" => @table_name, "tableStreamArn" => @table_stream_arn, }) result.compact end |