Class: AWS::RDS::DBInstance
- Inherits:
-
Core::Resource
- Object
- Core::Resource
- AWS::RDS::DBInstance
- Defined in:
- lib/aws/rds/db_instance.rb
Instance Attribute Summary collapse
-
#allocated_storage ⇒ Integer
readonly
The current value of allocated_storage.
-
#auto_minor_version_upgrade ⇒ Boolean
readonly
The current value of auto_minor_version_upgrade.
-
#availability_zone_name ⇒ String
readonly
The current value of availability_zone_name.
-
#backup_retention_period ⇒ Integer
readonly
The current value of backup_retention_period.
-
#character_set_name ⇒ String
readonly
The current value of character_set_name.
-
#creation_date_time ⇒ Time
readonly
The current value of creation_date_time.
-
#db_instance_class ⇒ String
readonly
The current value of db_instance_class.
- #db_instance_identifier ⇒ String (also: #id, #db_instance_id) readonly
-
#db_instance_status ⇒ String
readonly
The current value of db_instance_status.
-
#db_name ⇒ String
readonly
The current value of db_name.
-
#endpoint_address ⇒ String
readonly
The current value of endpoint_address.
-
#endpoint_port ⇒ Integer
readonly
The current value of endpoint_port.
-
#engine ⇒ String
readonly
The current value of engine.
-
#engine_version ⇒ String
readonly
The current value of engine_version.
-
#iops ⇒ Integer
readonly
The current value of iops.
-
#latest_restorable_time ⇒ Time
readonly
The current value of latest_restorable_time.
-
#license_model ⇒ String
readonly
The current value of license_model.
-
#master_username ⇒ String
readonly
The current value of master_username.
-
#multi_az ⇒ Boolean
readonly
The current value of multi_az.
-
#preferred_backup_window ⇒ String
readonly
The current value of preferred_backup_window.
-
#preferred_maintenance_window ⇒ String
readonly
The current value of preferred_maintenance_window.
-
#read_replica_db_instance_identifiers ⇒ Array<String>
readonly
The current value of read_replica_db_instance_identifiers.
-
#read_replica_source_db_instance_identifier ⇒ String
readonly
The current value of read_replica_source_db_instance_identifier.
Instance Method Summary collapse
- #create_snapshot(db_snapshot_id) ⇒ DBSnapshot
-
#delete(options = {}) ⇒ nil
Terminates (deletes) this database instance.
-
#exists? ⇒ Boolean
Returns
true
if the db instance exists. -
#initialize(db_instance_id, options = {}) ⇒ DBInstance
constructor
A new instance of DBInstance.
-
#modify(options = {}) ⇒ Object
Modifies the database instance.
-
#reboot(options = {}) ⇒ nil
Reboots this databse instance.
- #snapshots ⇒ DBSnapshotCollection
Constructor Details
#initialize(db_instance_id, options = {}) ⇒ DBInstance
Returns a new instance of DBInstance.
66 67 68 69 |
# File 'lib/aws/rds/db_instance.rb', line 66 def initialize db_instance_id, = {} @db_instance_identifier = db_instance_id super end |
Instance Attribute Details
#allocated_storage ⇒ Integer (readonly)
Returns the current value of allocated_storage.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def allocated_storage @allocated_storage end |
#auto_minor_version_upgrade ⇒ Boolean (readonly)
Returns the current value of auto_minor_version_upgrade.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def auto_minor_version_upgrade @auto_minor_version_upgrade end |
#availability_zone_name ⇒ String (readonly)
Returns the current value of availability_zone_name.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def availability_zone_name @availability_zone_name end |
#backup_retention_period ⇒ Integer (readonly)
Returns the current value of backup_retention_period.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def backup_retention_period @backup_retention_period end |
#character_set_name ⇒ String (readonly)
Returns the current value of character_set_name.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def character_set_name @character_set_name end |
#creation_date_time ⇒ Time (readonly)
Returns the current value of creation_date_time.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def creation_date_time @creation_date_time end |
#db_instance_class ⇒ String (readonly)
Returns the current value of db_instance_class.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def db_instance_class @db_instance_class end |
#db_instance_identifier ⇒ String (readonly) Also known as: id, db_instance_id
72 73 74 |
# File 'lib/aws/rds/db_instance.rb', line 72 def db_instance_identifier @db_instance_identifier end |
#db_instance_status ⇒ String (readonly)
Returns the current value of db_instance_status.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def db_instance_status @db_instance_status end |
#db_name ⇒ String (readonly)
Returns the current value of db_name.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def db_name @db_name end |
#endpoint_address ⇒ String (readonly)
Returns the current value of endpoint_address.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def endpoint_address @endpoint_address end |
#endpoint_port ⇒ Integer (readonly)
Returns the current value of endpoint_port.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def endpoint_port @endpoint_port end |
#engine ⇒ String (readonly)
Returns the current value of engine.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def engine @engine end |
#engine_version ⇒ String (readonly)
Returns the current value of engine_version.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def engine_version @engine_version end |
#iops ⇒ Integer (readonly)
Returns the current value of iops.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def iops @iops end |
#latest_restorable_time ⇒ Time (readonly)
Returns the current value of latest_restorable_time.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def latest_restorable_time @latest_restorable_time end |
#license_model ⇒ String (readonly)
Returns the current value of license_model.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def license_model @license_model end |
#master_username ⇒ String (readonly)
Returns the current value of master_username.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def master_username @master_username end |
#multi_az ⇒ Boolean (readonly)
Returns the current value of multi_az.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def multi_az @multi_az end |
#preferred_backup_window ⇒ String (readonly)
Returns the current value of preferred_backup_window.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def preferred_backup_window @preferred_backup_window end |
#preferred_maintenance_window ⇒ String (readonly)
Returns the current value of preferred_maintenance_window.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def preferred_maintenance_window @preferred_maintenance_window end |
#read_replica_db_instance_identifiers ⇒ Array<String> (readonly)
Returns the current value of read_replica_db_instance_identifiers.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def read_replica_db_instance_identifiers @read_replica_db_instance_identifiers end |
#read_replica_source_db_instance_identifier ⇒ String (readonly)
Returns the current value of read_replica_source_db_instance_identifier.
62 63 64 |
# File 'lib/aws/rds/db_instance.rb', line 62 def read_replica_source_db_instance_identifier @read_replica_source_db_instance_identifier end |
Instance Method Details
#create_snapshot(db_snapshot_id) ⇒ DBSnapshot
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/aws/rds/db_instance.rb', line 153 def create_snapshot db_snapshot_id = {} [:db_snapshot_identifier] = db_snapshot_id [:db_instance_identifier] = db_instance_identifier resp = client.create_db_snapshot() DBSnapshot.new_from(:create_db_snapshot, resp, resp[:db_snapshot_identifier], :config => config) end |
#delete(options = {}) ⇒ nil
Terminates (deletes) this database instance.
178 179 180 181 |
# File 'lib/aws/rds/db_instance.rb', line 178 def delete = {} client.delete_db_instance(.merge(:db_instance_identifier => id)) nil end |
#exists? ⇒ Boolean
Returns true
if the db instance exists.
184 185 186 187 188 189 190 191 |
# File 'lib/aws/rds/db_instance.rb', line 184 def exists? begin get_resource true rescue AWS::RDS::Errors::DBInstanceNotFound false end end |
#modify(options = {}) ⇒ Object
You do not need to set :db_instance_identifier
.
Modifies the database instance.
143 144 145 |
# File 'lib/aws/rds/db_instance.rb', line 143 def modify = {} client.modify_db_instance(.merge(:db_instance_identifier => id)) end |
#reboot(options = {}) ⇒ nil
Reboots this databse instance.
171 172 173 174 |
# File 'lib/aws/rds/db_instance.rb', line 171 def reboot = {} client.reboot_db_instance(.merge(:db_instance_identifier => id)) nil end |
#snapshots ⇒ DBSnapshotCollection
148 149 150 |
# File 'lib/aws/rds/db_instance.rb', line 148 def snapshots DBSnapshotCollection.new(:config => config).db_instance(self) end |