Class: CfNetworkAcl
- Inherits:
-
Object
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.
5
6
7
8
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 5
def initialize(name)
@name = name
@entries = []
end
|
Instance Method Details
#add_network_acl_entry(network_acl_entry) ⇒ Object
10
11
12
13
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 10
def add_network_acl_entry(network_acl_entry)
network_acl_entry.set_network_acl(self)
@entries << network_acl_entry
end
|
#generate ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 31
def generate
super
@entries.each() {|entry|
@result += entry.generate
}
@result
end
|
#get_cf_attributes ⇒ Object
23
24
25
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 23
def get_cf_attributes
{}
end
|
#get_cf_properties ⇒ Object
27
28
29
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 27
def get_cf_properties
{"VpcId" => @vpc.generate_ref}
end
|
#get_cf_type ⇒ Object
19
20
21
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 19
def get_cf_type
"AWS::EC2::NetworkAcl"
end
|
#set_vpc(vpc) ⇒ Object
15
16
17
|
# File 'lib/cf_factory/vpc/cf_network_acl.rb', line 15
def set_vpc(vpc)
@vpc = vpc
end
|