class Aws::DynamoDB::Resource

def batch_get_item(options = {})

Returns:
  • (Types::BatchGetItemOutput) -

Options Hash: (**options)
  • :return_consumed_capacity (String) --
  • :request_items (required, Hash) --

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def batch_get_item(options = {})
  resp = @client.batch_get_item(options)
  resp.data
end

def batch_write_item(options = {})

Returns:
  • (Types::BatchWriteItemOutput) -

Options Hash: (**options)
  • :return_item_collection_metrics (String) --
  • :return_consumed_capacity (String) --
  • :request_items (required, Hash) --

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def batch_write_item(options = {})
  resp = @client.batch_write_item(options)
  resp.data
end

def client

Returns:
  • (Client) -
def client
  @client
end

def create_table(options = {})

Returns:
  • (Table) -

Options Hash: (**options)
  • :sse_specification (Types::SSESpecification) --
  • :stream_specification (Types::StreamSpecification) --
  • :provisioned_throughput (Types::ProvisionedThroughput) --
  • :billing_mode (String) --
  • :global_secondary_indexes (Array) --
  • :local_secondary_indexes (Array) --
  • :key_schema (required, Array) --
  • :table_name (required, String) --
  • :attribute_definitions (required, Array) --

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def create_table(options = {})
  resp = @client.create_table(options)
  Table.new(
    name: resp.data.table_description.table_name,
    data: resp.data.table_description,
    client: @client
  )
end

def initialize(options = {})

Options Hash: (**options)
  • :client (Client) --

Parameters:
  • options ({}) --
def initialize(options = {})
  @client = options[:client] || Client.new(options)
end

def table(name)

Returns:
  • (Table) -

Parameters:
  • name (String) --
def table(name)
  Table.new(
    name: name,
    client: @client
  )
end

def tables(options = {})

Returns:
  • (Table::Collection) -

Parameters:
  • options (Hash) -- ({})

Other tags:
    Example: Request syntax with placeholder values -
def tables(options = {})
  batches = Enumerator.new do |y|
    resp = @client.list_tables(options)
    resp.each_page do |page|
      batch = []
      page.data.table_names.each do |t|
        batch << Table.new(
          name: t,
          client: @client
        )
      end
      y.yield(batch)
    end
  end
  Table::Collection.new(batches)
end