Class: OpenStax::Aws::RdsCluster

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_cluster_identifier:, region:) ⇒ RdsCluster

Returns a new instance of RdsCluster.



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

def initialize(db_cluster_identifier:, region:)
  @raw = Aws::RDS::DBCluster.new(
    db_cluster_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_cluster.rb', line 4

def raw
  @raw
end

Class Method Details

.physical_resource_id_attributeObject



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

def self.physical_resource_id_attribute
  :db_cluster_identifier
end

Instance Method Details

#set_master_password(password:) ⇒ Object



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

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