Class: AWSCDK::DynamoDB::TableGrantsProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::TableGrantsProps
- Defined in:
- dynamo_db/table_grants_props.rb
Overview
Construction properties for TableGrants.
Instance Attribute Summary collapse
-
#encrypted_resource ⇒ AWSCDK::IAM::IEncryptedResource?
readonly
deprecated
Deprecated.
- Leave this field undefined. If the table is encrypted with a customer-managed KMS key, appropriate grants to the key will be automatically added.
-
#has_index ⇒ Boolean?
readonly
Whether this table has indexes.
-
#policy_resource ⇒ AWSCDK::IAM::IResourceWithPolicyV2?
readonly
deprecated
Deprecated.
- Leave this field undefined. A best-effort attempt will be made to discover a resource policy and add permissions to it.
-
#regions ⇒ Array<String>?
readonly
Additional regions other than the main one that this table is replicated to.
-
#table ⇒ AWSCDK::Interfaces::AWSDynamodb::ITableRef
readonly
The table to grant permissions on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(table:, encrypted_resource: nil, has_index: nil, policy_resource: nil, regions: nil) ⇒ TableGrantsProps
constructor
A new instance of TableGrantsProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(table:, encrypted_resource: nil, has_index: nil, policy_resource: nil, regions: nil) ⇒ TableGrantsProps
Returns a new instance of TableGrantsProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'dynamo_db/table_grants_props.rb', line 12 def initialize(table:, encrypted_resource: nil, has_index: nil, policy_resource: nil, regions: nil) @table = table Jsii::Type.check_type(@table, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19keW5hbW9kYi5JVGFibGVSZWYifQ==")), "table") @encrypted_resource = encrypted_resource Jsii::Type.check_type(@encrypted_resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklFbmNyeXB0ZWRSZXNvdXJjZSJ9")), "encryptedResource") unless @encrypted_resource.nil? @has_index = has_index Jsii::Type.check_type(@has_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "hasIndex") unless @has_index.nil? @policy_resource = policy_resource Jsii::Type.check_type(@policy_resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSZXNvdXJjZVdpdGhQb2xpY3lWMiJ9")), "policyResource") unless @policy_resource.nil? @regions = regions Jsii::Type.check_type(@regions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regions") unless @regions.nil? end |
Instance Attribute Details
#encrypted_resource ⇒ AWSCDK::IAM::IEncryptedResource? (readonly)
- Leave this field undefined. If the table is encrypted with a customer-managed KMS key, appropriate grants to the key will be automatically added.
Default: - A best-effort attempt will be made to discover an associated KMS key and grant permissions to it.
The encrypted resource on which actions will be allowed.
34 35 36 |
# File 'dynamo_db/table_grants_props.rb', line 34 def encrypted_resource @encrypted_resource end |
#has_index ⇒ Boolean? (readonly)
Default: false
Whether this table has indexes.
If so, permissions are granted on all table indexes as well.
41 42 43 |
# File 'dynamo_db/table_grants_props.rb', line 41 def has_index @has_index end |
#policy_resource ⇒ AWSCDK::IAM::IResourceWithPolicyV2? (readonly)
- Leave this field undefined. A best-effort attempt will be made to discover a resource policy and add permissions to it.
Default: - A best-effort attempt will be made to discover a resource policy and add permissions to it.
The resource with policy on which actions will be allowed.
47 48 49 |
# File 'dynamo_db/table_grants_props.rb', line 47 def policy_resource @policy_resource end |
#regions ⇒ Array<String>? (readonly)
Default: - No regions
Additional regions other than the main one that this table is replicated to.
52 53 54 |
# File 'dynamo_db/table_grants_props.rb', line 52 def regions @regions end |
#table ⇒ AWSCDK::Interfaces::AWSDynamodb::ITableRef (readonly)
The table to grant permissions on.
28 29 30 |
# File 'dynamo_db/table_grants_props.rb', line 28 def table @table end |
Class Method Details
.jsii_properties ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'dynamo_db/table_grants_props.rb', line 54 def self.jsii_properties { :table => "table", :encrypted_resource => "encryptedResource", :has_index => "hasIndex", :policy_resource => "policyResource", :regions => "regions", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'dynamo_db/table_grants_props.rb', line 64 def to_jsii result = {} result.merge!({ "table" => @table, "encryptedResource" => @encrypted_resource, "hasIndex" => @has_index, "policyResource" => @policy_resource, "regions" => @regions, }) result.compact end |