{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
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
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]
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
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.
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'
{ $sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: Text
instanceProfileName =
Text
pInstanceProfileName_,
$sel:roleName:RemoveRoleFromInstanceProfile' :: Text
roleName = Text
pRoleName_
}
removeRoleFromInstanceProfile_instanceProfileName :: Lens.Lens' RemoveRoleFromInstanceProfile Prelude.Text
removeRoleFromInstanceProfile_instanceProfileName :: Lens' RemoveRoleFromInstanceProfile Text
removeRoleFromInstanceProfile_instanceProfileName = 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 :: Lens' RemoveRoleFromInstanceProfile Text
removeRoleFromInstanceProfile_roleName = 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 :: (Service -> Service)
-> RemoveRoleFromInstanceProfile
-> Request RemoveRoleFromInstanceProfile
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 RemoveRoleFromInstanceProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveRoleFromInstanceProfile)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
RemoveRoleFromInstanceProfileResponse
RemoveRoleFromInstanceProfileResponse'
instance
Prelude.Hashable
RemoveRoleFromInstanceProfile
where
hashWithSalt :: Int -> RemoveRoleFromInstanceProfile -> Int
hashWithSalt Int
_salt RemoveRoleFromInstanceProfile' {Text
roleName :: Text
instanceProfileName :: Text
$sel:roleName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceProfileName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleName
instance Prelude.NFData RemoveRoleFromInstanceProfile where
rnf :: RemoveRoleFromInstanceProfile -> ()
rnf RemoveRoleFromInstanceProfile' {Text
roleName :: Text
instanceProfileName :: Text
$sel:roleName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
instanceProfileName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleName
instance Data.ToHeaders RemoveRoleFromInstanceProfile where
toHeaders :: RemoveRoleFromInstanceProfile -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath RemoveRoleFromInstanceProfile where
toPath :: RemoveRoleFromInstanceProfile -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RemoveRoleFromInstanceProfile where
toQuery :: RemoveRoleFromInstanceProfile -> QueryString
toQuery RemoveRoleFromInstanceProfile' {Text
roleName :: Text
instanceProfileName :: Text
$sel:roleName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
$sel:instanceProfileName:RemoveRoleFromInstanceProfile' :: RemoveRoleFromInstanceProfile -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"RemoveRoleFromInstanceProfile" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"InstanceProfileName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
instanceProfileName,
ByteString
"RoleName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
roleName
]
data RemoveRoleFromInstanceProfileResponse = RemoveRoleFromInstanceProfileResponse'
{
}
deriving (RemoveRoleFromInstanceProfileResponse
-> RemoveRoleFromInstanceProfileResponse -> Bool
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]
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
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.
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
where
rnf :: RemoveRoleFromInstanceProfileResponse -> ()
rnf RemoveRoleFromInstanceProfileResponse
_ = ()