Class: CfFactory::CfRdsSubnetGroup
- Inherits:
-
Object
- Object
- CfFactory::CfRdsSubnetGroup
show all
- Includes:
- CfBase
- Defined in:
- lib/cf_factory/rds/cf_rds_subnet_group.rb
Instance Method Summary
collapse
Methods included from CfBase
#generate, #generate_ref, #get_deletion_policy, #get_name, #get_update_policy, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes, #set_tags
Constructor Details
#initialize(name, description) ⇒ CfRdsSubnetGroup
Returns a new instance of CfRdsSubnetGroup.
7
8
9
10
11
|
# File 'lib/cf_factory/rds/cf_rds_subnet_group.rb', line 7
def initialize(name, description)
@name = name
@description = description
@subnets = []
end
|
Instance Method Details
#add_subnet(subnet) ⇒ Object
26
27
28
|
# File 'lib/cf_factory/rds/cf_rds_subnet_group.rb', line 26
def add_subnet(subnet)
@subnets << subnet
end
|
#get_cf_attributes ⇒ Object
17
18
19
|
# File 'lib/cf_factory/rds/cf_rds_subnet_group.rb', line 17
def get_cf_attributes
{}
end
|
#get_cf_properties ⇒ Object
21
22
23
24
|
# File 'lib/cf_factory/rds/cf_rds_subnet_group.rb', line 21
def get_cf_properties
subnet_array = @subnets.collect() {|s| s.generate_ref}.join(",")
{"DBSubnetGroupDescription" => @description, "SubnetIds" => "[#{subnet_array}]"}
end
|
#get_cf_type ⇒ Object
13
14
15
|
# File 'lib/cf_factory/rds/cf_rds_subnet_group.rb', line 13
def get_cf_type
"AWS::RDS::DBSubnetGroup"
end
|