Class: AWS::SimpleDB::DomainCollection
- Inherits:
-
Object
- Object
- AWS::SimpleDB::DomainCollection
- Includes:
- Core::Collection::WithLimitAndNextToken
- Defined in:
- lib/aws/simple_db/domain_collection.rb
Overview
An Enumerable collection representing all your domains in SimpleDB.
Use a DomainCollection to create, get and list domains.
Instance Method Summary collapse
-
#[](domain_name) ⇒ Domain
Returns a domain object with the given name.
-
#create(domain_name) ⇒ Domain
Creates a domain in SimpleDB and returns a domain object.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Instance Method Details
#[](domain_name) ⇒ Domain
Note:
This does not attempt to create the domain if it does not already exist in SimpleDB. Use #create to add a domain to SDB.
Returns a domain object with the given name.
64 65 66 |
# File 'lib/aws/simple_db/domain_collection.rb', line 64 def [] domain_name Domain.new(domain_name.to_s, :config => config) end |
#create(domain_name) ⇒ Domain
Note:
This operation might take 10 or more seconds to complete.
Note:
Creating a domain in SimpleDB is an idempotent operation; running it multiple times using the same domain name will not result in an error.
Note:
You can create up to 250 domains per account.
Creates a domain in SimpleDB and returns a domain object.
52 53 54 55 |
# File 'lib/aws/simple_db/domain_collection.rb', line 52 def create(domain_name) client.create_domain(:domain_name => domain_name) self[domain_name] end |