class AWS::EC2::SecurityGroupCollection
Represents all EC2 security groups in an AWS account.
def [] group_id
-
(SecurityGroup)
- The group with the given id.
Parameters:
-
group_id
(String
) -- The group id of a security group.
def [] group_id super end
def create name, options = {}
-
(SecurityGroup)
-
Options Hash:
(**options)
-
:vpc_id
(String
) -- The ID of a VPC to create -
:description
(String
) -- An informal description
Parameters:
-
options
(Hash
) -- -
name
(String
) -- The name of the security group to create.
def create name, options = {} description = options[:description] || name create_opts = {} create_opts[:group_name] = name create_opts[:description] = description create_opts[:vpc_id] = options[:vpc_id] if options[:vpc_id] response = client.create_security_group(create_opts) SecurityGroup.new(response.group_id, { :name => name, :description => description, :vpc_id => options[:vpc_id], :config => config }) end
def each &block
-
(nil)
-
Other tags:
- Yieldparam: group -
Other tags:
- Yield: -
def each &block response = filtered_request(:describe_security_groups) response.security_group_info.each do |info| group = SecurityGroup.new_from(:describe_security_groups, info, info.group_id, :config => config) yield(group) end nil end
def member_class
def member_class SecurityGroup end