{-# 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.StartInstance
(
startInstance
, StartInstance
, sInstanceId
, startInstanceResponse
, StartInstanceResponse
) 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 StartInstance = StartInstance'
{ _sInstanceId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startInstance
:: Text
-> StartInstance
startInstance pInstanceId_ = StartInstance' {_sInstanceId = pInstanceId_}
sInstanceId :: Lens' StartInstance Text
sInstanceId = lens _sInstanceId (\ s a -> s{_sInstanceId = a})
instance AWSRequest StartInstance where
type Rs StartInstance = StartInstanceResponse
request = postJSON opsWorks
response = receiveNull StartInstanceResponse'
instance Hashable StartInstance where
instance NFData StartInstance where
instance ToHeaders StartInstance where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.StartInstance" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartInstance where
toJSON StartInstance'{..}
= object
(catMaybes [Just ("InstanceId" .= _sInstanceId)])
instance ToPath StartInstance where
toPath = const "/"
instance ToQuery StartInstance where
toQuery = const mempty
data StartInstanceResponse =
StartInstanceResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
startInstanceResponse
:: StartInstanceResponse
startInstanceResponse = StartInstanceResponse'
instance NFData StartInstanceResponse where