Class: AWSCDK::DynamoDB::CfnGlobalTable::ReplicaSpecificationProperty

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

Overview

Defines settings specific to a single replica of a global table.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(region:, contributor_insights_specification: nil, deletion_protection_enabled: nil, global_secondary_indexes: nil, global_table_settings_replication_mode: nil, kinesis_stream_specification: nil, point_in_time_recovery_specification: nil, read_on_demand_throughput_settings: nil, read_provisioned_throughput_settings: nil, replica_stream_specification: nil, resource_policy: nil, sse_specification: nil, table_class: nil, tags: nil) ⇒ ReplicaSpecificationProperty

Returns a new instance of ReplicaSpecificationProperty.

Parameters:



1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
# File 'dynamo_db/cfn_global_table.rb', line 1610

def initialize(region:, contributor_insights_specification: nil, deletion_protection_enabled: nil, global_secondary_indexes: nil, global_table_settings_replication_mode: nil, kinesis_stream_specification: nil, point_in_time_recovery_specification: nil, read_on_demand_throughput_settings: nil, read_provisioned_throughput_settings: nil, replica_stream_specification: nil, resource_policy: nil, sse_specification: nil, table_class: nil, tags: nil)
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region")
  @contributor_insights_specification = contributor_insights_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ContributorInsightsSpecificationProperty.new(**contributor_insights_specification.transform_keys(&:to_sym)) : contributor_insights_specification
  Jsii::Type.check_type(@contributor_insights_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5Db250cmlidXRvckluc2lnaHRzU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "contributorInsightsSpecification") unless @contributor_insights_specification.nil?
  @deletion_protection_enabled = deletion_protection_enabled
  Jsii::Type.check_type(@deletion_protection_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deletionProtectionEnabled") unless @deletion_protection_enabled.nil?
  @global_secondary_indexes = global_secondary_indexes
  Jsii::Type.check_type(@global_secondary_indexes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQ2ZuR2xvYmFsVGFibGUuUmVwbGljYUdsb2JhbFNlY29uZGFyeUluZGV4U3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "globalSecondaryIndexes") unless @global_secondary_indexes.nil?
  @global_table_settings_replication_mode = global_table_settings_replication_mode
  Jsii::Type.check_type(@global_table_settings_replication_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "globalTableSettingsReplicationMode") unless @global_table_settings_replication_mode.nil?
  @kinesis_stream_specification = kinesis_stream_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::KinesisStreamSpecificationProperty.new(**kinesis_stream_specification.transform_keys(&:to_sym)) : kinesis_stream_specification
  Jsii::Type.check_type(@kinesis_stream_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5LaW5lc2lzU3RyZWFtU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "kinesisStreamSpecification") unless @kinesis_stream_specification.nil?
  @point_in_time_recovery_specification = point_in_time_recovery_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::PointInTimeRecoverySpecificationProperty.new(**point_in_time_recovery_specification.transform_keys(&:to_sym)) : point_in_time_recovery_specification
  Jsii::Type.check_type(@point_in_time_recovery_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5Qb2ludEluVGltZVJlY292ZXJ5U3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "pointInTimeRecoverySpecification") unless @point_in_time_recovery_specification.nil?
  @read_on_demand_throughput_settings = read_on_demand_throughput_settings.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ReadOnDemandThroughputSettingsProperty.new(**read_on_demand_throughput_settings.transform_keys(&:to_sym)) : read_on_demand_throughput_settings
  Jsii::Type.check_type(@read_on_demand_throughput_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5SZWFkT25EZW1hbmRUaHJvdWdocHV0U2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "readOnDemandThroughputSettings") unless @read_on_demand_throughput_settings.nil?
  @read_provisioned_throughput_settings = read_provisioned_throughput_settings.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ReadProvisionedThroughputSettingsProperty.new(**read_provisioned_throughput_settings.transform_keys(&:to_sym)) : read_provisioned_throughput_settings
  Jsii::Type.check_type(@read_provisioned_throughput_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5SZWFkUHJvdmlzaW9uZWRUaHJvdWdocHV0U2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "readProvisionedThroughputSettings") unless @read_provisioned_throughput_settings.nil?
  @replica_stream_specification = replica_stream_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ReplicaStreamSpecificationProperty.new(**replica_stream_specification.transform_keys(&:to_sym)) : replica_stream_specification
  Jsii::Type.check_type(@replica_stream_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5SZXBsaWNhU3RyZWFtU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "replicaStreamSpecification") unless @replica_stream_specification.nil?
  @resource_policy = resource_policy.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ResourcePolicyProperty.new(**resource_policy.transform_keys(&:to_sym)) : resource_policy
  Jsii::Type.check_type(@resource_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5SZXNvdXJjZVBvbGljeVByb3BlcnR5In1dfX0=")), "resourcePolicy") unless @resource_policy.nil?
  @sse_specification = sse_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::CfnGlobalTable::ReplicaSSESpecificationProperty.new(**sse_specification.transform_keys(&:to_sym)) : sse_specification
  Jsii::Type.check_type(@sse_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19keW5hbW9kYi5DZm5HbG9iYWxUYWJsZS5SZXBsaWNhU1NFU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "sseSpecification") unless @sse_specification.nil?
  @table_class = table_class
  Jsii::Type.check_type(@table_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableClass") unless @table_class.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#contributor_insights_specificationAWSCDK::IResolvable, ... (readonly)

The settings used to enable or disable CloudWatch Contributor Insights for the specified replica.

When not specified, defaults to contributor insights disabled for the replica.



1652
1653
1654
# File 'dynamo_db/cfn_global_table.rb', line 1652

def contributor_insights_specification
  @contributor_insights_specification
end

#deletion_protection_enabledBoolean, ... (readonly)

Determines if a replica is protected from deletion.

When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .



1659
1660
1661
# File 'dynamo_db/cfn_global_table.rb', line 1659

def deletion_protection_enabled
  @deletion_protection_enabled
end

#global_secondary_indexesAWSCDK::IResolvable, ... (readonly)

Defines additional settings for the global secondary indexes of this replica.



1664
1665
1666
# File 'dynamo_db/cfn_global_table.rb', line 1664

def global_secondary_indexes
  @global_secondary_indexes
end

#global_table_settings_replication_modeString? (readonly)



1667
1668
1669
# File 'dynamo_db/cfn_global_table.rb', line 1667

def global_table_settings_replication_mode
  @global_table_settings_replication_mode
end

#kinesis_stream_specificationAWSCDK::IResolvable, ... (readonly)

Defines the Kinesis Data Streams configuration for the specified replica.



1672
1673
1674
# File 'dynamo_db/cfn_global_table.rb', line 1672

def kinesis_stream_specification
  @kinesis_stream_specification
end

#point_in_time_recovery_specificationAWSCDK::IResolvable, ... (readonly)

The settings used to enable point in time recovery.

When not specified, defaults to point in time recovery disabled for the replica.



1679
1680
1681
# File 'dynamo_db/cfn_global_table.rb', line 1679

def point_in_time_recovery_specification
  @point_in_time_recovery_specification
end

#read_on_demand_throughput_settingsAWSCDK::IResolvable, ... (readonly)

Sets read request settings for the replica table.



1684
1685
1686
# File 'dynamo_db/cfn_global_table.rb', line 1684

def read_on_demand_throughput_settings
  @read_on_demand_throughput_settings
end

#read_provisioned_throughput_settingsAWSCDK::IResolvable, ... (readonly)

Defines read capacity settings for the replica table.



1689
1690
1691
# File 'dynamo_db/cfn_global_table.rb', line 1689

def read_provisioned_throughput_settings
  @read_provisioned_throughput_settings
end

#regionString (readonly)

The region in which this replica exists.



1645
1646
1647
# File 'dynamo_db/cfn_global_table.rb', line 1645

def region
  @region
end

#replica_stream_specificationAWSCDK::IResolvable, ... (readonly)

Represents the DynamoDB Streams configuration for a global table replica.



1694
1695
1696
# File 'dynamo_db/cfn_global_table.rb', line 1694

def replica_stream_specification
  @replica_stream_specification
end

#resource_policyAWSCDK::IResolvable, ... (readonly)

A resource-based policy document that contains permissions to add to the specified replica of a DynamoDB global table.

Resource-based policies let you define access permissions by specifying who has access to each resource, and the actions they are allowed to perform on each resource.

In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .



1703
1704
1705
# File 'dynamo_db/cfn_global_table.rb', line 1703

def resource_policy
  @resource_policy
end

#sse_specificationAWSCDK::IResolvable, ... (readonly)

Allows you to specify a customer-managed key for the replica.

When using customer-managed keys for server-side encryption, this property must have a value in all replicas.



1710
1711
1712
# File 'dynamo_db/cfn_global_table.rb', line 1710

def sse_specification
  @sse_specification
end

#table_classString? (readonly)

The table class of the specified table.

Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .



1717
1718
1719
# File 'dynamo_db/cfn_global_table.rb', line 1717

def table_class
  @table_class
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this replica.

For more information, see Tag .



1724
1725
1726
# File 'dynamo_db/cfn_global_table.rb', line 1724

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
# File 'dynamo_db/cfn_global_table.rb', line 1726

def self.jsii_properties
  {
    :region => "region",
    :contributor_insights_specification => "contributorInsightsSpecification",
    :deletion_protection_enabled => "deletionProtectionEnabled",
    :global_secondary_indexes => "globalSecondaryIndexes",
    :global_table_settings_replication_mode => "globalTableSettingsReplicationMode",
    :kinesis_stream_specification => "kinesisStreamSpecification",
    :point_in_time_recovery_specification => "pointInTimeRecoverySpecification",
    :read_on_demand_throughput_settings => "readOnDemandThroughputSettings",
    :read_provisioned_throughput_settings => "readProvisionedThroughputSettings",
    :replica_stream_specification => "replicaStreamSpecification",
    :resource_policy => "resourcePolicy",
    :sse_specification => "sseSpecification",
    :table_class => "tableClass",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
# File 'dynamo_db/cfn_global_table.rb', line 1745

def to_jsii
  result = {}
  result.merge!({
    "region" => @region,
    "contributorInsightsSpecification" => @contributor_insights_specification,
    "deletionProtectionEnabled" => @deletion_protection_enabled,
    "globalSecondaryIndexes" => @global_secondary_indexes,
    "globalTableSettingsReplicationMode" => @global_table_settings_replication_mode,
    "kinesisStreamSpecification" => @kinesis_stream_specification,
    "pointInTimeRecoverySpecification" => @point_in_time_recovery_specification,
    "readOnDemandThroughputSettings" => @read_on_demand_throughput_settings,
    "readProvisionedThroughputSettings" => @read_provisioned_throughput_settings,
    "replicaStreamSpecification" => @replica_stream_specification,
    "resourcePolicy" => @resource_policy,
    "sseSpecification" => @sse_specification,
    "tableClass" => @table_class,
    "tags" => @tags,
  })
  result.compact
end