{-# 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
, rsaAttribute
, rsaSnapshotId
, 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)
, _rsaAttribute :: !SnapshotAttributeName
, _rsaSnapshotId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resetSnapshotAttribute
:: SnapshotAttributeName
-> Text
-> ResetSnapshotAttribute
resetSnapshotAttribute pAttribute_ pSnapshotId_ =
ResetSnapshotAttribute'
{ _rsaDryRun = Nothing
, _rsaAttribute = pAttribute_
, _rsaSnapshotId = pSnapshotId_
}
rsaDryRun :: Lens' ResetSnapshotAttribute (Maybe Bool)
rsaDryRun = lens _rsaDryRun (\ s a -> s{_rsaDryRun = a})
rsaAttribute :: Lens' ResetSnapshotAttribute SnapshotAttributeName
rsaAttribute = lens _rsaAttribute (\ s a -> s{_rsaAttribute = a})
rsaSnapshotId :: Lens' ResetSnapshotAttribute Text
rsaSnapshotId = lens _rsaSnapshotId (\ s a -> s{_rsaSnapshotId = a})
instance AWSRequest ResetSnapshotAttribute where
type Rs ResetSnapshotAttribute =
ResetSnapshotAttributeResponse
request = postQuery ec2
response
= receiveNull ResetSnapshotAttributeResponse'
instance Hashable ResetSnapshotAttribute where
instance NFData ResetSnapshotAttribute where
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-11-15" :: ByteString),
"DryRun" =: _rsaDryRun, "Attribute" =: _rsaAttribute,
"SnapshotId" =: _rsaSnapshotId]
data ResetSnapshotAttributeResponse =
ResetSnapshotAttributeResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
resetSnapshotAttributeResponse
:: ResetSnapshotAttributeResponse
resetSnapshotAttributeResponse = ResetSnapshotAttributeResponse'
instance NFData ResetSnapshotAttributeResponse where