Class: AWS::RDS::DBInstanceCollection
- Inherits:
-
Object
- Object
- AWS::RDS::DBInstanceCollection
- Includes:
- Core::Collection::WithLimitAndNextToken
- Defined in:
- lib/aws/rds/db_instance_collection.rb
Instance Method Summary collapse
-
#[](db_instance_id) ⇒ DBInstance
Returns a DBInstance with the given ID.
-
#create(db_instance_id, options = {}) ⇒ DBInstance
Creates a database instance.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Instance Method Details
#[](db_instance_id) ⇒ DBInstance
Returns a AWS::RDS::DBInstance with the given ID.
27 28 29 |
# File 'lib/aws/rds/db_instance_collection.rb', line 27 def [] db_instance_id DBInstance.new(db_instance_id.to_s.downcase, :config => config) end |
#create(db_instance_id, options = {}) ⇒ DBInstance
Creates a database instance. See Client#create_db_instance for documentation on the accepted (and required) options.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/aws/rds/db_instance_collection.rb', line 38 def create db_instance_id, = {} [:db_instance_identifier] = db_instance_id resp = client.create_db_instance() DBInstance.new_from(:create_db_instance, resp, resp[:db_instance_identifier], :config => config) end |