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

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

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

Remove permissions from a security group

Parameters

  • group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)

  • options<~Hash>:

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

    • ‘GroupId’<~String> - Id of security group to modify

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

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

    or

    • ‘CidrIp’<~String> - CIDR range

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

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

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

    or

    • ‘IpPermissions’<~Array>:

      • permission<~Hash>:

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

        • ‘Groups’<~Array>:

          • group<~Hash>:

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

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

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

        • ‘IpRanges’<~Array>:

          • ip_range<~Hash>:

            • ‘CidrIp’<~String> - CIDR range

        • ‘ToPort’<~Integer> - 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


43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/fog/aws/requests/compute/revoke_security_group_ingress.rb', line 43

def revoke_security_group_ingress(group_name, options = {})
  options = Fog::AWS.parse_security_group_options(group_name, options)

  if ip_permissions = options.delete('IpPermissions')
    options.merge!(indexed_ip_permissions_params(ip_permissions))
  end

  request({
    'Action'    => 'RevokeSecurityGroupIngress',
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::Basic.new
  }.merge!(options))
end