module Network.AWS.IAM.AddRoleToInstanceProfile
(
AddRoleToInstanceProfile
, addRoleToInstanceProfile
, artipInstanceProfileName
, artipRoleName
, AddRoleToInstanceProfileResponse
, addRoleToInstanceProfileResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.IAM.Types
import qualified GHC.Exts
data AddRoleToInstanceProfile = AddRoleToInstanceProfile
{ _artipInstanceProfileName :: Text
, _artipRoleName :: Text
} deriving (Eq, Ord, Show)
addRoleToInstanceProfile :: Text
-> Text
-> AddRoleToInstanceProfile
addRoleToInstanceProfile p1 p2 = AddRoleToInstanceProfile
{ _artipInstanceProfileName = p1
, _artipRoleName = p2
}
artipInstanceProfileName :: Lens' AddRoleToInstanceProfile Text
artipInstanceProfileName =
lens _artipInstanceProfileName
(\s a -> s { _artipInstanceProfileName = a })
artipRoleName :: Lens' AddRoleToInstanceProfile Text
artipRoleName = lens _artipRoleName (\s a -> s { _artipRoleName = a })
data AddRoleToInstanceProfileResponse = AddRoleToInstanceProfileResponse
deriving (Eq, Ord, Show, Generic)
addRoleToInstanceProfileResponse :: AddRoleToInstanceProfileResponse
addRoleToInstanceProfileResponse = AddRoleToInstanceProfileResponse
instance ToPath AddRoleToInstanceProfile where
toPath = const "/"
instance ToQuery AddRoleToInstanceProfile where
toQuery AddRoleToInstanceProfile{..} = mconcat
[ "InstanceProfileName" =? _artipInstanceProfileName
, "RoleName" =? _artipRoleName
]
instance ToHeaders AddRoleToInstanceProfile
instance AWSRequest AddRoleToInstanceProfile where
type Sv AddRoleToInstanceProfile = IAM
type Rs AddRoleToInstanceProfile = AddRoleToInstanceProfileResponse
request = post "AddRoleToInstanceProfile"
response = nullResponse AddRoleToInstanceProfileResponse