{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.EC2.ModifyVolumeAttribute
(
modifyVolumeAttribute
, ModifyVolumeAttribute
, mvaAutoEnableIO
, mvaDryRun
, mvaVolumeId
, modifyVolumeAttributeResponse
, ModifyVolumeAttributeResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ModifyVolumeAttribute = ModifyVolumeAttribute'
{ _mvaAutoEnableIO :: !(Maybe AttributeBooleanValue)
, _mvaDryRun :: !(Maybe Bool)
, _mvaVolumeId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVolumeAttribute
:: Text
-> ModifyVolumeAttribute
modifyVolumeAttribute pVolumeId_ =
ModifyVolumeAttribute'
{ _mvaAutoEnableIO = Nothing
, _mvaDryRun = Nothing
, _mvaVolumeId = pVolumeId_
}
mvaAutoEnableIO :: Lens' ModifyVolumeAttribute (Maybe AttributeBooleanValue)
mvaAutoEnableIO = lens _mvaAutoEnableIO (\ s a -> s{_mvaAutoEnableIO = a});
mvaDryRun :: Lens' ModifyVolumeAttribute (Maybe Bool)
mvaDryRun = lens _mvaDryRun (\ s a -> s{_mvaDryRun = a});
mvaVolumeId :: Lens' ModifyVolumeAttribute Text
mvaVolumeId = lens _mvaVolumeId (\ s a -> s{_mvaVolumeId = a});
instance AWSRequest ModifyVolumeAttribute where
type Rs ModifyVolumeAttribute =
ModifyVolumeAttributeResponse
request = postQuery ec2
response = receiveNull ModifyVolumeAttributeResponse'
instance Hashable ModifyVolumeAttribute
instance NFData ModifyVolumeAttribute
instance ToHeaders ModifyVolumeAttribute where
toHeaders = const mempty
instance ToPath ModifyVolumeAttribute where
toPath = const "/"
instance ToQuery ModifyVolumeAttribute where
toQuery ModifyVolumeAttribute'{..}
= mconcat
["Action" =: ("ModifyVolumeAttribute" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"AutoEnableIO" =: _mvaAutoEnableIO,
"DryRun" =: _mvaDryRun, "VolumeId" =: _mvaVolumeId]
data ModifyVolumeAttributeResponse =
ModifyVolumeAttributeResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVolumeAttributeResponse
:: ModifyVolumeAttributeResponse
modifyVolumeAttributeResponse = ModifyVolumeAttributeResponse'
instance NFData ModifyVolumeAttributeResponse