1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/ec2/revoke_security_group_ingress.rb
2009-07-22 22:25:39 -07:00

39 lines
1.4 KiB
Ruby

module Fog
module AWS
class EC2
# Remove permissions from a security group
#
# ==== Parameters
# * options<~Hash>:
# * :group_name<~String> - Name of group
# * :source_security_group_name<~String> - Name of security group to authorize
# * :source_security_group_owner_id<~String> - Name of owner to authorize
# or
# * :cidr_ip - CIDR range
# * :from_port - Start of port range (or -1 for ICMP wildcard)
# * :group_name - Name of group to modify
# * :ip_protocol - Ip protocol, must be in ['tcp', 'udp', 'icmp']
# * :to_port - End of port range (or -1 for ICMP wildcard)
#
# === Returns
# * response<~Fog::AWS::Response>:
# * body<~Hash>:
# * :request_id<~String> - Id of request
# * :return<~Boolean> - success?
def revoke_security_group_ingress(options = {})
request({
'Action' => 'RevokeSecurityGroupIngress',
'CidrIp' => options[:cidr_ip],
'FromPort' => options[:from_port],
'GroupName' => options[:group_name],
'IpProtocol' => options[:ip_protocol],
'SourceSecurityGroupName' => options[:source_security_group_name],
'SourceSecurityGroupOwnerId' => options[:source_security_group_owner_id],
'ToPort' => options[:to_port]
}, Fog::Parsers::AWS::EC2::Basic.new)
end
end
end
end