Class: Fog::Compute::Aliyun::SecurityGroups
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Aliyun::SecurityGroups
- Defined in:
- lib/fog/aliyun/models/compute/security_groups.rb
Instance Method Summary collapse
Instance Method Details
#all(options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/fog/aliyun/models/compute/security_groups.rb', line 12 def all( = {}) data = Fog::JSON.decode(service.list_security_groups().body)['SecurityGroups']['SecurityGroup'] load(data) # ['Images']['Image'] end |
#get(security_group_id) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fog/aliyun/models/compute/security_groups.rb', line 18 def get(security_group_id) if security_group_id data = self.class.new(service: service).all result = nil data.each do |i| if i.id == security_group_id result = i break end end result end end |