Class: CfFactory::CfNetworkAcl
- Inherits:
-
Object
- Object
- CfFactory::CfNetworkAcl
show all
- Includes:
- CfBase
- Defined in:
- lib/cf_factory/vpc/cf_network_acl.rb
Instance Method Summary
collapse
Methods included from CfBase
#generate_ref, #get_deletion_policy, #get_name, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes, #set_tags
Constructor Details
Returns a new instance of CfNetworkAcl.
6
7
8
9
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 6
def initialize(name)
@name = name
@entries = []
end
|
Instance Method Details
#add_network_acl_entry(network_acl_entry) ⇒ Object
11
12
13
14
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 11
def add_network_acl_entry(network_acl_entry)
network_acl_entry.set_network_acl(self)
@entries << network_acl_entry
end
|
#generate ⇒ Object
32
33
34
35
36
37
38
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 32
def generate
super
@entries.each() {|entry|
@result += entry.generate
}
@result
end
|
#get_cf_attributes ⇒ Object
24
25
26
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 24
def get_cf_attributes
{}
end
|
#get_cf_properties ⇒ Object
28
29
30
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 28
def get_cf_properties
{"VpcId" => @vpc.generate_ref}
end
|
#get_cf_type ⇒ Object
20
21
22
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 20
def get_cf_type
"AWS::EC2::NetworkAcl"
end
|
#set_vpc(vpc) ⇒ Object
16
17
18
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 16
def set_vpc(vpc)
@vpc = vpc
end
|