Method: Fog::Compute::AWS::Real#revoke_security_group_ingress

Defined in:
lib/fog/compute/requests/aws/revoke_security_group_ingress.rb

#revoke_security_group_ingress(group_name, options = {}) ⇒ Object

Remove permissions from a security group

Parameters

  • ‘GroupName’<~String> - Name of group

  • options<~Hash>:

    • ‘SourceSecurityGroupName’<~String> - Name of security group to authorize

    • ‘SourceSecurityGroupOwnerId’<~String> - Name of owner to authorize

    or

    • ‘CidrIp’ - CIDR range

    • ‘FromPort’ - Start of port range (or -1 for ICMP wildcard)

    • ‘IpProtocol’ - Ip protocol, must be in [‘tcp’, ‘udp’, ‘icmp’]

    • ‘ToPort’ - End of port range (or -1 for ICMP wildcard)

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      • ‘requestId’<~String> - Id of request

      • ‘return’<~Boolean> - success?

Amazon API Reference



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/fog/compute/requests/aws/revoke_security_group_ingress.rb', line 28

def revoke_security_group_ingress(group_name, options = {})
  if group_name.is_a?(Hash)
    location = caller.first
    warning = "[yellow][WARN] Fog::AWS::Compute#revoke_security_group_ingress now requires the 'group_name' parameter. Only specifying an options hash is now deprecated"
    warning << " [light_black](" << location << ")[/] "
    Formatador.display_line(warning)
    options = group_name
    group_name = options['GroupName']
  end
  request({
    'Action'    => 'RevokeSecurityGroupIngress',
    'GroupName' => group_name,
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::Basic.new
  }.merge!(options))
end