Class: Swa::EC2::Vpc
Instance Attribute Summary
Attributes inherited from Resource
#aws_resource
Instance Method Summary
collapse
#tags
Methods inherited from Resource
#data, delegate, #initialize, list
Constructor Details
This class inherits a constructor from Swa::Resource
Instance Method Details
#default_marker ⇒ Object
28
29
30
|
# File 'lib/swa/ec2/vpc.rb', line 28
def default_marker
"*" if vpc.is_default
end
|
#id ⇒ Object
11
12
13
|
# File 'lib/swa/ec2/vpc.rb', line 11
def id
vpc.vpc_id
end
|
#name ⇒ Object
24
25
26
|
# File 'lib/swa/ec2/vpc.rb', line 24
def name
tags["Name"]
end
|
#summary ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/swa/ec2/vpc.rb', line 15
def summary
[
field(vpc, :vpc_id),
pad(default_marker, 1),
field(vpc, :cidr_block),
quoted(name)
].join(" ")
end
|