{-# 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 #-}
module Amazonka.IAM.DeleteGroupPolicy
(
DeleteGroupPolicy (..),
newDeleteGroupPolicy,
deleteGroupPolicy_groupName,
deleteGroupPolicy_policyName,
DeleteGroupPolicyResponse (..),
newDeleteGroupPolicyResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteGroupPolicy = DeleteGroupPolicy'
{
DeleteGroupPolicy -> Text
groupName :: Prelude.Text,
DeleteGroupPolicy -> Text
policyName :: Prelude.Text
}
deriving (DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
(DeleteGroupPolicy -> DeleteGroupPolicy -> Bool)
-> (DeleteGroupPolicy -> DeleteGroupPolicy -> Bool)
-> Eq DeleteGroupPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c/= :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
== :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
$c== :: DeleteGroupPolicy -> DeleteGroupPolicy -> Bool
Prelude.Eq, ReadPrec [DeleteGroupPolicy]
ReadPrec DeleteGroupPolicy
Int -> ReadS DeleteGroupPolicy
ReadS [DeleteGroupPolicy]
(Int -> ReadS DeleteGroupPolicy)
-> ReadS [DeleteGroupPolicy]
-> ReadPrec DeleteGroupPolicy
-> ReadPrec [DeleteGroupPolicy]
-> Read DeleteGroupPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGroupPolicy]
$creadListPrec :: ReadPrec [DeleteGroupPolicy]
readPrec :: ReadPrec DeleteGroupPolicy
$creadPrec :: ReadPrec DeleteGroupPolicy
readList :: ReadS [DeleteGroupPolicy]
$creadList :: ReadS [DeleteGroupPolicy]
readsPrec :: Int -> ReadS DeleteGroupPolicy
$creadsPrec :: Int -> ReadS DeleteGroupPolicy
Prelude.Read, Int -> DeleteGroupPolicy -> ShowS
[DeleteGroupPolicy] -> ShowS
DeleteGroupPolicy -> String
(Int -> DeleteGroupPolicy -> ShowS)
-> (DeleteGroupPolicy -> String)
-> ([DeleteGroupPolicy] -> ShowS)
-> Show DeleteGroupPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGroupPolicy] -> ShowS
$cshowList :: [DeleteGroupPolicy] -> ShowS
show :: DeleteGroupPolicy -> String
$cshow :: DeleteGroupPolicy -> String
showsPrec :: Int -> DeleteGroupPolicy -> ShowS
$cshowsPrec :: Int -> DeleteGroupPolicy -> ShowS
Prelude.Show, (forall x. DeleteGroupPolicy -> Rep DeleteGroupPolicy x)
-> (forall x. Rep DeleteGroupPolicy x -> DeleteGroupPolicy)
-> Generic DeleteGroupPolicy
forall x. Rep DeleteGroupPolicy x -> DeleteGroupPolicy
forall x. DeleteGroupPolicy -> Rep DeleteGroupPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteGroupPolicy x -> DeleteGroupPolicy
$cfrom :: forall x. DeleteGroupPolicy -> Rep DeleteGroupPolicy x
Prelude.Generic)
newDeleteGroupPolicy ::
Prelude.Text ->
Prelude.Text ->
DeleteGroupPolicy
newDeleteGroupPolicy :: Text -> Text -> DeleteGroupPolicy
newDeleteGroupPolicy Text
pGroupName_ Text
pPolicyName_ =
DeleteGroupPolicy' :: Text -> Text -> DeleteGroupPolicy
DeleteGroupPolicy'
{ $sel:groupName:DeleteGroupPolicy' :: Text
groupName = Text
pGroupName_,
$sel:policyName:DeleteGroupPolicy' :: Text
policyName = Text
pPolicyName_
}
deleteGroupPolicy_groupName :: Lens.Lens' DeleteGroupPolicy Prelude.Text
deleteGroupPolicy_groupName :: (Text -> f Text) -> DeleteGroupPolicy -> f DeleteGroupPolicy
deleteGroupPolicy_groupName = (DeleteGroupPolicy -> Text)
-> (DeleteGroupPolicy -> Text -> DeleteGroupPolicy)
-> Lens DeleteGroupPolicy DeleteGroupPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGroupPolicy' {Text
groupName :: Text
$sel:groupName:DeleteGroupPolicy' :: DeleteGroupPolicy -> Text
groupName} -> Text
groupName) (\s :: DeleteGroupPolicy
s@DeleteGroupPolicy' {} Text
a -> DeleteGroupPolicy
s {$sel:groupName:DeleteGroupPolicy' :: Text
groupName = Text
a} :: DeleteGroupPolicy)
deleteGroupPolicy_policyName :: Lens.Lens' DeleteGroupPolicy Prelude.Text
deleteGroupPolicy_policyName :: (Text -> f Text) -> DeleteGroupPolicy -> f DeleteGroupPolicy
deleteGroupPolicy_policyName = (DeleteGroupPolicy -> Text)
-> (DeleteGroupPolicy -> Text -> DeleteGroupPolicy)
-> Lens DeleteGroupPolicy DeleteGroupPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGroupPolicy' {Text
policyName :: Text
$sel:policyName:DeleteGroupPolicy' :: DeleteGroupPolicy -> Text
policyName} -> Text
policyName) (\s :: DeleteGroupPolicy
s@DeleteGroupPolicy' {} Text
a -> DeleteGroupPolicy
s {$sel:policyName:DeleteGroupPolicy' :: Text
policyName = Text
a} :: DeleteGroupPolicy)
instance Core.AWSRequest DeleteGroupPolicy where
type
AWSResponse DeleteGroupPolicy =
DeleteGroupPolicyResponse
request :: DeleteGroupPolicy -> Request DeleteGroupPolicy
request = Service -> DeleteGroupPolicy -> Request DeleteGroupPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteGroupPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGroupPolicy)))
response =
AWSResponse DeleteGroupPolicy
-> Logger
-> Service
-> Proxy DeleteGroupPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGroupPolicy)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteGroupPolicy
DeleteGroupPolicyResponse
DeleteGroupPolicyResponse'
instance Prelude.Hashable DeleteGroupPolicy
instance Prelude.NFData DeleteGroupPolicy
instance Core.ToHeaders DeleteGroupPolicy where
toHeaders :: DeleteGroupPolicy -> [Header]
toHeaders = [Header] -> DeleteGroupPolicy -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteGroupPolicy where
toPath :: DeleteGroupPolicy -> ByteString
toPath = ByteString -> DeleteGroupPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteGroupPolicy where
toQuery :: DeleteGroupPolicy -> QueryString
toQuery DeleteGroupPolicy' {Text
policyName :: Text
groupName :: Text
$sel:policyName:DeleteGroupPolicy' :: DeleteGroupPolicy -> Text
$sel:groupName:DeleteGroupPolicy' :: DeleteGroupPolicy -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteGroupPolicy" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"GroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
groupName,
ByteString
"PolicyName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
policyName
]
data DeleteGroupPolicyResponse = DeleteGroupPolicyResponse'
{
}
deriving (DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool
(DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool)
-> (DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool)
-> Eq DeleteGroupPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool
$c/= :: DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool
== :: DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool
$c== :: DeleteGroupPolicyResponse -> DeleteGroupPolicyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteGroupPolicyResponse]
ReadPrec DeleteGroupPolicyResponse
Int -> ReadS DeleteGroupPolicyResponse
ReadS [DeleteGroupPolicyResponse]
(Int -> ReadS DeleteGroupPolicyResponse)
-> ReadS [DeleteGroupPolicyResponse]
-> ReadPrec DeleteGroupPolicyResponse
-> ReadPrec [DeleteGroupPolicyResponse]
-> Read DeleteGroupPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGroupPolicyResponse]
$creadListPrec :: ReadPrec [DeleteGroupPolicyResponse]
readPrec :: ReadPrec DeleteGroupPolicyResponse
$creadPrec :: ReadPrec DeleteGroupPolicyResponse
readList :: ReadS [DeleteGroupPolicyResponse]
$creadList :: ReadS [DeleteGroupPolicyResponse]
readsPrec :: Int -> ReadS DeleteGroupPolicyResponse
$creadsPrec :: Int -> ReadS DeleteGroupPolicyResponse
Prelude.Read, Int -> DeleteGroupPolicyResponse -> ShowS
[DeleteGroupPolicyResponse] -> ShowS
DeleteGroupPolicyResponse -> String
(Int -> DeleteGroupPolicyResponse -> ShowS)
-> (DeleteGroupPolicyResponse -> String)
-> ([DeleteGroupPolicyResponse] -> ShowS)
-> Show DeleteGroupPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGroupPolicyResponse] -> ShowS
$cshowList :: [DeleteGroupPolicyResponse] -> ShowS
show :: DeleteGroupPolicyResponse -> String
$cshow :: DeleteGroupPolicyResponse -> String
showsPrec :: Int -> DeleteGroupPolicyResponse -> ShowS
$cshowsPrec :: Int -> DeleteGroupPolicyResponse -> ShowS
Prelude.Show, (forall x.
DeleteGroupPolicyResponse -> Rep DeleteGroupPolicyResponse x)
-> (forall x.
Rep DeleteGroupPolicyResponse x -> DeleteGroupPolicyResponse)
-> Generic DeleteGroupPolicyResponse
forall x.
Rep DeleteGroupPolicyResponse x -> DeleteGroupPolicyResponse
forall x.
DeleteGroupPolicyResponse -> Rep DeleteGroupPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteGroupPolicyResponse x -> DeleteGroupPolicyResponse
$cfrom :: forall x.
DeleteGroupPolicyResponse -> Rep DeleteGroupPolicyResponse x
Prelude.Generic)
newDeleteGroupPolicyResponse ::
DeleteGroupPolicyResponse
newDeleteGroupPolicyResponse :: DeleteGroupPolicyResponse
newDeleteGroupPolicyResponse =
DeleteGroupPolicyResponse
DeleteGroupPolicyResponse'
instance Prelude.NFData DeleteGroupPolicyResponse