{-# 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.OpsWorks.RebootInstance
(
rebootInstance
, RebootInstance
, riInstanceId
, rebootInstanceResponse
, RebootInstanceResponse
) where
import Network.AWS.Lens
import Network.AWS.OpsWorks.Types
import Network.AWS.OpsWorks.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype RebootInstance = RebootInstance'
{ _riInstanceId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
rebootInstance
:: Text
-> RebootInstance
rebootInstance pInstanceId_ = RebootInstance' {_riInstanceId = pInstanceId_}
riInstanceId :: Lens' RebootInstance Text
riInstanceId = lens _riInstanceId (\ s a -> s{_riInstanceId = a})
instance AWSRequest RebootInstance where
type Rs RebootInstance = RebootInstanceResponse
request = postJSON opsWorks
response = receiveNull RebootInstanceResponse'
instance Hashable RebootInstance where
instance NFData RebootInstance where
instance ToHeaders RebootInstance where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.RebootInstance" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RebootInstance where
toJSON RebootInstance'{..}
= object
(catMaybes [Just ("InstanceId" .= _riInstanceId)])
instance ToPath RebootInstance where
toPath = const "/"
instance ToQuery RebootInstance where
toQuery = const mempty
data RebootInstanceResponse =
RebootInstanceResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
rebootInstanceResponse
:: RebootInstanceResponse
rebootInstanceResponse = RebootInstanceResponse'
instance NFData RebootInstanceResponse where