Class: Phase::Adapters::AWS::Network
- Inherits:
-
Phase::Adapters::Abstract::Network
- Object
- Phase::Adapters::Abstract::Base
- Phase::Adapters::Abstract::Network
- Phase::Adapters::AWS::Network
- Defined in:
- lib/phase/adapters/aws/network.rb
Instance Attribute Summary
Attributes inherited from Phase::Adapters::Abstract::Base
Class Method Summary collapse
-
.all ⇒ Array<AWS::Network>
All known VPC instances.
-
.find(network_id) ⇒ AWS::Network?
The requested VPC.
Instance Method Summary collapse
-
#servers(options = {}) ⇒ Array<AWS::Server>
The AWS instances within this VPC.
-
#subnets ⇒ Array<Fog::Compute::AWS::Subnet>
The subnets within this VPC.
Methods inherited from Phase::Adapters::Abstract::Base
Constructor Details
This class inherits a constructor from Phase::Adapters::Abstract::Base
Class Method Details
.all ⇒ Array<AWS::Network>
Returns All known VPC instances.
21 22 23 |
# File 'lib/phase/adapters/aws/network.rb', line 21 def all api.vpcs.all.map {|network| new(network) } end |
.find(network_id) ⇒ AWS::Network?
Returns The requested VPC.
27 28 29 |
# File 'lib/phase/adapters/aws/network.rb', line 27 def find(network_id) new(api.vpcs.get(network_id)) end |
Instance Method Details
#servers(options = {}) ⇒ Array<AWS::Server>
Returns The AWS instances within this VPC.
9 10 11 12 |
# File 'lib/phase/adapters/aws/network.rb', line 9 def servers( = {}) [:vpc_id] = resource.id Server.where() end |