{-# 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.ResetImageAttribute
(
resetImageAttribute
, ResetImageAttribute
, resDryRun
, resAttribute
, resImageId
, resetImageAttributeResponse
, ResetImageAttributeResponse
) 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 ResetImageAttribute = ResetImageAttribute'
{ _resDryRun :: !(Maybe Bool)
, _resAttribute :: !ResetImageAttributeName
, _resImageId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resetImageAttribute
:: ResetImageAttributeName
-> Text
-> ResetImageAttribute
resetImageAttribute pAttribute_ pImageId_ =
ResetImageAttribute'
{_resDryRun = Nothing, _resAttribute = pAttribute_, _resImageId = pImageId_}
resDryRun :: Lens' ResetImageAttribute (Maybe Bool)
resDryRun = lens _resDryRun (\ s a -> s{_resDryRun = a})
resAttribute :: Lens' ResetImageAttribute ResetImageAttributeName
resAttribute = lens _resAttribute (\ s a -> s{_resAttribute = a})
resImageId :: Lens' ResetImageAttribute Text
resImageId = lens _resImageId (\ s a -> s{_resImageId = a})
instance AWSRequest ResetImageAttribute where
type Rs ResetImageAttribute =
ResetImageAttributeResponse
request = postQuery ec2
response = receiveNull ResetImageAttributeResponse'
instance Hashable ResetImageAttribute where
instance NFData ResetImageAttribute where
instance ToHeaders ResetImageAttribute where
toHeaders = const mempty
instance ToPath ResetImageAttribute where
toPath = const "/"
instance ToQuery ResetImageAttribute where
toQuery ResetImageAttribute'{..}
= mconcat
["Action" =: ("ResetImageAttribute" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _resDryRun, "Attribute" =: _resAttribute,
"ImageId" =: _resImageId]
data ResetImageAttributeResponse =
ResetImageAttributeResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
resetImageAttributeResponse
:: ResetImageAttributeResponse
resetImageAttributeResponse = ResetImageAttributeResponse'
instance NFData ResetImageAttributeResponse where