Class: AWS::SimpleDB::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- AWS::SimpleDB::Client
- Extended by:
- Core::Client::QueryXML
- Defined in:
- lib/aws/simple_db/client.rb
Overview
Client class for Amazon SimpleDB.
Constant Summary collapse
- API_VERSION =
'2009-04-15'
- REGION_US_E1 =
'sdb.amazonaws.com'
- REGION_US_W1 =
'sdb.us-west-1.amazonaws.com'
- REGION_EU_W1 =
'sdb.eu-west-1.amazonaws.com'
- REGION_APAC_SE1 =
'sdb.ap-southeast-1.amazonaws.com'
- CACHEABLE_REQUESTS =
Set[ :domain_metadata, :get_attributes, :list_domains, :select, ]
Instance Attribute Summary
Attributes inherited from Core::Client
#config, #endpoint, #port, #service_ruby_name, #signer
Class Method Summary collapse
-
.valid_domain_name?(name) ⇒ Boolean
Returns true if the given name is a valid Amazon SimpleDB domain name.
Instance Method Summary collapse
-
#batch_delete_attributes(options = {}) ⇒ Core::Response
Calls the BatchDeleteAttributes API operation.
-
#batch_put_attributes(options = {}) ⇒ Core::Response
Calls the BatchPutAttributes API operation.
-
#create_domain(options = {}) ⇒ Core::Response
Calls the CreateDomain API operation.
-
#delete_attributes(options = {}) ⇒ Core::Response
Calls the DeleteAttributes API operation.
-
#delete_domain(options = {}) ⇒ Core::Response
Calls the DeleteDomain API operation.
-
#domain_metadata(options = {}) ⇒ Core::Response
Calls the DomainMetadata API operation.
-
#get_attributes(options = {}) ⇒ Core::Response
Calls the GetAttributes API operation.
-
#list_domains(options = {}) ⇒ Core::Response
Calls the ListDomains API operation.
-
#put_attributes(options = {}) ⇒ Core::Response
Calls the PutAttributes API operation.
-
#select(options = {}) ⇒ Core::Response
Calls the Select API operation.
-
#valid_domain_name?(name) ⇒ Boolean
Returns true if the given name is a valid Amazon SimpleDB domain name.
Methods included from Core::Client::QueryXML
extended, option_parsers, xml_parsers
Methods inherited from Core::Client
#initialize, #new_stub_for, #operations, #stub_for, #with_config, #with_http_handler, #with_options
Methods included from Core::Naming
#service_name, #service_ruby_name
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.
55 56 57 |
# File 'lib/aws/simple_db/client.rb', line 55 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.
Options:
-
: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.
-
-
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
83 |
# File 'lib/aws/simple_db/client.rb', line 83 define_client_method :batch_delete_attributes, 'BatchDeleteAttributes' |
#batch_put_attributes(options = {}) ⇒ Core::Response
Calls the BatchPutAttributes API operation.
Options:
-
: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 isfalse
.
-
-
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
113 |
# File 'lib/aws/simple_db/client.rb', line 113 define_client_method :batch_put_attributes, 'BatchPutAttributes' |
#create_domain(options = {}) ⇒ Core::Response
Calls the CreateDomain API operation.
Options:
-
: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 ‘.’.
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
132 |
# File 'lib/aws/simple_db/client.rb', line 132 define_client_method :create_domain, 'CreateDomain' |
#delete_attributes(options = {}) ⇒ Core::Response
Calls the DeleteAttributes API operation.
Options:
-
: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 totrue
. -
: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. Specifytrue
if the attribute must exist for the update condition to be satisfied. Specifyfalse
if the attribute should not exist in order for the update condition to be satisfied.
-
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
172 |
# File 'lib/aws/simple_db/client.rb', line 172 define_client_method :delete_attributes, 'DeleteAttributes' |
#delete_domain(options = {}) ⇒ Core::Response
Calls the DeleteDomain API operation.
Options:
-
:domain_name
- required - (String) The name of the domain to delete.
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
190 |
# File 'lib/aws/simple_db/client.rb', line 190 define_client_method :delete_domain, 'DeleteDomain' |
#domain_metadata(options = {}) ⇒ Core::Response
Calls the DomainMetadata API operation.
Options:
-
:domain_name
- required - (String) The name of the domain for which to display the metadata of.
Response 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)
-
215 |
# File 'lib/aws/simple_db/client.rb', line 215 define_client_method :domain_metadata, 'DomainMetadata' |
#get_attributes(options = {}) ⇒ Core::Response
Calls the GetAttributes API operation.
Options:
-
: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. Iftrue
, 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.
Response 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)
-
245 |
# File 'lib/aws/simple_db/client.rb', line 245 define_client_method :get_attributes, 'GetAttributes' |
#list_domains(options = {}) ⇒ Core::Response
Calls the ListDomains API operation.
Options:
-
: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.
Response Structure:
-
:domain_names
- (Array<String>) -
:next_token
- (String) -
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
268 |
# File 'lib/aws/simple_db/client.rb', line 268 define_client_method :list_domains, 'ListDomains' |
#put_attributes(options = {}) ⇒ Core::Response
Calls the PutAttributes API operation.
Options:
-
: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 isfalse
.
-
-
: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 totrue
. -
: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. Specifytrue
if the attribute must exist for the update condition to be satisfied. Specifyfalse
if the attribute should not exist in order for the update condition to be satisfied.
-
Response Structure:
-
:response_metadata
- (Hash)-
:box_usage
- (Numeric) -
:response_id
- (String)
-
309 |
# File 'lib/aws/simple_db/client.rb', line 309 define_client_method :put_attributes, 'PutAttributes' |
#select(options = {}) ⇒ Core::Response
Calls the Select API operation.
Options:
-
: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. Iftrue
, 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.
Response 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)
-
343 |
# File 'lib/aws/simple_db/client.rb', line 343 define_client_method :select, 'Select' |
#valid_domain_name?(name) ⇒ Boolean
Returns true if the given name is a valid Amazon SimpleDB domain name.
48 49 50 |
# File 'lib/aws/simple_db/client.rb', line 48 def valid_domain_name? name self.class.valid_domain_name?(name) end |