{-# 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.RemoveRoleFromInstanceProfile
(
RemoveRoleFromInstanceProfile (..),
newRemoveRoleFromInstanceProfile,
removeRoleFromInstanceProfile_instanceProfileName,
removeRoleFromInstanceProfile_roleName,
RemoveRoleFromInstanceProfileResponse (..),
newRemoveRoleFromInstanceProfileResponse,
)
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 RemoveRoleFromInstanceProfile = RemoveRoleFromInstanceProfile'
{
RemoveRoleFromInstanceProfile -> Text
instanceProfileName :: Prelude.Text,
RemoveRoleFromInstanceProfile -> Text
roleName :: Prelude.Text
}
deriving (RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool
(RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool)
-> (RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool)
-> Eq RemoveRoleFromInstanceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool
$c/= :: RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool
== :: RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool
$c== :: RemoveRoleFromInstanceProfile
-> RemoveRoleFromInstanceProfile -> Bool
Prelude.Eq, ReadPrec [RemoveRoleFromInstanceProfile]
ReadPrec RemoveRoleFromInstanceProfile
Int -> ReadS RemoveRoleFromInstanceProfile
ReadS [RemoveRoleFromInstanceProfile]
(Int -> ReadS RemoveRoleFromInstanceProfile)
-> ReadS [RemoveRoleFromInstanceProfile]
-> ReadPrec RemoveRoleFromInstanceProfile
-> ReadPrec [RemoveRoleFromInstanceProfile]
-> Read RemoveRoleFromInstanceProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveRoleFromInstanceProfile]
$creadListPrec :: ReadPrec [RemoveRoleFromInstanceProfile]
readPrec :: ReadPrec RemoveRoleFromInstanceProfile
$creadPrec :: ReadPrec RemoveRoleFromInstanceProfile
readList :: ReadS [RemoveRoleFromInstanceProfile]
$creadList :: ReadS [RemoveRoleFromInstanceProfile]
readsPrec :: Int -> ReadS RemoveRoleFromInstanceProfile
$creadsPrec :: Int -> ReadS RemoveRoleFromInstanceProfile
Prelude.Read, Int -> RemoveRoleFromInstanceProfile -> ShowS
[RemoveRoleFromInstanceProfile] -> ShowS
RemoveRoleFromInstanceProfile -> String
(Int -> RemoveRoleFromInstanceProfile -> ShowS)
-> (RemoveRoleFromInstanceProfile -> String)
-> ([RemoveRoleFromInstanceProfile] -> ShowS)
-> Show RemoveRoleFromInstanceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveRoleFromInstanceProfile] -> ShowS
$cshowList :: [RemoveRoleFromInstanceProfile] -> ShowS
show :: RemoveRoleFromInstanceProfile -> String
$cshow :: RemoveRoleFromInstanceProfile -> String
showsPrec :: Int -> RemoveRoleFromInstanceProfile -> ShowS
$cshowsPrec :: Int -> RemoveRoleFromInstanceProfile -> ShowS
Prelude.Show, (forall x.
RemoveRoleFromInstanceProfile
-> Rep RemoveRoleFromInstanceProfile x)
-> (forall x.
Rep RemoveRoleFromInstanceProfile x
-> RemoveRoleFromInstanceProfile)
-> Generic RemoveRoleFromInstanceProfile
forall x.
Rep RemoveRoleFromInstanceProfile x
-> RemoveRoleFromInstanceProfile
forall x.
RemoveRoleFromInstanceProfile
-> Rep RemoveRoleFromInstanceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveRoleFromInstanceProfile x
-> RemoveRoleFromInstanceProfile
$cfrom :: forall x.
RemoveRoleFromInstanceProfile
-> Rep RemoveRoleFromInstanceProfile x
Prelude.Generic)
newRemoveRoleFromInstanceProfile ::
Prelude.Text ->
Prelude.Text ->
RemoveRoleFromInstanceProfile
newRemoveRoleFromInstanceProfile :: Text -> Text -> RemoveRoleFromInstanceProfile
newRemoveRoleFromInstanceProfile
Text
pInstanceProfileName_
Text
pRoleName_ =
RemoveRoleFromInstanceProfile' :: Text -> Text -> RemoveRoleFromInstanceProfile
RemoveRoleFromInstanceProfile'
{ $sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: Text
instanceProfileName =
Text
pInstanceProfileName_,
$sel:roleName:RemoveRoleFromInstanceProfile' :: Text
roleName = Text
pRoleName_
}
removeRoleFromInstanceProfile_instanceProfileName :: Lens.Lens' RemoveRoleFromInstanceProfile Prelude.Text
removeRoleFromInstanceProfile_instanceProfileName :: (Text -> f Text)
-> RemoveRoleFromInstanceProfile -> f RemoveRoleFromInstanceProfile
removeRoleFromInstanceProfile_instanceProfileName = (RemoveRoleFromInstanceProfile -> Text)
-> (RemoveRoleFromInstanceProfile
-> Text -> RemoveRoleFromInstanceProfile)
-> Lens
RemoveRoleFromInstanceProfile
RemoveRoleFromInstanceProfile
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveRoleFromInstanceProfile' {Text
instanceProfileName :: Text
$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
instanceProfileName} -> Text
instanceProfileName) (\s :: RemoveRoleFromInstanceProfile
s@RemoveRoleFromInstanceProfile' {} Text
a -> RemoveRoleFromInstanceProfile
s {$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: Text
instanceProfileName = Text
a} :: RemoveRoleFromInstanceProfile)
removeRoleFromInstanceProfile_roleName :: Lens.Lens' RemoveRoleFromInstanceProfile Prelude.Text
removeRoleFromInstanceProfile_roleName :: (Text -> f Text)
-> RemoveRoleFromInstanceProfile -> f RemoveRoleFromInstanceProfile
removeRoleFromInstanceProfile_roleName = (RemoveRoleFromInstanceProfile -> Text)
-> (RemoveRoleFromInstanceProfile
-> Text -> RemoveRoleFromInstanceProfile)
-> Lens
RemoveRoleFromInstanceProfile
RemoveRoleFromInstanceProfile
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveRoleFromInstanceProfile' {Text
roleName :: Text
$sel:roleName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
roleName} -> Text
roleName) (\s :: RemoveRoleFromInstanceProfile
s@RemoveRoleFromInstanceProfile' {} Text
a -> RemoveRoleFromInstanceProfile
s {$sel:roleName:RemoveRoleFromInstanceProfile' :: Text
roleName = Text
a} :: RemoveRoleFromInstanceProfile)
instance
Core.AWSRequest
RemoveRoleFromInstanceProfile
where
type
AWSResponse RemoveRoleFromInstanceProfile =
RemoveRoleFromInstanceProfileResponse
request :: RemoveRoleFromInstanceProfile
-> Request RemoveRoleFromInstanceProfile
request = Service
-> RemoveRoleFromInstanceProfile
-> Request RemoveRoleFromInstanceProfile
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy RemoveRoleFromInstanceProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveRoleFromInstanceProfile)))
response =
AWSResponse RemoveRoleFromInstanceProfile
-> Logger
-> Service
-> Proxy RemoveRoleFromInstanceProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveRoleFromInstanceProfile)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse RemoveRoleFromInstanceProfile
RemoveRoleFromInstanceProfileResponse
RemoveRoleFromInstanceProfileResponse'
instance
Prelude.Hashable
RemoveRoleFromInstanceProfile
instance Prelude.NFData RemoveRoleFromInstanceProfile
instance Core.ToHeaders RemoveRoleFromInstanceProfile where
toHeaders :: RemoveRoleFromInstanceProfile -> [Header]
toHeaders = [Header] -> RemoveRoleFromInstanceProfile -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath RemoveRoleFromInstanceProfile where
toPath :: RemoveRoleFromInstanceProfile -> ByteString
toPath = ByteString -> RemoveRoleFromInstanceProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RemoveRoleFromInstanceProfile where
toQuery :: RemoveRoleFromInstanceProfile -> QueryString
toQuery RemoveRoleFromInstanceProfile' {Text
roleName :: Text
instanceProfileName :: Text
$sel:roleName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> 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
"RemoveRoleFromInstanceProfile" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"InstanceProfileName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
instanceProfileName,
ByteString
"RoleName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
roleName
]
data RemoveRoleFromInstanceProfileResponse = RemoveRoleFromInstanceProfileResponse'
{
}
deriving (RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
(RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool)
-> (RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool)
-> Eq RemoveRoleFromInstanceProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
$c/= :: RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
== :: RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
$c== :: RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
Prelude.Eq, ReadPrec [RemoveRoleFromInstanceProfileResponse]
ReadPrec RemoveRoleFromInstanceProfileResponse
Int -> ReadS RemoveRoleFromInstanceProfileResponse
ReadS [RemoveRoleFromInstanceProfileResponse]
(Int -> ReadS RemoveRoleFromInstanceProfileResponse)
-> ReadS [RemoveRoleFromInstanceProfileResponse]
-> ReadPrec RemoveRoleFromInstanceProfileResponse
-> ReadPrec [RemoveRoleFromInstanceProfileResponse]
-> Read RemoveRoleFromInstanceProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveRoleFromInstanceProfileResponse]
$creadListPrec :: ReadPrec [RemoveRoleFromInstanceProfileResponse]
readPrec :: ReadPrec RemoveRoleFromInstanceProfileResponse
$creadPrec :: ReadPrec RemoveRoleFromInstanceProfileResponse
readList :: ReadS [RemoveRoleFromInstanceProfileResponse]
$creadList :: ReadS [RemoveRoleFromInstanceProfileResponse]
readsPrec :: Int -> ReadS RemoveRoleFromInstanceProfileResponse
$creadsPrec :: Int -> ReadS RemoveRoleFromInstanceProfileResponse
Prelude.Read, Int -> RemoveRoleFromInstanceProfileResponse -> ShowS
[RemoveRoleFromInstanceProfileResponse] -> ShowS
RemoveRoleFromInstanceProfileResponse -> String
(Int -> RemoveRoleFromInstanceProfileResponse -> ShowS)
-> (RemoveRoleFromInstanceProfileResponse -> String)
-> ([RemoveRoleFromInstanceProfileResponse] -> ShowS)
-> Show RemoveRoleFromInstanceProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveRoleFromInstanceProfileResponse] -> ShowS
$cshowList :: [RemoveRoleFromInstanceProfileResponse] -> ShowS
show :: RemoveRoleFromInstanceProfileResponse -> String
$cshow :: RemoveRoleFromInstanceProfileResponse -> String
showsPrec :: Int -> RemoveRoleFromInstanceProfileResponse -> ShowS
$cshowsPrec :: Int -> RemoveRoleFromInstanceProfileResponse -> ShowS
Prelude.Show, (forall x.
RemoveRoleFromInstanceProfileResponse
-> Rep RemoveRoleFromInstanceProfileResponse x)
-> (forall x.
Rep RemoveRoleFromInstanceProfileResponse x
-> RemoveRoleFromInstanceProfileResponse)
-> Generic RemoveRoleFromInstanceProfileResponse
forall x.
Rep RemoveRoleFromInstanceProfileResponse x
-> RemoveRoleFromInstanceProfileResponse
forall x.
RemoveRoleFromInstanceProfileResponse
-> Rep RemoveRoleFromInstanceProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveRoleFromInstanceProfileResponse x
-> RemoveRoleFromInstanceProfileResponse
$cfrom :: forall x.
RemoveRoleFromInstanceProfileResponse
-> Rep RemoveRoleFromInstanceProfileResponse x
Prelude.Generic)
newRemoveRoleFromInstanceProfileResponse ::
RemoveRoleFromInstanceProfileResponse
newRemoveRoleFromInstanceProfileResponse :: RemoveRoleFromInstanceProfileResponse
newRemoveRoleFromInstanceProfileResponse =
RemoveRoleFromInstanceProfileResponse
RemoveRoleFromInstanceProfileResponse'
instance
Prelude.NFData
RemoveRoleFromInstanceProfileResponse