module Network.AWS.CloudSearch.UpdateScalingParameters
(
UpdateScalingParameters
, updateScalingParameters
, uspDomainName
, uspScalingParameters
, UpdateScalingParametersResponse
, updateScalingParametersResponse
, usprScalingParameters
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.CloudSearch.Types
import qualified GHC.Exts
data UpdateScalingParameters = UpdateScalingParameters
{ _uspDomainName :: Text
, _uspScalingParameters :: ScalingParameters
} deriving (Eq, Show)
updateScalingParameters :: Text
-> ScalingParameters
-> UpdateScalingParameters
updateScalingParameters p1 p2 = UpdateScalingParameters
{ _uspDomainName = p1
, _uspScalingParameters = p2
}
uspDomainName :: Lens' UpdateScalingParameters Text
uspDomainName = lens _uspDomainName (\s a -> s { _uspDomainName = a })
uspScalingParameters :: Lens' UpdateScalingParameters ScalingParameters
uspScalingParameters =
lens _uspScalingParameters (\s a -> s { _uspScalingParameters = a })
newtype UpdateScalingParametersResponse = UpdateScalingParametersResponse
{ _usprScalingParameters :: ScalingParametersStatus
} deriving (Eq, Show)
updateScalingParametersResponse :: ScalingParametersStatus
-> UpdateScalingParametersResponse
updateScalingParametersResponse p1 = UpdateScalingParametersResponse
{ _usprScalingParameters = p1
}
usprScalingParameters :: Lens' UpdateScalingParametersResponse ScalingParametersStatus
usprScalingParameters =
lens _usprScalingParameters (\s a -> s { _usprScalingParameters = a })
instance ToPath UpdateScalingParameters where
toPath = const "/"
instance ToQuery UpdateScalingParameters where
toQuery UpdateScalingParameters{..} = mconcat
[ "DomainName" =? _uspDomainName
, "ScalingParameters" =? _uspScalingParameters
]
instance ToHeaders UpdateScalingParameters
instance AWSRequest UpdateScalingParameters where
type Sv UpdateScalingParameters = CloudSearch
type Rs UpdateScalingParameters = UpdateScalingParametersResponse
request = post "UpdateScalingParameters"
response = xmlResponse
instance FromXML UpdateScalingParametersResponse where
parseXML = withElement "UpdateScalingParametersResult" $ \x -> UpdateScalingParametersResponse
<$> x .@ "ScalingParameters"