Method: Stax::Cmd::DynamoDB#lsi

Defined in:
lib/stax/mixin/dynamodb.rb

#lsi(id) ⇒ Object



62
63
64
65
66
67
68
# File 'lib/stax/mixin/dynamodb.rb', line 62

def lsi(id)
  print_table Aws::DynamoDB.lsi(my.resource(id)).map { |i|
    hash  = i.key_schema.find{ |k| k.key_type == 'HASH' }&.attribute_name
    range = i.key_schema.find{ |k| k.key_type == 'RANGE' }&.attribute_name
    [i.index_name, hash, range, i.projection.projection_type, i.index_size_bytes, i.item_count]
  }.sort
end