{-# 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.RebootInstances
(
rebootInstances
, RebootInstances
, rebDryRun
, rebInstanceIds
, rebootInstancesResponse
, RebootInstancesResponse
) 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 RebootInstances = RebootInstances'
{ _rebDryRun :: !(Maybe Bool)
, _rebInstanceIds :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rebootInstances
:: RebootInstances
rebootInstances =
RebootInstances'
{ _rebDryRun = Nothing
, _rebInstanceIds = mempty
}
rebDryRun :: Lens' RebootInstances (Maybe Bool)
rebDryRun = lens _rebDryRun (\ s a -> s{_rebDryRun = a});
rebInstanceIds :: Lens' RebootInstances [Text]
rebInstanceIds = lens _rebInstanceIds (\ s a -> s{_rebInstanceIds = a}) . _Coerce;
instance AWSRequest RebootInstances where
type Rs RebootInstances = RebootInstancesResponse
request = postQuery ec2
response = receiveNull RebootInstancesResponse'
instance Hashable RebootInstances
instance NFData RebootInstances
instance ToHeaders RebootInstances where
toHeaders = const mempty
instance ToPath RebootInstances where
toPath = const "/"
instance ToQuery RebootInstances where
toQuery RebootInstances'{..}
= mconcat
["Action" =: ("RebootInstances" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _rebDryRun,
toQueryList "InstanceId" _rebInstanceIds]
data RebootInstancesResponse =
RebootInstancesResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
rebootInstancesResponse
:: RebootInstancesResponse
rebootInstancesResponse = RebootInstancesResponse'
instance NFData RebootInstancesResponse