module Network.AWS.IAM.AddRoleToInstanceProfile
(
addRoleToInstanceProfile
, AddRoleToInstanceProfile
, artipInstanceProfileName
, artipRoleName
, addRoleToInstanceProfileResponse
, AddRoleToInstanceProfileResponse
) where
import Network.AWS.IAM.Types
import Network.AWS.IAM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AddRoleToInstanceProfile = AddRoleToInstanceProfile'
{ _artipInstanceProfileName :: !Text
, _artipRoleName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
addRoleToInstanceProfile
:: Text
-> Text
-> AddRoleToInstanceProfile
addRoleToInstanceProfile pInstanceProfileName_ pRoleName_ =
AddRoleToInstanceProfile'
{ _artipInstanceProfileName = pInstanceProfileName_
, _artipRoleName = pRoleName_
}
artipInstanceProfileName :: Lens' AddRoleToInstanceProfile Text
artipInstanceProfileName = lens _artipInstanceProfileName (\ s a -> s{_artipInstanceProfileName = a});
artipRoleName :: Lens' AddRoleToInstanceProfile Text
artipRoleName = lens _artipRoleName (\ s a -> s{_artipRoleName = a});
instance AWSRequest AddRoleToInstanceProfile where
type Rs AddRoleToInstanceProfile =
AddRoleToInstanceProfileResponse
request = postQuery iam
response
= receiveNull AddRoleToInstanceProfileResponse'
instance Hashable AddRoleToInstanceProfile
instance NFData AddRoleToInstanceProfile
instance ToHeaders AddRoleToInstanceProfile where
toHeaders = const mempty
instance ToPath AddRoleToInstanceProfile where
toPath = const "/"
instance ToQuery AddRoleToInstanceProfile where
toQuery AddRoleToInstanceProfile'{..}
= mconcat
["Action" =:
("AddRoleToInstanceProfile" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"InstanceProfileName" =: _artipInstanceProfileName,
"RoleName" =: _artipRoleName]
data AddRoleToInstanceProfileResponse =
AddRoleToInstanceProfileResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
addRoleToInstanceProfileResponse
:: AddRoleToInstanceProfileResponse
addRoleToInstanceProfileResponse = AddRoleToInstanceProfileResponse'
instance NFData AddRoleToInstanceProfileResponse