Class | Fog::AWS::SimpleDB::Real

In:

lib/fog/aws/requests/simpledb/batch_put_attributes.rb
lib/fog/aws/requests/simpledb/create_domain.rb
lib/fog/aws/requests/simpledb/delete_attributes.rb
lib/fog/aws/requests/simpledb/delete_domain.rb
lib/fog/aws/requests/simpledb/domain_metadata.rb
lib/fog/aws/requests/simpledb/get_attributes.rb
lib/fog/aws/requests/simpledb/list_domains.rb
lib/fog/aws/requests/simpledb/put_attributes.rb
lib/fog/aws/requests/simpledb/select.rb
lib/fog/aws/simpledb.rb

Parent: | Object

### Methods

batch_put_attributes create_domain delete_attributes delete_domain domain_metadata get_attributes list_domains new put_attributes select

### Included Modules

Fog::AWS::CredentialFetcher::ConnectionMethods

### Public Class methods

new(options={})

Initialize connection to SimpleDB

#### Notes

options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection

#### Examples

      sdb = SimpleDB.new(
        :aws_access_key_id => your_aws_access_key_id,
        :aws_secret_access_key => your_aws_secret_access_key
      )

#### Parameters

- options<~Hash> - config arguments for connection. Defaults to {}.

#### Returns

- SimpleDB object with connection to aws.

### Public Instance methods

batch_put_attributes(domain_name, items, replace_attributes = Hash.new([]))

Put items attributes into a SimpleDB domain

#### Parameters

- domain_name<~String> - Name of domain. Must be between 3 and 255 of the following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.
- items<~Hash> - Keys are the items names and may use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Can be up to 1024 bytes long. Values are the attributes to add to the given item and may use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Each name and value can be up to 1024 bytes long.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘RequestId‘

create_domain(domain_name)

Create a SimpleDB domain

#### Parameters

- domain_name<~String>:: Name of domain. Must be between 3 and 255 of the

following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘RequestId‘

delete_attributes(domain_name, item_name, attributes = nil)

List metadata for SimpleDB domain

#### Parameters

- domain_name<~String> - Name of domain. Must be between 3 and 255 of the following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.
- item_name<~String> - Name of the item. May use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Can be up to 1024 bytes long.
- attributes<~Hash> - Name/value pairs to remove from the item. Defaults to nil, which will delete the entire item. Attribute names and values may use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Each name and value can be up to 1024 bytes long.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘RequestId‘

delete_domain(domain_name)

Delete a SimpleDB domain

#### Parameters

- domain_name<~String>:: Name of domain. Must be between 3 and 255 of the

following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘RequestId‘

domain_metadata(domain_name)

List metadata for SimpleDB domain

#### Parameters

- domain_name<~String> - Name of domain. Must be between 3 and 255 of the

following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘AttributeNameCount’ - number of unique attribute names in domain
    - ‘AttributeNamesSizeBytes’ - total size of unique attribute names, in bytes
    - ‘AttributeValueCount’ - number of all name/value pairs in domain
    - ‘AttributeValuesSizeBytes’ - total size of attributes, in bytes
    - ‘BoxUsage‘
    - ‘ItemCount’ - number of items in domain
    - ‘ItemNameSizeBytes’ - total size of item names in domain, in bytes
    - ‘RequestId‘
    - ‘Timestamp’ - last update time for metadata.

get_attributes(domain_name, item_name, options = {})

List metadata for SimpleDB domain

#### Parameters

- domain_name<~String> - Name of domain. Must be between 3 and 255 of the following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.
- item_name<~String> - Name of the item. May use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Can be up to 1024 bytes long.
- options<~Hash>:
  - AttributeName<~Array> - Attributes to return from the item. Defaults to {}, which will return all attributes. Attribute names and values may use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Each name and value can be up to 1024 bytes long.

       * ConsistentRead<~Boolean> - When set to true, ensures most recent data is returned. Defaults to false.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘Attributes’ - list of attribute name/values for the item
    - ‘BoxUsage‘
    - ‘RequestId‘

list_domains(options = {})

List SimpleDB domains

#### Parameters

- options<~Hash> - options, defaults to {}
  - ‘MaxNumberOfDomains’<~Integer> - number of domains to return between 1 and 100, defaults to 100
  - ‘NextToken’<~String> - Offset token to start listing, defaults to nil

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘Domains’ - array of domain names.
    - ‘NextToken’ - offset to start with if there are are more domains to list
    - ‘RequestId‘

put_attributes(domain_name, item_name, attributes, options = {})

Put item attributes into a SimpleDB domain

#### Parameters

- domain_name<~String> - Name of domain. Must be between 3 and 255 of the

following characters: a-z, A-Z, 0-9, ‘_’, ’-’ and ’.’.

- item_name<~String> - Name of the item. May use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Can be up to 1024 bytes long.
- attributes<~Hash> - Name/value pairs to add to the item. Attribute names and values may use any UTF-8 characters valid in xml. Control characters and sequences not allowed in xml are not valid. Each name and value can be up to 1024 bytes long.
- options<~Hash> - Accepts the following keys. :replace => [Array of keys to replace] :expect => {name/value pairs for performing conditional put}

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage‘
    - ‘RequestId‘

select(select_expression, options = {})

Select item data from SimpleDB

#### Parameters

- select_expression<~String> - Expression to query domain with.
- options<~Hash>:
  - ConsistentRead<~Boolean> - When set to true, ensures most recent data is returned. Defaults to false.
  - NextToken<~String> - Offset token to start list, defaults to nil.

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘BoxUsage’<~Float>
    - ‘RequestId’<~String>
    - ‘Items’<~Hash> - list of attribute name/values for the items formatted as { ‘item_name’ => { ‘attribute_name’ => [‘attribute_value’] }}
    - ‘NextToken’<~String> - offset to start with if there are are more domains to list

[Validate]