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-14 15:02:56 -07:00

32 lines
982 B
Ruby

module Fog
module AWS
class EC2
# Remove permissions from a security group
#
# ==== Parameters
# * 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)
# * user_id - AWS Access Key ID
#
# === Returns
# FIXME: docs
def revoke_security_group_ingress(cidr_ip, from_port, group_name,
ip_protocol, to_port, user_id)
request({
'Action' => 'RevokeSecurityGroupIngress',
'CidrIp' => cidr_ip,
'FromPort' => from_port,
'GroupName' => group_name,
'IpProtocol' => ip_protocol,
'ToPort' => to_port,
'UserId' => user_id
}, Fog::Parsers::AWS::EC2::Basic.new)
end
end
end
end