Class: OpenStax::Aws::RdsInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/openstax/aws/rds_instance.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_instance_identifier:, region:) ⇒ RdsInstance

Returns a new instance of RdsInstance.



12
13
14
15
16
17
# File 'lib/openstax/aws/rds_instance.rb', line 12

def initialize(db_instance_identifier:, region:)
  @raw = Aws::RDS::DBInstance.new(
    db_instance_identifier,
    client: Aws::RDS::Client.new(region: region)
  )
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



4
5
6
# File 'lib/openstax/aws/rds_instance.rb', line 4

def raw
  @raw
end

Class Method Details

.physical_resource_id_attributeObject



8
9
10
# File 'lib/openstax/aws/rds_instance.rb', line 8

def self.physical_resource_id_attribute
  :db_instance_identifier
end

Instance Method Details

#set_master_password(password:) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/openstax/aws/rds_instance.rb', line 19

def set_master_password(password:)
  raw.modify({
    apply_immediately: true,
    master_user_password: password
  })

end