module Network.AWS.CloudSearch.UpdateScalingParameters
(
updateScalingParameters
, UpdateScalingParameters
, uspDomainName
, uspScalingParameters
, updateScalingParametersResponse
, UpdateScalingParametersResponse
, usprsResponseStatus
, usprsScalingParameters
) where
import Network.AWS.CloudSearch.Types
import Network.AWS.CloudSearch.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateScalingParameters = UpdateScalingParameters'
{ _uspDomainName :: !Text
, _uspScalingParameters :: !ScalingParameters
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateScalingParameters
:: Text
-> ScalingParameters
-> UpdateScalingParameters
updateScalingParameters pDomainName_ pScalingParameters_ =
UpdateScalingParameters'
{ _uspDomainName = pDomainName_
, _uspScalingParameters = pScalingParameters_
}
uspDomainName :: Lens' UpdateScalingParameters Text
uspDomainName = lens _uspDomainName (\ s a -> s{_uspDomainName = a});
uspScalingParameters :: Lens' UpdateScalingParameters ScalingParameters
uspScalingParameters = lens _uspScalingParameters (\ s a -> s{_uspScalingParameters = a});
instance AWSRequest UpdateScalingParameters where
type Rs UpdateScalingParameters =
UpdateScalingParametersResponse
request = postQuery cloudSearch
response
= receiveXMLWrapper "UpdateScalingParametersResult"
(\ s h x ->
UpdateScalingParametersResponse' <$>
(pure (fromEnum s)) <*> (x .@ "ScalingParameters"))
instance ToHeaders UpdateScalingParameters where
toHeaders = const mempty
instance ToPath UpdateScalingParameters where
toPath = const "/"
instance ToQuery UpdateScalingParameters where
toQuery UpdateScalingParameters'{..}
= mconcat
["Action" =:
("UpdateScalingParameters" :: ByteString),
"Version" =: ("2013-01-01" :: ByteString),
"DomainName" =: _uspDomainName,
"ScalingParameters" =: _uspScalingParameters]
data UpdateScalingParametersResponse = UpdateScalingParametersResponse'
{ _usprsResponseStatus :: !Int
, _usprsScalingParameters :: !ScalingParametersStatus
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateScalingParametersResponse
:: Int
-> ScalingParametersStatus
-> UpdateScalingParametersResponse
updateScalingParametersResponse pResponseStatus_ pScalingParameters_ =
UpdateScalingParametersResponse'
{ _usprsResponseStatus = pResponseStatus_
, _usprsScalingParameters = pScalingParameters_
}
usprsResponseStatus :: Lens' UpdateScalingParametersResponse Int
usprsResponseStatus = lens _usprsResponseStatus (\ s a -> s{_usprsResponseStatus = a});
usprsScalingParameters :: Lens' UpdateScalingParametersResponse ScalingParametersStatus
usprsScalingParameters = lens _usprsScalingParameters (\ s a -> s{_usprsScalingParameters = a});