Class: OpenStax::Aws::RdsInstance

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_instance_identifier:, region:) ⇒ RdsInstance

Returns a new instance of RdsInstance.



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

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

Instance Method Details

#set_master_password(password:) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/openstax/aws/rds_instance.rb', line 15

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