{-# 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.ResetSnapshotAttribute
(
resetSnapshotAttribute
, ResetSnapshotAttribute
, rsaDryRun
, rsaSnapshotId
, rsaAttribute
, resetSnapshotAttributeResponse
, ResetSnapshotAttributeResponse
) 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 ResetSnapshotAttribute = ResetSnapshotAttribute'
{ _rsaDryRun :: !(Maybe Bool)
, _rsaSnapshotId :: !Text
, _rsaAttribute :: !SnapshotAttributeName
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resetSnapshotAttribute
:: Text
-> SnapshotAttributeName
-> ResetSnapshotAttribute
resetSnapshotAttribute pSnapshotId_ pAttribute_ =
ResetSnapshotAttribute'
{ _rsaDryRun = Nothing
, _rsaSnapshotId = pSnapshotId_
, _rsaAttribute = pAttribute_
}
rsaDryRun :: Lens' ResetSnapshotAttribute (Maybe Bool)
rsaDryRun = lens _rsaDryRun (\ s a -> s{_rsaDryRun = a});
rsaSnapshotId :: Lens' ResetSnapshotAttribute Text
rsaSnapshotId = lens _rsaSnapshotId (\ s a -> s{_rsaSnapshotId = a});
rsaAttribute :: Lens' ResetSnapshotAttribute SnapshotAttributeName
rsaAttribute = lens _rsaAttribute (\ s a -> s{_rsaAttribute = a});
instance AWSRequest ResetSnapshotAttribute where
type Rs ResetSnapshotAttribute =
ResetSnapshotAttributeResponse
request = postQuery ec2
response
= receiveNull ResetSnapshotAttributeResponse'
instance Hashable ResetSnapshotAttribute
instance NFData ResetSnapshotAttribute
instance ToHeaders ResetSnapshotAttribute where
toHeaders = const mempty
instance ToPath ResetSnapshotAttribute where
toPath = const "/"
instance ToQuery ResetSnapshotAttribute where
toQuery ResetSnapshotAttribute'{..}
= mconcat
["Action" =:
("ResetSnapshotAttribute" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _rsaDryRun,
"SnapshotId" =: _rsaSnapshotId,
"Attribute" =: _rsaAttribute]
data ResetSnapshotAttributeResponse =
ResetSnapshotAttributeResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
resetSnapshotAttributeResponse
:: ResetSnapshotAttributeResponse
resetSnapshotAttributeResponse = ResetSnapshotAttributeResponse'
instance NFData ResetSnapshotAttributeResponse