{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.RevokeSecurityGroupIngress
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes the specified inbound (ingress) rules from a security group.
--
-- You can specify rules using either rule IDs or security group rule
-- properties. If you use rule properties, the values that you specify (for
-- example, ports) must match the existing rule\'s values exactly. Each
-- rule has a protocol, from and to ports, and source (CIDR range, security
-- group, or prefix list). For the TCP and UDP protocols, you must also
-- specify the destination port or range of ports. For the ICMP protocol,
-- you must also specify the ICMP type and code. If the security group rule
-- has a description, you do not need to specify the description to revoke
-- the rule.
--
-- [EC2-Classic, default VPC] If the values you specify do not match the
-- existing rule\'s values, no error is returned, and the output describes
-- the security group rules that were not revoked.
--
-- Amazon Web Services recommends that you describe the security group to
-- verify that the rules were removed.
--
-- Rule changes are propagated to instances within the security group as
-- quickly as possible. However, a small delay might occur.
--
-- We are retiring EC2-Classic. We recommend that you migrate from
-- EC2-Classic to a VPC. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html Migrate from EC2-Classic to a VPC>
-- in the /Amazon Elastic Compute Cloud User Guide/.
module Amazonka.EC2.RevokeSecurityGroupIngress
  ( -- * Creating a Request
    RevokeSecurityGroupIngress (..),
    newRevokeSecurityGroupIngress,

    -- * Request Lenses
    revokeSecurityGroupIngress_cidrIp,
    revokeSecurityGroupIngress_dryRun,
    revokeSecurityGroupIngress_fromPort,
    revokeSecurityGroupIngress_groupId,
    revokeSecurityGroupIngress_groupName,
    revokeSecurityGroupIngress_ipPermissions,
    revokeSecurityGroupIngress_ipProtocol,
    revokeSecurityGroupIngress_securityGroupRuleIds,
    revokeSecurityGroupIngress_sourceSecurityGroupName,
    revokeSecurityGroupIngress_sourceSecurityGroupOwnerId,
    revokeSecurityGroupIngress_toPort,

    -- * Destructuring the Response
    RevokeSecurityGroupIngressResponse (..),
    newRevokeSecurityGroupIngressResponse,

    -- * Response Lenses
    revokeSecurityGroupIngressResponse_return,
    revokeSecurityGroupIngressResponse_unknownIpPermissions,
    revokeSecurityGroupIngressResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newRevokeSecurityGroupIngress' smart constructor.
data RevokeSecurityGroupIngress = RevokeSecurityGroupIngress'
  { -- | The CIDR IP address range. You can\'t specify this parameter when
    -- specifying a source security group.
    RevokeSecurityGroupIngress -> Maybe Text
cidrIp :: Prelude.Maybe Prelude.Text,
    -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    RevokeSecurityGroupIngress -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The start of port range for the TCP and UDP protocols, or an ICMP type
    -- number. For the ICMP type number, use @-1@ to specify all ICMP types.
    RevokeSecurityGroupIngress -> Maybe Int
fromPort :: Prelude.Maybe Prelude.Int,
    -- | The ID of the security group. You must specify either the security group
    -- ID or the security group name in the request. For security groups in a
    -- nondefault VPC, you must specify the security group ID.
    RevokeSecurityGroupIngress -> Maybe Text
groupId :: Prelude.Maybe Prelude.Text,
    -- | [EC2-Classic, default VPC] The name of the security group. You must
    -- specify either the security group ID or the security group name in the
    -- request. For security groups in a nondefault VPC, you must specify the
    -- security group ID.
    RevokeSecurityGroupIngress -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
    -- | The sets of IP permissions. You can\'t specify a source security group
    -- and a CIDR IP address range in the same set of permissions.
    RevokeSecurityGroupIngress -> Maybe [IpPermission]
ipPermissions :: Prelude.Maybe [IpPermission],
    -- | The IP protocol name (@tcp@, @udp@, @icmp@) or number (see
    -- <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Protocol Numbers>).
    -- Use @-1@ to specify all.
    RevokeSecurityGroupIngress -> Maybe Text
ipProtocol :: Prelude.Maybe Prelude.Text,
    -- | The IDs of the security group rules.
    RevokeSecurityGroupIngress -> Maybe [Text]
securityGroupRuleIds :: Prelude.Maybe [Prelude.Text],
    -- | [EC2-Classic, default VPC] The name of the source security group. You
    -- can\'t specify this parameter in combination with the following
    -- parameters: the CIDR IP address range, the start of the port range, the
    -- IP protocol, and the end of the port range. For EC2-VPC, the source
    -- security group must be in the same VPC. To revoke a specific rule for an
    -- IP protocol and port range, use a set of IP permissions instead.
    RevokeSecurityGroupIngress -> Maybe Text
sourceSecurityGroupName :: Prelude.Maybe Prelude.Text,
    -- | [EC2-Classic] The Amazon Web Services account ID of the source security
    -- group, if the source security group is in a different account. You
    -- can\'t specify this parameter in combination with the following
    -- parameters: the CIDR IP address range, the IP protocol, the start of the
    -- port range, and the end of the port range. To revoke a specific rule for
    -- an IP protocol and port range, use a set of IP permissions instead.
    RevokeSecurityGroupIngress -> Maybe Text
sourceSecurityGroupOwnerId :: Prelude.Maybe Prelude.Text,
    -- | The end of port range for the TCP and UDP protocols, or an ICMP code
    -- number. For the ICMP code number, use @-1@ to specify all ICMP codes for
    -- the ICMP type.
    RevokeSecurityGroupIngress -> Maybe Int
toPort :: Prelude.Maybe Prelude.Int
  }
  deriving (RevokeSecurityGroupIngress -> RevokeSecurityGroupIngress -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeSecurityGroupIngress -> RevokeSecurityGroupIngress -> Bool
$c/= :: RevokeSecurityGroupIngress -> RevokeSecurityGroupIngress -> Bool
== :: RevokeSecurityGroupIngress -> RevokeSecurityGroupIngress -> Bool
$c== :: RevokeSecurityGroupIngress -> RevokeSecurityGroupIngress -> Bool
Prelude.Eq, ReadPrec [RevokeSecurityGroupIngress]
ReadPrec RevokeSecurityGroupIngress
Int -> ReadS RevokeSecurityGroupIngress
ReadS [RevokeSecurityGroupIngress]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeSecurityGroupIngress]
$creadListPrec :: ReadPrec [RevokeSecurityGroupIngress]
readPrec :: ReadPrec RevokeSecurityGroupIngress
$creadPrec :: ReadPrec RevokeSecurityGroupIngress
readList :: ReadS [RevokeSecurityGroupIngress]
$creadList :: ReadS [RevokeSecurityGroupIngress]
readsPrec :: Int -> ReadS RevokeSecurityGroupIngress
$creadsPrec :: Int -> ReadS RevokeSecurityGroupIngress
Prelude.Read, Int -> RevokeSecurityGroupIngress -> ShowS
[RevokeSecurityGroupIngress] -> ShowS
RevokeSecurityGroupIngress -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeSecurityGroupIngress] -> ShowS
$cshowList :: [RevokeSecurityGroupIngress] -> ShowS
show :: RevokeSecurityGroupIngress -> String
$cshow :: RevokeSecurityGroupIngress -> String
showsPrec :: Int -> RevokeSecurityGroupIngress -> ShowS
$cshowsPrec :: Int -> RevokeSecurityGroupIngress -> ShowS
Prelude.Show, forall x.
Rep RevokeSecurityGroupIngress x -> RevokeSecurityGroupIngress
forall x.
RevokeSecurityGroupIngress -> Rep RevokeSecurityGroupIngress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeSecurityGroupIngress x -> RevokeSecurityGroupIngress
$cfrom :: forall x.
RevokeSecurityGroupIngress -> Rep RevokeSecurityGroupIngress x
Prelude.Generic)

-- |
-- Create a value of 'RevokeSecurityGroupIngress' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'cidrIp', 'revokeSecurityGroupIngress_cidrIp' - The CIDR IP address range. You can\'t specify this parameter when
-- specifying a source security group.
--
-- 'dryRun', 'revokeSecurityGroupIngress_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'fromPort', 'revokeSecurityGroupIngress_fromPort' - The start of port range for the TCP and UDP protocols, or an ICMP type
-- number. For the ICMP type number, use @-1@ to specify all ICMP types.
--
-- 'groupId', 'revokeSecurityGroupIngress_groupId' - The ID of the security group. You must specify either the security group
-- ID or the security group name in the request. For security groups in a
-- nondefault VPC, you must specify the security group ID.
--
-- 'groupName', 'revokeSecurityGroupIngress_groupName' - [EC2-Classic, default VPC] The name of the security group. You must
-- specify either the security group ID or the security group name in the
-- request. For security groups in a nondefault VPC, you must specify the
-- security group ID.
--
-- 'ipPermissions', 'revokeSecurityGroupIngress_ipPermissions' - The sets of IP permissions. You can\'t specify a source security group
-- and a CIDR IP address range in the same set of permissions.
--
-- 'ipProtocol', 'revokeSecurityGroupIngress_ipProtocol' - The IP protocol name (@tcp@, @udp@, @icmp@) or number (see
-- <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Protocol Numbers>).
-- Use @-1@ to specify all.
--
-- 'securityGroupRuleIds', 'revokeSecurityGroupIngress_securityGroupRuleIds' - The IDs of the security group rules.
--
-- 'sourceSecurityGroupName', 'revokeSecurityGroupIngress_sourceSecurityGroupName' - [EC2-Classic, default VPC] The name of the source security group. You
-- can\'t specify this parameter in combination with the following
-- parameters: the CIDR IP address range, the start of the port range, the
-- IP protocol, and the end of the port range. For EC2-VPC, the source
-- security group must be in the same VPC. To revoke a specific rule for an
-- IP protocol and port range, use a set of IP permissions instead.
--
-- 'sourceSecurityGroupOwnerId', 'revokeSecurityGroupIngress_sourceSecurityGroupOwnerId' - [EC2-Classic] The Amazon Web Services account ID of the source security
-- group, if the source security group is in a different account. You
-- can\'t specify this parameter in combination with the following
-- parameters: the CIDR IP address range, the IP protocol, the start of the
-- port range, and the end of the port range. To revoke a specific rule for
-- an IP protocol and port range, use a set of IP permissions instead.
--
-- 'toPort', 'revokeSecurityGroupIngress_toPort' - The end of port range for the TCP and UDP protocols, or an ICMP code
-- number. For the ICMP code number, use @-1@ to specify all ICMP codes for
-- the ICMP type.
newRevokeSecurityGroupIngress ::
  RevokeSecurityGroupIngress
newRevokeSecurityGroupIngress :: RevokeSecurityGroupIngress
newRevokeSecurityGroupIngress =
  RevokeSecurityGroupIngress'
    { $sel:cidrIp:RevokeSecurityGroupIngress' :: Maybe Text
cidrIp =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:RevokeSecurityGroupIngress' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:fromPort:RevokeSecurityGroupIngress' :: Maybe Int
fromPort = forall a. Maybe a
Prelude.Nothing,
      $sel:groupId:RevokeSecurityGroupIngress' :: Maybe Text
groupId = forall a. Maybe a
Prelude.Nothing,
      $sel:groupName:RevokeSecurityGroupIngress' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
      $sel:ipPermissions:RevokeSecurityGroupIngress' :: Maybe [IpPermission]
ipPermissions = forall a. Maybe a
Prelude.Nothing,
      $sel:ipProtocol:RevokeSecurityGroupIngress' :: Maybe Text
ipProtocol = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: Maybe [Text]
securityGroupRuleIds = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: Maybe Text
sourceSecurityGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: Maybe Text
sourceSecurityGroupOwnerId = forall a. Maybe a
Prelude.Nothing,
      $sel:toPort:RevokeSecurityGroupIngress' :: Maybe Int
toPort = forall a. Maybe a
Prelude.Nothing
    }

-- | The CIDR IP address range. You can\'t specify this parameter when
-- specifying a source security group.
revokeSecurityGroupIngress_cidrIp :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_cidrIp :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_cidrIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
cidrIp :: Maybe Text
$sel:cidrIp:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
cidrIp} -> Maybe Text
cidrIp) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:cidrIp:RevokeSecurityGroupIngress' :: Maybe Text
cidrIp = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
revokeSecurityGroupIngress_dryRun :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Bool)
revokeSecurityGroupIngress_dryRun :: Lens' RevokeSecurityGroupIngress (Maybe Bool)
revokeSecurityGroupIngress_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Bool
a -> RevokeSecurityGroupIngress
s {$sel:dryRun:RevokeSecurityGroupIngress' :: Maybe Bool
dryRun = Maybe Bool
a} :: RevokeSecurityGroupIngress)

-- | The start of port range for the TCP and UDP protocols, or an ICMP type
-- number. For the ICMP type number, use @-1@ to specify all ICMP types.
revokeSecurityGroupIngress_fromPort :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Int)
revokeSecurityGroupIngress_fromPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
revokeSecurityGroupIngress_fromPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Int
fromPort :: Maybe Int
$sel:fromPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
fromPort} -> Maybe Int
fromPort) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Int
a -> RevokeSecurityGroupIngress
s {$sel:fromPort:RevokeSecurityGroupIngress' :: Maybe Int
fromPort = Maybe Int
a} :: RevokeSecurityGroupIngress)

-- | The ID of the security group. You must specify either the security group
-- ID or the security group name in the request. For security groups in a
-- nondefault VPC, you must specify the security group ID.
revokeSecurityGroupIngress_groupId :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_groupId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_groupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
groupId :: Maybe Text
$sel:groupId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
groupId} -> Maybe Text
groupId) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:groupId:RevokeSecurityGroupIngress' :: Maybe Text
groupId = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | [EC2-Classic, default VPC] The name of the security group. You must
-- specify either the security group ID or the security group name in the
-- request. For security groups in a nondefault VPC, you must specify the
-- security group ID.
revokeSecurityGroupIngress_groupName :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_groupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
groupName :: Maybe Text
$sel:groupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:groupName:RevokeSecurityGroupIngress' :: Maybe Text
groupName = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | The sets of IP permissions. You can\'t specify a source security group
-- and a CIDR IP address range in the same set of permissions.
revokeSecurityGroupIngress_ipPermissions :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe [IpPermission])
revokeSecurityGroupIngress_ipPermissions :: Lens' RevokeSecurityGroupIngress (Maybe [IpPermission])
revokeSecurityGroupIngress_ipPermissions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe [IpPermission]
ipPermissions :: Maybe [IpPermission]
$sel:ipPermissions:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [IpPermission]
ipPermissions} -> Maybe [IpPermission]
ipPermissions) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe [IpPermission]
a -> RevokeSecurityGroupIngress
s {$sel:ipPermissions:RevokeSecurityGroupIngress' :: Maybe [IpPermission]
ipPermissions = Maybe [IpPermission]
a} :: RevokeSecurityGroupIngress) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The IP protocol name (@tcp@, @udp@, @icmp@) or number (see
-- <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Protocol Numbers>).
-- Use @-1@ to specify all.
revokeSecurityGroupIngress_ipProtocol :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_ipProtocol :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_ipProtocol = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
ipProtocol :: Maybe Text
$sel:ipProtocol:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
ipProtocol} -> Maybe Text
ipProtocol) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:ipProtocol:RevokeSecurityGroupIngress' :: Maybe Text
ipProtocol = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | The IDs of the security group rules.
revokeSecurityGroupIngress_securityGroupRuleIds :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe [Prelude.Text])
revokeSecurityGroupIngress_securityGroupRuleIds :: Lens' RevokeSecurityGroupIngress (Maybe [Text])
revokeSecurityGroupIngress_securityGroupRuleIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe [Text]
securityGroupRuleIds :: Maybe [Text]
$sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [Text]
securityGroupRuleIds} -> Maybe [Text]
securityGroupRuleIds) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe [Text]
a -> RevokeSecurityGroupIngress
s {$sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: Maybe [Text]
securityGroupRuleIds = Maybe [Text]
a} :: RevokeSecurityGroupIngress) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | [EC2-Classic, default VPC] The name of the source security group. You
-- can\'t specify this parameter in combination with the following
-- parameters: the CIDR IP address range, the start of the port range, the
-- IP protocol, and the end of the port range. For EC2-VPC, the source
-- security group must be in the same VPC. To revoke a specific rule for an
-- IP protocol and port range, use a set of IP permissions instead.
revokeSecurityGroupIngress_sourceSecurityGroupName :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_sourceSecurityGroupName :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_sourceSecurityGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
sourceSecurityGroupName :: Maybe Text
$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
sourceSecurityGroupName} -> Maybe Text
sourceSecurityGroupName) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: Maybe Text
sourceSecurityGroupName = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | [EC2-Classic] The Amazon Web Services account ID of the source security
-- group, if the source security group is in a different account. You
-- can\'t specify this parameter in combination with the following
-- parameters: the CIDR IP address range, the IP protocol, the start of the
-- port range, and the end of the port range. To revoke a specific rule for
-- an IP protocol and port range, use a set of IP permissions instead.
revokeSecurityGroupIngress_sourceSecurityGroupOwnerId :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeSecurityGroupIngress_sourceSecurityGroupOwnerId :: Lens' RevokeSecurityGroupIngress (Maybe Text)
revokeSecurityGroupIngress_sourceSecurityGroupOwnerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Text
sourceSecurityGroupOwnerId :: Maybe Text
$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
sourceSecurityGroupOwnerId} -> Maybe Text
sourceSecurityGroupOwnerId) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Text
a -> RevokeSecurityGroupIngress
s {$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: Maybe Text
sourceSecurityGroupOwnerId = Maybe Text
a} :: RevokeSecurityGroupIngress)

-- | The end of port range for the TCP and UDP protocols, or an ICMP code
-- number. For the ICMP code number, use @-1@ to specify all ICMP codes for
-- the ICMP type.
revokeSecurityGroupIngress_toPort :: Lens.Lens' RevokeSecurityGroupIngress (Prelude.Maybe Prelude.Int)
revokeSecurityGroupIngress_toPort :: Lens' RevokeSecurityGroupIngress (Maybe Int)
revokeSecurityGroupIngress_toPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngress' {Maybe Int
toPort :: Maybe Int
$sel:toPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
toPort} -> Maybe Int
toPort) (\s :: RevokeSecurityGroupIngress
s@RevokeSecurityGroupIngress' {} Maybe Int
a -> RevokeSecurityGroupIngress
s {$sel:toPort:RevokeSecurityGroupIngress' :: Maybe Int
toPort = Maybe Int
a} :: RevokeSecurityGroupIngress)

instance Core.AWSRequest RevokeSecurityGroupIngress where
  type
    AWSResponse RevokeSecurityGroupIngress =
      RevokeSecurityGroupIngressResponse
  request :: (Service -> Service)
-> RevokeSecurityGroupIngress -> Request RevokeSecurityGroupIngress
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RevokeSecurityGroupIngress
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RevokeSecurityGroupIngress)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe [IpPermission]
-> Int
-> RevokeSecurityGroupIngressResponse
RevokeSecurityGroupIngressResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"return")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"unknownIpPermissionSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RevokeSecurityGroupIngress where
  hashWithSalt :: Int -> RevokeSecurityGroupIngress -> Int
hashWithSalt Int
_salt RevokeSecurityGroupIngress' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [IpPermission]
Maybe Text
toPort :: Maybe Int
sourceSecurityGroupOwnerId :: Maybe Text
sourceSecurityGroupName :: Maybe Text
securityGroupRuleIds :: Maybe [Text]
ipProtocol :: Maybe Text
ipPermissions :: Maybe [IpPermission]
groupName :: Maybe Text
groupId :: Maybe Text
fromPort :: Maybe Int
dryRun :: Maybe Bool
cidrIp :: Maybe Text
$sel:toPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [Text]
$sel:ipProtocol:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:ipPermissions:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [IpPermission]
$sel:groupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:groupId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:fromPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:dryRun:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Bool
$sel:cidrIp:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cidrIp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
fromPort
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [IpPermission]
ipPermissions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipProtocol
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupRuleIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceSecurityGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceSecurityGroupOwnerId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
toPort

instance Prelude.NFData RevokeSecurityGroupIngress where
  rnf :: RevokeSecurityGroupIngress -> ()
rnf RevokeSecurityGroupIngress' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [IpPermission]
Maybe Text
toPort :: Maybe Int
sourceSecurityGroupOwnerId :: Maybe Text
sourceSecurityGroupName :: Maybe Text
securityGroupRuleIds :: Maybe [Text]
ipProtocol :: Maybe Text
ipPermissions :: Maybe [IpPermission]
groupName :: Maybe Text
groupId :: Maybe Text
fromPort :: Maybe Int
dryRun :: Maybe Bool
cidrIp :: Maybe Text
$sel:toPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [Text]
$sel:ipProtocol:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:ipPermissions:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [IpPermission]
$sel:groupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:groupId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:fromPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:dryRun:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Bool
$sel:cidrIp:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cidrIp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
fromPort
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [IpPermission]
ipPermissions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipProtocol
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroupRuleIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceSecurityGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceSecurityGroupOwnerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
toPort

instance Data.ToHeaders RevokeSecurityGroupIngress where
  toHeaders :: RevokeSecurityGroupIngress -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath RevokeSecurityGroupIngress where
  toPath :: RevokeSecurityGroupIngress -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery RevokeSecurityGroupIngress where
  toQuery :: RevokeSecurityGroupIngress -> QueryString
toQuery RevokeSecurityGroupIngress' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [IpPermission]
Maybe Text
toPort :: Maybe Int
sourceSecurityGroupOwnerId :: Maybe Text
sourceSecurityGroupName :: Maybe Text
securityGroupRuleIds :: Maybe [Text]
ipProtocol :: Maybe Text
ipPermissions :: Maybe [IpPermission]
groupName :: Maybe Text
groupId :: Maybe Text
fromPort :: Maybe Int
dryRun :: Maybe Bool
cidrIp :: Maybe Text
$sel:toPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:sourceSecurityGroupOwnerId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:sourceSecurityGroupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:securityGroupRuleIds:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [Text]
$sel:ipProtocol:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:ipPermissions:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe [IpPermission]
$sel:groupName:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:groupId:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
$sel:fromPort:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Int
$sel:dryRun:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Bool
$sel:cidrIp:RevokeSecurityGroupIngress' :: RevokeSecurityGroupIngress -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"RevokeSecurityGroupIngress" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"CidrIp" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cidrIp,
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"FromPort" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
fromPort,
        ByteString
"GroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupId,
        ByteString
"GroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupName,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"IpPermissions"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [IpPermission]
ipPermissions
          ),
        ByteString
"IpProtocol" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipProtocol,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SecurityGroupRuleId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupRuleIds
          ),
        ByteString
"SourceSecurityGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
sourceSecurityGroupName,
        ByteString
"SourceSecurityGroupOwnerId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
sourceSecurityGroupOwnerId,
        ByteString
"ToPort" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
toPort
      ]

-- | /See:/ 'newRevokeSecurityGroupIngressResponse' smart constructor.
data RevokeSecurityGroupIngressResponse = RevokeSecurityGroupIngressResponse'
  { -- | Returns @true@ if the request succeeds; otherwise, returns an error.
    RevokeSecurityGroupIngressResponse -> Maybe Bool
return' :: Prelude.Maybe Prelude.Bool,
    -- | The inbound rules that were unknown to the service. In some cases,
    -- @unknownIpPermissionSet@ might be in a different format from the request
    -- parameter.
    RevokeSecurityGroupIngressResponse -> Maybe [IpPermission]
unknownIpPermissions :: Prelude.Maybe [IpPermission],
    -- | The response's http status code.
    RevokeSecurityGroupIngressResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RevokeSecurityGroupIngressResponse
-> RevokeSecurityGroupIngressResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeSecurityGroupIngressResponse
-> RevokeSecurityGroupIngressResponse -> Bool
$c/= :: RevokeSecurityGroupIngressResponse
-> RevokeSecurityGroupIngressResponse -> Bool
== :: RevokeSecurityGroupIngressResponse
-> RevokeSecurityGroupIngressResponse -> Bool
$c== :: RevokeSecurityGroupIngressResponse
-> RevokeSecurityGroupIngressResponse -> Bool
Prelude.Eq, ReadPrec [RevokeSecurityGroupIngressResponse]
ReadPrec RevokeSecurityGroupIngressResponse
Int -> ReadS RevokeSecurityGroupIngressResponse
ReadS [RevokeSecurityGroupIngressResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeSecurityGroupIngressResponse]
$creadListPrec :: ReadPrec [RevokeSecurityGroupIngressResponse]
readPrec :: ReadPrec RevokeSecurityGroupIngressResponse
$creadPrec :: ReadPrec RevokeSecurityGroupIngressResponse
readList :: ReadS [RevokeSecurityGroupIngressResponse]
$creadList :: ReadS [RevokeSecurityGroupIngressResponse]
readsPrec :: Int -> ReadS RevokeSecurityGroupIngressResponse
$creadsPrec :: Int -> ReadS RevokeSecurityGroupIngressResponse
Prelude.Read, Int -> RevokeSecurityGroupIngressResponse -> ShowS
[RevokeSecurityGroupIngressResponse] -> ShowS
RevokeSecurityGroupIngressResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeSecurityGroupIngressResponse] -> ShowS
$cshowList :: [RevokeSecurityGroupIngressResponse] -> ShowS
show :: RevokeSecurityGroupIngressResponse -> String
$cshow :: RevokeSecurityGroupIngressResponse -> String
showsPrec :: Int -> RevokeSecurityGroupIngressResponse -> ShowS
$cshowsPrec :: Int -> RevokeSecurityGroupIngressResponse -> ShowS
Prelude.Show, forall x.
Rep RevokeSecurityGroupIngressResponse x
-> RevokeSecurityGroupIngressResponse
forall x.
RevokeSecurityGroupIngressResponse
-> Rep RevokeSecurityGroupIngressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeSecurityGroupIngressResponse x
-> RevokeSecurityGroupIngressResponse
$cfrom :: forall x.
RevokeSecurityGroupIngressResponse
-> Rep RevokeSecurityGroupIngressResponse x
Prelude.Generic)

-- |
-- Create a value of 'RevokeSecurityGroupIngressResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'return'', 'revokeSecurityGroupIngressResponse_return' - Returns @true@ if the request succeeds; otherwise, returns an error.
--
-- 'unknownIpPermissions', 'revokeSecurityGroupIngressResponse_unknownIpPermissions' - The inbound rules that were unknown to the service. In some cases,
-- @unknownIpPermissionSet@ might be in a different format from the request
-- parameter.
--
-- 'httpStatus', 'revokeSecurityGroupIngressResponse_httpStatus' - The response's http status code.
newRevokeSecurityGroupIngressResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RevokeSecurityGroupIngressResponse
newRevokeSecurityGroupIngressResponse :: Int -> RevokeSecurityGroupIngressResponse
newRevokeSecurityGroupIngressResponse Int
pHttpStatus_ =
  RevokeSecurityGroupIngressResponse'
    { $sel:return':RevokeSecurityGroupIngressResponse' :: Maybe Bool
return' =
        forall a. Maybe a
Prelude.Nothing,
      $sel:unknownIpPermissions:RevokeSecurityGroupIngressResponse' :: Maybe [IpPermission]
unknownIpPermissions = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RevokeSecurityGroupIngressResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Returns @true@ if the request succeeds; otherwise, returns an error.
revokeSecurityGroupIngressResponse_return :: Lens.Lens' RevokeSecurityGroupIngressResponse (Prelude.Maybe Prelude.Bool)
revokeSecurityGroupIngressResponse_return :: Lens' RevokeSecurityGroupIngressResponse (Maybe Bool)
revokeSecurityGroupIngressResponse_return = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngressResponse' {Maybe Bool
return' :: Maybe Bool
$sel:return':RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Maybe Bool
return'} -> Maybe Bool
return') (\s :: RevokeSecurityGroupIngressResponse
s@RevokeSecurityGroupIngressResponse' {} Maybe Bool
a -> RevokeSecurityGroupIngressResponse
s {$sel:return':RevokeSecurityGroupIngressResponse' :: Maybe Bool
return' = Maybe Bool
a} :: RevokeSecurityGroupIngressResponse)

-- | The inbound rules that were unknown to the service. In some cases,
-- @unknownIpPermissionSet@ might be in a different format from the request
-- parameter.
revokeSecurityGroupIngressResponse_unknownIpPermissions :: Lens.Lens' RevokeSecurityGroupIngressResponse (Prelude.Maybe [IpPermission])
revokeSecurityGroupIngressResponse_unknownIpPermissions :: Lens' RevokeSecurityGroupIngressResponse (Maybe [IpPermission])
revokeSecurityGroupIngressResponse_unknownIpPermissions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngressResponse' {Maybe [IpPermission]
unknownIpPermissions :: Maybe [IpPermission]
$sel:unknownIpPermissions:RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Maybe [IpPermission]
unknownIpPermissions} -> Maybe [IpPermission]
unknownIpPermissions) (\s :: RevokeSecurityGroupIngressResponse
s@RevokeSecurityGroupIngressResponse' {} Maybe [IpPermission]
a -> RevokeSecurityGroupIngressResponse
s {$sel:unknownIpPermissions:RevokeSecurityGroupIngressResponse' :: Maybe [IpPermission]
unknownIpPermissions = Maybe [IpPermission]
a} :: RevokeSecurityGroupIngressResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
revokeSecurityGroupIngressResponse_httpStatus :: Lens.Lens' RevokeSecurityGroupIngressResponse Prelude.Int
revokeSecurityGroupIngressResponse_httpStatus :: Lens' RevokeSecurityGroupIngressResponse Int
revokeSecurityGroupIngressResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSecurityGroupIngressResponse' {Int
httpStatus :: Int
$sel:httpStatus:RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RevokeSecurityGroupIngressResponse
s@RevokeSecurityGroupIngressResponse' {} Int
a -> RevokeSecurityGroupIngressResponse
s {$sel:httpStatus:RevokeSecurityGroupIngressResponse' :: Int
httpStatus = Int
a} :: RevokeSecurityGroupIngressResponse)

instance
  Prelude.NFData
    RevokeSecurityGroupIngressResponse
  where
  rnf :: RevokeSecurityGroupIngressResponse -> ()
rnf RevokeSecurityGroupIngressResponse' {Int
Maybe Bool
Maybe [IpPermission]
httpStatus :: Int
unknownIpPermissions :: Maybe [IpPermission]
return' :: Maybe Bool
$sel:httpStatus:RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Int
$sel:unknownIpPermissions:RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Maybe [IpPermission]
$sel:return':RevokeSecurityGroupIngressResponse' :: RevokeSecurityGroupIngressResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
return'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [IpPermission]
unknownIpPermissions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus