Class: Convection::Model::Template::Resource::DynamoDBTable

Inherits:
Convection::Model::Template::Resource show all
Includes:
Mixin::Taggable
Defined in:
lib/convection/model/template/resource/aws_dynamodb_table.rb

Overview

AWS::DynamoDB::Table

Examples:

dynamodb_table 'TestTable' do
     #A attribute definitions { 'AttributeName' : String, 'AttributeType' : String }
     attribute_definitions  'AttributeName' => 'Name', 'AttributeType' => 'Type'
     #A key schema { 'AttributeName' : String, 'KeyType' : 'HASH or RANGE' }
     key_schema 'AttributeName' => 'Name', 'KeyType' => 'HASH'
     #Provisioned throughout hash { 'ReadCapacityUnits' : Number, 'WriteCapacityUnits' : Number }
     provisioned_throughput 'ReadCapacityUnits' => 100, 'WriteCapacityUnits' => 100
     #optional
     #A global seconday index { 'IndexName' : String, 'KeySchema' : [KeySchema, ... ],
     'Projection' : { Projection }, 'ProvisionedThroughput' : { ProvisionedThroughput }}
     global_secondary_indexes 'IndexName' => 'Name', 'KeySchema' => [{' AttributeName' => 'Name', 'KeyType' => 'HASH' }],
     'Projection' => { 'NonKeyAttributes' => [{ 'AttributeName' => 'Name2', 'AttributeType' => 'Type' }], 'ProjectionType'=>'Type' },
     'ProvisionedThroughput' =>{ 'ReadCapacityUnits' => 100, 'WriteCapacityUnits' => 100 }
     #A local secondary index { 'IndexName' : String, 'KeySchema' : [ KeySchema, ...], 'Projection' : { Projection }}
     local_secondary_indexes 'IndexName' => 'Name', 'KeySchema' => [{ 'AttributeName' => 'Name', 'KeyType' => 'HASH' }],
     'Projection' => {'NonKeyAttributes' =>[ {'AttributeName' => 'Name2', 'AttributeType' => 'Type'} ], 'ProjectionType'=>'Type' }
     #A point in time recovery specification { 'PointInTimeRecoveryEnabled' : Boolean}
     point_in_time_recovery_specification 'PointInTimeRecoveryEnabled' => true
     #A sse specification { 'SSEEnabled' : Boolean }
     sse_specification 'SSEEnabled' => false
     #A stream specification { 'StreamViewType' : String }
     stream_specification 'StreamViewType' => 'Type'
     table_name 'TableName'
     #A time to live specification { 'AttributeName' : String, 'Enabled' : Boolean }
     time_to_live_specification 'AttributeName' => 'Name', 'Enabled' => true
     tag 'Name', 'Test'
end

See Also:

Instance Attribute Summary

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods included from Mixin::Taggable

#immutable_metadata, #render_tags, #tag, #tags

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, property, #property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Template::Resource

#_terraform_module_dir_to_flag, #_terraform_module_flag_to_dir, attach_resource, attach_resource_collection, resource_collection_dsl_methods, resource_dsl_methods

Methods included from DSL::Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from DSL::IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select

Constructor Details

This class inherits a constructor from Convection::Model::Template::Resource

Instance Method Details

#attribute_definitions(value) ⇒ Object

required A attribute definitions : String, “AttributeType” : String type can be s for string, n for numeric, or b for binary data



47
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 47

property :attribute_definitions, 'AttributeDefinitions', :type => :list

#global_secondary_indexes(value) ⇒ Object

optional A global seconday index { “IndexName” : String, “KeySchema” : [KeySchema, … ], “Projection” : { Projection }, “ProvisionedThroughput” : { ProvisionedThroughput }}



55
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 55

property :global_secondary_indexes, 'GlobalSecondaryIndexes', :type => :list

#key_schema(value) ⇒ Object

A key schema : String, “KeyType” : “HASH or RANGE”



49
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 49

property :key_schema, 'KeySchema', :type => :list

#local_secondary_indexes(value) ⇒ Object

A local secondary index { “IndexName” : String, “KeySchema” : [ KeySchema, …], “Projection” : { Projection }}



57
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 57

property :local_secondary_indexes, 'LocalSecondaryIndexes', :type => :list

#point_in_time_recovery_specification(value) ⇒ Object

A point in time recovery specification { “PointInTimeRecoveryEnabled” : Boolean}



59
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 59

property :point_in_time_recovery_specification, 'PointInTimeRecoverySpecification'

#provisioned_throughput(value) ⇒ Object

Provisioned throughout hash : Number, “WriteCapacityUnits” : Number



51
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 51

property :provisioned_throughput, 'ProvisionedThroughput'

#render(*args) ⇒ Object



68
69
70
71
72
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 68

def render(*args)
  super.tap do |resource|
    render_tags(resource)
  end
end

#sse_specification(value) ⇒ Object

A sse specification { “SSEEnabled” : Boolean}



61
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 61

property :sse_specification, 'SSESpecification'

#stream_specification(value) ⇒ Object

A stream specification { “StreamViewType” : String}



63
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 63

property :stream_specification, 'StreamSpecification'

#table_nameObject #table_name(value) ⇒ Object

Overloads:

  • #table_nameObject

    Returns the value of the ‘TableName’ CloudFormation property.

  • #table_name(value) ⇒ Object

    Sets the ‘TableName’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘TableName’ CloudFormation property to.



64
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 64

property :table_name, 'TableName'

#time_to_live_specification(value) ⇒ Object

A time to live specification { “AttributeName” : String, “Enabled” : Boolean}



66
# File 'lib/convection/model/template/resource/aws_dynamodb_table.rb', line 66

property :time_to_live_specification, 'TimeToLiveSpecification'