Class: AWS::SimpleDB::Client

Inherits:
Core::QueryClient show all
Defined in:
lib/aws/simple_db/client.rb

Overview

Client class for Amazon SimpleDB.

Instance Attribute Summary

Attributes inherited from Core::Client

#config, #http_read_timeout

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Client

#initialize, #log_warning, #operations, operations, #with_http_handler, #with_options

Constructor Details

This class inherits a constructor from AWS::Core::Client

Class Method Details

.valid_domain_name?(name) ⇒ Boolean

Returns true if the given name is a valid Amazon SimpleDB domain name.

Parameters:

  • name (String)

Returns:

  • (Boolean)

    Returns true if the given name is a valid Amazon SimpleDB domain name.



51
52
53
# File 'lib/aws/simple_db/client.rb', line 51

def self.valid_domain_name? name
  name.to_s =~ /^[a-z_\-\.]{3,255}$/i ? true : false
end

Instance Method Details

#batch_delete_attributes(options = {}) ⇒ Core::Response

Calls the BatchDeleteAttributes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain in which the attributes are being deleted.

    • :items - required - (Array<Hash>) A list of items on which to perform the operation.

      • :name - required - (String)

      • :attributes - (Array<Hash>)

        • :name - required - (String) The name of the attribute.

        • :value - required - (String) The value of the attribute.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 57

#batch_put_attributes(options = {}) ⇒ Core::Response

Calls the BatchPutAttributes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain in which the attributes are being stored.

    • :items - required - (Array<Hash>) A list of items on which to perform the operation.

      • :name - required - (String) The name of the replaceable item.

      • :attributes - required - (Array<Hash>) The list of attributes for a replaceable item.

        • :name - required - (String) The name of the replaceable attribute.

        • :value - required - (String) The value of the replaceable attribute.

        • :replace - (Boolean) A flag specifying whether or not to replace the attribute/value pair or to add a new attribute/value pair. The default setting is false .

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 75

#create_domain(options = {}) ⇒ Core::Response

Calls the CreateDomain API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain to create. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, ‘_’, ‘-’, and ‘.’.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 99

#delete_attributes(options = {}) ⇒ Core::Response

Calls the DeleteAttributes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain in which to perform the operation.

    • :item_name - required - (String) The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

    • :attributes - (Array<Hash>) A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

      • :name - required - (String) The name of the attribute.

      • :value - (String) The value of the attribute.

    • :expected - (Hash) The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.

      • :name - (String) The name of the attribute involved in the condition.

      • :value - (String) The value of an attribute. This value can only be specified when the Exists parameter is equal to true .

      • :exists - (Boolean) A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied. Specify true if the attribute must exist for the update condition to be satisfied. Specify false if the attribute should not exist in order for the update condition to be satisfied.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 112

#delete_domain(options = {}) ⇒ Core::Response

Calls the DeleteDomain API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain to delete.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 146

#domain_metadata(options = {}) ⇒ Core::Response

Calls the DomainMetadata API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain for which to display the metadata of.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :item_count - (Integer)

    • :item_names_size_bytes - (Integer)

    • :attribute_name_count - (Integer)

    • :attribute_names_size_bytes - (Integer)

    • :attribute_value_count - (Integer)

    • :attribute_values_size_bytes - (Integer)

    • :timestamp - (Integer)

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 158

#get_attributes(options = {}) ⇒ Core::Response

Calls the GetAttributes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain in which to perform the operation.

    • :item_name - required - (String) The name of the item.

    • :attribute_names - (Array<String>) The names of the attributes.

    • :consistent_read - (Boolean) Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true , any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :attributes - (Array<Hash>)

      • :name - (String)

      • :alternate_name_encoding - (String)

      • :value - (String)

      • :alternate_value_encoding - (String)

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 177

#list_domains(options = {}) ⇒ Core::Response

Calls the ListDomains API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :max_number_of_domains - (Integer) The maximum number of domain names you want returned. The range is 1 to 100. The default setting is 100.

    • :next_token - (String) A string informing Amazon SimpleDB where to start the next list of domain names.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :domain_names - (Array<String>)

    • :next_token - (String)

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 201

#put_attributes(options = {}) ⇒ Core::Response

Calls the PutAttributes API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String) The name of the domain in which to perform the operation.

    • :item_name - required - (String) The name of the item.

    • :attributes - required - (Array<Hash>) The list of attributes.

      • :name - required - (String) The name of the replaceable attribute.

      • :value - required - (String) The value of the replaceable attribute.

      • :replace - (Boolean) A flag specifying whether or not to replace the attribute/value pair or to add a new attribute/value pair. The default setting is false .

    • :expected - (Hash) The update condition which, if specified, determines whether the specified attributes will be updated or not. The update condition must be satisfied in order for this request to be processed and the attributes to be updated.

      • :name - (String) The name of the attribute involved in the condition.

      • :value - (String) The value of an attribute. This value can only be specified when the Exists parameter is equal to true .

      • :exists - (Boolean) A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied. Specify true if the attribute must exist for the update condition to be satisfied. Specify false if the attribute should not exist in order for the update condition to be satisfied.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 218

#select(options = {}) ⇒ Core::Response

Calls the Select API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :select_expression - required - (String) The expression used to query the domain.

    • :next_token - (String) A string informing Amazon SimpleDB where to start the next list of ItemNames.

    • :consistent_read - (Boolean) Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true , any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :items - (Array<Hash>)

      • :name - (String)

      • :alternate_name_encoding - (String)

      • :attributes - (Array<Hash>)

        • :name - (String)

        • :alternate_name_encoding - (String)

        • :value - (String)

        • :alternate_value_encoding - (String)

    • :next_token - (String)

    • :response_metadata - (Hash)

      • :box_usage - (Numeric)

      • :response_id - (String)



# File 'lib/aws/simple_db/client.rb', line 253