Sha256: c7a5dd6bcfc4013444f2bb8c122fae51622b9d7740cb69dace603223c6713afd

Contents?: true

Size: 1.51 KB

Versions: 9

Compression:

Stored size: 1.51 KB

Contents

module Fog
  module AWS
    class DynamoDB
      class Real

        # Get DynamoDB items
        #
        # ==== Parameters
        # * 'request_items'<~Hash>:
        #   * 'table_name'<~Hash>:
        #     * 'Keys'<~Array>: array of keys
        #       * 'HashKeyElement'<~Hash>: info for primary key
        #         * 'AttributeType'<~String> - type of attribute
        #         * 'AttributeName'<~String> - name of attribute
        #       * 'RangeKeyElement'<~Hash>: optional, info for range key
        #         * 'AttributeType'<~String> - type of attribute
        #         * 'AttributeName'<~String> - name of attribute
        #     * 'AttributesToGet'<~Array> - optional attributes to return, defaults to all
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'Responses'<~Hash>:
        #       * 'table_name'<~Hash>:
        #         * 'Items'<~Array> - Matching items
        #         * 'ConsumedCapacityUnits'<~Float> - Capacity units used in read
        #     * 'UnprocessedKeys':<~Hash> - tables and keys in excess of per request limit, pass this to subsequent batch get for pseudo-pagination
        def batch_get_item(request_items)
          body = {
            'RequestItems' => request_items
          }

          request(
            :body       => MultiJson.encode(body),
            :headers    => {'x-amz-target' => 'DynamoDB_20111205.BatchGetItem'},
            :idempotent => true
          )
        end

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 5 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dynamodb/batch_get_item.rb
michiels-fog-1.3.1 lib/fog/aws/requests/dynamodb/batch_get_item.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/requests/dynamodb/batch_get_item.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dynamodb/batch_get_item.rb
fog-1.3.1 lib/fog/aws/requests/dynamodb/batch_get_item.rb
fog-1.3.0 lib/fog/aws/requests/dynamodb/batch_get_item.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dynamodb/batch_get_item.rb
fog-1.2.0 lib/fog/aws/requests/dynamodb/batch_get_item.rb
ktheory-fog-1.1.2 lib/fog/aws/requests/dynamodb/batch_get_item.rb