Class: CfEip
- Inherits:
-
Object
show all
- Includes:
- CfBase
- Defined in:
- lib/cf_factory/ec2/cf_eip.rb
Instance Method Summary
collapse
Methods included from CfBase
#generate, #generate_ref, #get_deletion_policy, #get_name, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes, #set_tags
Constructor Details
#initialize(name, instance = nil, is_vpc = false) ⇒ CfEip
Returns a new instance of CfEip.
5
6
7
8
9
|
# File 'lib/cf_factory/ec2/cf_eip.rb', line 5
def initialize(name, instance = nil, is_vpc = false)
@name = name
@instance = instance
@domain = is_vpc ? "vpc" : nil
end
|
Instance Method Details
#get_cf_attributes ⇒ Object
15
16
17
|
# File 'lib/cf_factory/ec2/cf_eip.rb', line 15
def get_cf_attributes
{}
end
|
#get_cf_properties ⇒ Object
19
20
21
22
23
24
|
# File 'lib/cf_factory/ec2/cf_eip.rb', line 19
def get_cf_properties
result = {}
result["InstanceId"] = @instance.generate_ref unless @instance.nil?
result["Domain"] = @domain unless @domain.nil?
result
end
|
#get_cf_type ⇒ Object
11
12
13
|
# File 'lib/cf_factory/ec2/cf_eip.rb', line 11
def get_cf_type
"AWS::EC2::EIP"
end
|