Class: AWSCDK::DynamoDB::ReplicaGlobalSecondaryIndexOptions

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

Overview

Options used to configure global secondary indexes on a replica table.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(contributor_insights: nil, contributor_insights_specification: nil, max_read_request_units: nil, read_capacity: nil) ⇒ ReplicaGlobalSecondaryIndexOptions

Returns a new instance of ReplicaGlobalSecondaryIndexOptions.

Parameters:

  • contributor_insights (Boolean, nil) (defaults to: nil)

    Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.

  • contributor_insights_specification (AWSCDK::DynamoDB::ContributorInsightsSpecification, nil) (defaults to: nil)

    Whether CloudWatch contributor insights is enabled and what mode is selected for a specific global secondary index on a replica table.

  • max_read_request_units (Numeric, nil) (defaults to: nil)

    The maximum read request units for a specific global secondary index on a replica table.

  • read_capacity (AWSCDK::DynamoDB::Capacity, nil) (defaults to: nil)

    The read capacity for a specific global secondary index on a replica table.



11
12
13
14
15
16
17
18
19
20
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 11

def initialize(contributor_insights: nil, contributor_insights_specification: nil, max_read_request_units: nil, read_capacity: nil)
  @contributor_insights = contributor_insights
  Jsii::Type.check_type(@contributor_insights, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "contributorInsights") unless @contributor_insights.nil?
  @contributor_insights_specification = contributor_insights_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::ContributorInsightsSpecification.new(**contributor_insights_specification.transform_keys(&:to_sym)) : contributor_insights_specification
  Jsii::Type.check_type(@contributor_insights_specification, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQ29udHJpYnV0b3JJbnNpZ2h0c1NwZWNpZmljYXRpb24ifQ==")), "contributorInsightsSpecification") unless @contributor_insights_specification.nil?
  @max_read_request_units = max_read_request_units
  Jsii::Type.check_type(@max_read_request_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxReadRequestUnits") unless @max_read_request_units.nil?
  @read_capacity = read_capacity
  Jsii::Type.check_type(@read_capacity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQ2FwYWNpdHkifQ==")), "readCapacity") unless @read_capacity.nil?
end

Instance Attribute Details

#contributor_insightsBoolean? (readonly)

Deprecated.

use contributorInsightsSpecification instead

Note:

Default: - inherited from the primary table

Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.

Returns:

  • (Boolean, nil)


27
28
29
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 27

def contributor_insights
  @contributor_insights
end

#contributor_insights_specificationAWSCDK::DynamoDB::ContributorInsightsSpecification? (readonly)

Note:

Default: - contributor insights is not enabled

Whether CloudWatch contributor insights is enabled and what mode is selected for a specific global secondary index on a replica table.



32
33
34
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 32

def contributor_insights_specification
  @contributor_insights_specification
end

#max_read_request_unitsNumeric? (readonly)

Note:

Default: - inherited from the primary table

The maximum read request units for a specific global secondary index on a replica table.

Note: This can only be configured if primary table billing is PAY_PER_REQUEST.

Returns:

  • (Numeric, nil)


39
40
41
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 39

def max_read_request_units
  @max_read_request_units
end

#read_capacityAWSCDK::DynamoDB::Capacity? (readonly)

Note:

Default: - inherited from the primary table

The read capacity for a specific global secondary index on a replica table.

Note: This can only be configured if primary table billing is provisioned.

Returns:



46
47
48
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 46

def read_capacity
  @read_capacity
end

Class Method Details

.jsii_propertiesObject



48
49
50
51
52
53
54
55
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 48

def self.jsii_properties
  {
    :contributor_insights => "contributorInsights",
    :contributor_insights_specification => "contributorInsightsSpecification",
    :max_read_request_units => "maxReadRequestUnits",
    :read_capacity => "readCapacity",
  }
end

Instance Method Details

#to_jsiiObject



57
58
59
60
61
62
63
64
65
66
# File 'dynamo_db/replica_global_secondary_index_options.rb', line 57

def to_jsii
  result = {}
  result.merge!({
    "contributorInsights" => @contributor_insights,
    "contributorInsightsSpecification" => @contributor_insights_specification,
    "maxReadRequestUnits" => @max_read_request_units,
    "readCapacity" => @read_capacity,
  })
  result.compact
end